curtin-dev team mailing list archive
-
curtin-dev team
-
Mailing list archive
-
Message #01328
[Merge] ~mwhudson/curtin:fix-multipath-partition-verification-2 into curtin:master
The proposal to merge ~mwhudson/curtin:fix-multipath-partition-verification-2 into curtin:master has been updated.
Commit message changed to:
block: fixes for verifying existing multipath partitions
Verifying a partition on a multipath disk currently fails for two
reasons:
1. get_blockdev_for_partition does not know how to go from a multipath
partition to a multipath disk, so sfdisk_info ends up calling sfdisk
on the partition, which fails.
2. sfdisk --json /dev/dm-X prints /dev/mapper paths for the partition
paths but compares them against the fully deferenced /dev/dm-Y path
for the partition.
2 is easily fixed by resolving symlinks before comparing nodes. 1 can be
fixed with a little udev poking but then sys_block_path returns paths
like /sys/class/block/dm-1/dm-2 for a partition of a multipath disk,
which doesn't exist. Luckily, nodes for partitions exist directly in
/sys/class/block and have done since /sys/class/block was added in 2008:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=edfaa7c36574f1bf09c65ad602412db9da5f96bf
so we can just remove the call to get_blockdev_for_partition from
sys_block_read.
For more details, see:
https://code.launchpad.net/~mwhudson/curtin/+git/curtin/+merge/396462
--
Your team curtin developers is requested to review the proposed merge of ~mwhudson/curtin:fix-multipath-partition-verification-2 into curtin:master.
References