|
|
b9f7b3 |
diff --git a/usr/share/rear/layout/save/default/335_remove_excluded_multipath_vgs.sh b/usr/share/rear/layout/save/default/335_remove_excluded_multipath_vgs.sh
|
|
|
b9f7b3 |
index 040e9eec..e731c994 100644
|
|
|
b9f7b3 |
--- a/usr/share/rear/layout/save/default/335_remove_excluded_multipath_vgs.sh
|
|
|
b9f7b3 |
+++ b/usr/share/rear/layout/save/default/335_remove_excluded_multipath_vgs.sh
|
|
|
b9f7b3 |
@@ -19,9 +19,9 @@ while read lvmdev name mpdev junk ; do
|
|
|
b9f7b3 |
# Remember, multipath devices from a volume group that is "excluded" should be 'commented out'
|
|
|
b9f7b3 |
device=$(echo $mpdev | cut -c1-45)
|
|
|
b9f7b3 |
while read LINE ; do
|
|
|
b9f7b3 |
- # Now we need to comment all lines that contain "$devices" in the LAYOUT_FILE
|
|
|
b9f7b3 |
+ # Now we need to comment all lines that contain "$device" in the LAYOUT_FILE
|
|
|
b9f7b3 |
sed -i "s|^$LINE|\#$LINE|" "$LAYOUT_FILE"
|
|
|
b9f7b3 |
- done < <(grep "$device" $LAYOUT_FILE | grep -v "^#")
|
|
|
b9f7b3 |
+ done < <(grep " $device " $LAYOUT_FILE | grep -v "^#")
|
|
|
b9f7b3 |
Log "Excluding multipath device $device"
|
|
|
b9f7b3 |
done < <(grep "^#lvmdev" $LAYOUT_FILE)
|
|
|
b9f7b3 |
|
|
|
b9f7b3 |
@@ -31,7 +31,7 @@ done < <(grep "^#lvmdev" $LAYOUT_FILE)
|
|
|
b9f7b3 |
while read LINE ; do
|
|
|
b9f7b3 |
# multipath /dev/mapper/360060e8007e2e3000030e2e300002065 /dev/sdae,/dev/sdat,/dev/sdbi,/dev/sdp
|
|
|
b9f7b3 |
device=$(echo $LINE | awk '{print $2}' | cut -c1-45)
|
|
|
b9f7b3 |
- num=$(grep "$device" $LAYOUT_FILE | grep -v "^#" | wc -l)
|
|
|
b9f7b3 |
+ num=$(grep " $device " $LAYOUT_FILE | grep -v "^#" | wc -l)
|
|
|
b9f7b3 |
if [ $num -lt 2 ] ; then
|
|
|
b9f7b3 |
# If the $device is only seen once (in a uncommented line) then the multipath is not in use
|
|
|
b9f7b3 |
sed -i "s|^$LINE|\#$LINE|" "$LAYOUT_FILE"
|