lvmstrap: add PV-on-partition support
authorIustin Pop <iustin@google.com>
Wed, 19 Jan 2011 16:52:10 +0000 (17:52 +0100)
committerIustin Pop <iustin@google.com>
Thu, 20 Jan 2011 12:05:37 +0000 (13:05 +0100)
commit0ae0663d8cb79fa74f715901460477b0926e572e
treedad1c0b8ef8682eab84cfffcce64d69dcadc4475
parent7706fdd490330aa9d09c91610cfc9bb4f8d3cddd
lvmstrap: add PV-on-partition support

This is a not-so-nice change, adding support for partitions to be used
as PVs.

The not-nice part is that partitions live in a separate place in
sysfs, whereas in dev they live at the same level as disks. We
workaround this via a new SysfsName function that computes the correct
sysfs base path for a given disk.

The other rule is that if a disk is not in use, we ignore its
partitions completely, as the disk will be re-partitioned anyway. Only
if the disk is busy, we consider each of its partitions for the
free/busy list.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
tools/lvmstrap