[Ovirt-devel] [PATCH node] Use vg uuid when detecting whether vg spans multiple disks

Mike Burns mburns at redhat.com
Fri Mar 26 13:09:42 UTC 2010


In the case where there are multiple volume groups with the same
name, the only way to differentiate is with the uuid.  Now we will
compare uuid's so we don't report the the vg spans multiple disks
when it's a duplicate id.

Signed-off-by: Mike Burns <mburns at redhat.com>
---
 scripts/ovirt-config-storage |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/scripts/ovirt-config-storage b/scripts/ovirt-config-storage
index 8d59a6b..9d8c482 100755
--- a/scripts/ovirt-config-storage
+++ b/scripts/ovirt-config-storage
@@ -563,9 +563,9 @@ wipe_lvm_on_disk()
     if [[ "$dev" =~ "/dev/sd" ]]; then
         part_delim=""
     fi
-    for vg in $(pvs -o vg_name --noheadings $dev $dev${dev_delim}[0-9]* 2>/dev/null|sort -u); do
-        if pvs -o pv_name,vg_name --noheadings | \
-            grep $vg | egrep -v -q "${dev}${part_delim}[0-9]+|${dev}" 2>/dev/null; then
+    for vg in $(pvs -o vg_uuid --noheadings $dev $dev${dev_delim}[0-9]* 2>/dev/null|sort -u); do
+        if pvs -o pv_name,vg_uuid --noheadings | \
+            grep $vg | egrep -v -q "${dev}${part_delim}[0-9]+|${dev} " 2>/dev/null; then
             log "The volume group \"$vg\" spans multiple disks."
             log "This operation cannot complete.  Please manually"
             log "cleanup the storage using standard linux tools."
-- 
1.6.6.1




More information about the ovirt-devel mailing list