• Iustin Pop's avatar
    lvmstrap: add PV-on-partition support · 0ae0663d
    Iustin Pop authored
    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: default avatarIustin Pop <iustin@google.com>
    Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
lvmstrap 27 KB