From 0c32d5e0095b0f8944ef907458de332ecf38cc4c Mon Sep 17 00:00:00 2001 From: Dieter Plaetinck Date: Sat, 13 Dec 2008 12:39:40 +0100 Subject: workaround missing VG device files --- src/core/libs/lib-blockdevices-filesystems.sh | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/core/libs/lib-blockdevices-filesystems.sh b/src/core/libs/lib-blockdevices-filesystems.sh index 841a694..357f266 100644 --- a/src/core/libs/lib-blockdevices-filesystems.sh +++ b/src/core/libs/lib-blockdevices-filesystems.sh @@ -445,6 +445,10 @@ process_filesystems () [ "$part_type" = lvm-vg ] && ( vgremove -f $part || show_warning "process_filesystems blockdevice destruction" "Could not vgremove -f $part") [ "$part_type" = lvm-lv ] && ( lvremove -f $part || show_warning "process_filesystems blockdevice destruction" "Could not lvremove -f $part") [ "$part_type" = dm_crypt ] && ( cryptsetup luksClose $part || show_warning "process_filesystems blockdevice destruction" "Could not cryptsetup luksClose $part") + elif [ "$part_type" = lvm-vg ] && vgdisplay $part | grep -q 'VG Name' # workaround for non-existing lvm VG device files + then + infofy "Attempting destruction of device $part (type $part_type)" disks + [ "$part_type" = lvm-vg ] && ( vgremove -f $part || show_warning "process_filesystems blockdevice destruction" "Could not vgremove -f $part") else debug "Skipping destruction of device $part (type $part_type) because it doesn't exist" fi -- cgit v1.2.3-54-g00ecf