[node-patches] Change in ovirt-node[master]: Try to wipe multipath devices by checking the UUID

rbarry at redhat.com rbarry at redhat.com
Thu Jun 26 14:28:20 UTC 2014


Ryan Barry has uploaded a new change for review.

Change subject: Try to wipe multipath devices by checking the UUID
......................................................................

Try to wipe multipath devices by checking the UUID

Since RD_NO_MULTIPATH is now set by default, and multipath does
not work in dracut, we need to check ourselves whether a disk
selected for wiping appears more than once.

Do this by checking whether or not LVM UUIDs match, since they
should be identical on identical disks.

Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1053505
Change-Id: Idd6ef9142bf516030988e0f66ad9dee30f4fe503
Signed-off-by: Ryan Barry <rbarry at redhat.com>
---
M dracut/ovirt-cleanup.sh
1 file changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/89/29289/1

diff --git a/dracut/ovirt-cleanup.sh b/dracut/ovirt-cleanup.sh
index 29b700e..7a44eff 100755
--- a/dracut/ovirt-cleanup.sh
+++ b/dracut/ovirt-cleanup.sh
@@ -150,6 +150,7 @@
         sed -i "s/locking_type =.*/locking_type = 0/" /etc/lvm/lvm.conf
     fi
     sdevs=$(lvm vgs -o pv_name,tags | grep storage_domain | while read line; do echo $line | awk '{print $1}'; done)
+    dev_uuid=$(lvm pvs -o pv_uuid --noheading ${device})
 
     IFS=$oldIFS
     for i in $(lvm pvs --noheadings -o pv_name,vg_name --separator=, $device 2>/dev/null); do
@@ -172,6 +173,11 @@
                     exit 1
                     fi
                 done
+                ipv_uuid=$(lvm pvs -o pv_uuid --noheading ${ipv})
+                if [ $dev_uuid = $ipv_uuid ]; then
+                    # Multipath device showing up multiple times
+                    imach=1
+                fi
                 if [ $imach -eq 0 ]; then
                     fatal "LV '$ipv' is a member of VG '$vg' and must be included in \$storage_init"
                     fatal "Not all member PVs of '$vg' are given in the storage_init parameter, exiting"


-- 
To view, visit http://gerrit.ovirt.org/29289
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idd6ef9142bf516030988e0f66ad9dee30f4fe503
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Ryan Barry <rbarry at redhat.com>



More information about the node-patches mailing list