Skip to content

Commit

Permalink
growfs: set PKNAME and partnum in multipath path
Browse files Browse the repository at this point in the history
No functional change. Prep for next patch.

(cherry picked from commit 7bcd40f)
  • Loading branch information
jlebon authored and jbtrystram committed Jun 25, 2024
1 parent 0d74ccc commit 28d4a54
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,10 @@ while true; do
part)
eval $(udevadm info --query property --export "${current_blkdev}" | grep ^DM_ || :)
if [ -n "${DM_MPATH:-}" ]; then
PKNAME=/dev/mapper/${DM_MPATH}
partnum=${DM_PART}
# Since growpart does not understand device mapper, we have to use sfdisk.
echo ", +" | sfdisk --no-reread --no-tell-kernel --force -N "${DM_PART}" "/dev/mapper/${DM_MPATH}"
echo ", +" | sfdisk --no-reread --no-tell-kernel --force -N "${partnum}" "${PKNAME}"
udevadm settle || : # Wait for udev-triggered kpartx to update mappings
else
partnum=$(cat "/sys/dev/block/${MAJMIN}/partition")
Expand Down

0 comments on commit 28d4a54

Please sign in to comment.