Mike Burns
2010-Mar-23 14:32 UTC
[Ovirt-devel] [PATCH node] Filter out /dev/dm-* devices from device list
dm-* devices are references to existing /dev/sd* and /dev/mapper/<wwid>. We should not depend on them and only present /dev/sd* and /dev/mapper/<wwid> to the user. Signed-off-by: Mike Burns <mburns at redhat.com> --- scripts/ovirt-config-storage | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/ovirt-config-storage b/scripts/ovirt-config-storage index 34e84e5..e4b6c98 100755 --- a/scripts/ovirt-config-storage +++ b/scripts/ovirt-config-storage @@ -307,14 +307,15 @@ get_dev_name() devices="$devices /dev/mapper/$dev" local sd_devs="" get_multipath_devices $dev sd_devs - devs_to_remove="${devs_to_remove} ${sd_devs}" + local dm_dev=$(multipath -ll $dev | grep $dev | sed -r 's/^.*(dm-[0-9]+ ).*$/\1/') + devs_to_remove="${devs_to_remove} ${sd_devs} $dm_dev" done # Remove /dev/sd* devices that are part of a multipath device local dev_list for dev in $devices do - if [[ ! "$devs_to_remove" =~ "$(basename $dev)" ]]; then + if [[ ! "$devs_to_remove" =~ "$(basename $dev) " ]]; then dev_list="$dev_list $dev" fi done -- 1.6.6.1
Maybe Matching Threads
- [PATCH node] Handle space in storage wwid
- [PATCH node] First draft of replacing some of the ovirt-config-* scripts with python equivalents.
- New Storage related patches
- [PATCH] Replace the HAL calls with udev/systool calls.
- [PATCH][node REPOST] Improve performance of multipath translations