]> xenbits.xensource.com Git - libvirt.git/commit
storage: Add new flag for libvirt_parthelper
authorJohn Ferlan <jferlan@redhat.com>
Thu, 7 Jan 2016 12:34:51 +0000 (07:34 -0500)
committerJohn Ferlan <jferlan@redhat.com>
Tue, 19 Jan 2016 18:02:59 +0000 (13:02 -0500)
commit020135dc855712d09b92a1c7ba3341cd22010f18
treec7a28145426e1d403d9202b475b3733d00afa333
parent4f84617078e26c4e2847b64559a82898d4044183
storage: Add new flag for libvirt_parthelper

https://bugzilla.redhat.com/show_bug.cgi?id=1265694

In order to be able to process disk storage pool's using a multipath
device to handle the partitions, libvirt_parthelper will need a way to
not automatically add a partition separator "p" to the generated device
name for each partition found. This is designed to mimic the multipath
features known as 'user_friendly_names' and custom 'alias' name.

If the part_separator attribute is set to "no", then generation of the
multipath partition name will not include the "p" partition separator
unless the source device path name ends with a number. The generated
partition names that get passed back to libvirt are processed in order
to find the device mapper multipath (dm-#) path device.

For example, device path "/dev/mapper/mpatha" would create partitions
"/dev/mapper/mpatha1", "/dev/mapper/mpatha2", etc. instead of
"/dev/mapper/mpathap1", "/dev/mapper/mpathap2", etc. If the device
path ends with a number "/dev/mapper/mpatha1", then the algorithm
to generate names "/dev/mapper/mpatha1p1", "/dev/mapper/mpatha1p2", etc.
would be utilized.

Signed-off-by: John Ferlan <jferlan@redhat.com>
src/storage/parthelper.c
src/storage/storage_backend_disk.c