Don't fail on initial blockdev stuff
This commit is contained in:
parent
d0af376e8c
commit
fa954988a9
|
@ -604,14 +604,14 @@ fi
|
||||||
|
|
||||||
echo -n "Unmounting potential partitions on target device... "
|
echo -n "Unmounting potential partitions on target device... "
|
||||||
for mount in $( mount | grep "${target_disk}" | awk '{ print $3 }' | sort -r ); do
|
for mount in $( mount | grep "${target_disk}" | awk '{ print $3 }' | sort -r ); do
|
||||||
umount -f ${mount} >&2
|
umount -f ${mount} >&2 || true
|
||||||
done
|
done
|
||||||
echo "done."
|
echo "done."
|
||||||
|
|
||||||
echo -n "Unmounting potential LVM logical volumes on target device... "
|
echo -n "Unmounting potential LVM logical volumes on target device... "
|
||||||
for vg in $( pvscan | grep "${target_disk}" | awk '{ print $4 }' ); do
|
for vg in $( pvscan | grep "${target_disk}" | awk '{ print $4 }' ); do
|
||||||
for mount in $( mount | grep "/${vg}" | awk '{ print $3 }' | sort -r ); do
|
for mount in $( mount | grep "/${vg}" | awk '{ print $3 }' | sort -r ); do
|
||||||
umount -f ${mount} >&2
|
umount -f ${mount} >&2 || true
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
echo "done."
|
echo "done."
|
||||||
|
@ -621,13 +621,13 @@ for vg in $( pvscan | grep "${target_disk}" | awk '{ print $4 }' ); do
|
||||||
vgchange -an ${vg} >&2 || true
|
vgchange -an ${vg} >&2 || true
|
||||||
sleep 1
|
sleep 1
|
||||||
vgchange -an ${vg} >&2
|
vgchange -an ${vg} >&2
|
||||||
yes | vgremove ${vg}
|
yes | vgremove -f ${vg} || true
|
||||||
done
|
done
|
||||||
echo "done."
|
echo "done."
|
||||||
|
|
||||||
echo -n "Removing existing LVM physical volumes... "
|
echo -n "Removing existing LVM physical volumes... "
|
||||||
for pv in $( pvcscan | grep "${target_disk}" | awk '{ print $2 }' ); do
|
for pv in $( pvcscan | grep "${target_disk}" | awk '{ print $2 }' ); do
|
||||||
yes | pvremove ${pv}
|
yes | pvremove -f ${pv} || true
|
||||||
done
|
done
|
||||||
echo "done."
|
echo "done."
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue