mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
vdo: lvm_import_vdo script needs to continue when vgname does not exist
When the script cannot find vgname - it needs to continue to run.
This commit is contained in:
parent
bd2dae4643
commit
9db4ddabc1
@ -262,7 +262,7 @@ convert2lvm_() {
|
|||||||
if [ -z "$VGNAME" ] || [ "$VGNAME" = "$LVNAME" ] ; then
|
if [ -z "$VGNAME" ] || [ "$VGNAME" = "$LVNAME" ] ; then
|
||||||
VGNAME=${DEFAULT_NAME%/*}
|
VGNAME=${DEFAULT_NAME%/*}
|
||||||
# Find largest matching VG name to our 'default' vgname
|
# Find largest matching VG name to our 'default' vgname
|
||||||
LASTVGNAME=$(LC_ALL=C "$LVM" vgs -oname -O-name --noheadings -S name=~${VGNAME} | grep -E "$VGNAME[0-9]? ?" | head -1)
|
LASTVGNAME=$(LC_ALL=C "$LVM" vgs -oname -O-name --noheadings -S name=~${VGNAME} | grep -E "$VGNAME[0-9]? ?" | head -1 || true)
|
||||||
if test -n "$LASTVGNAME" ; then
|
if test -n "$LASTVGNAME" ; then
|
||||||
LASTVGNAME=${LASTVGNAME#*${VGNAME}}
|
LASTVGNAME=${LASTVGNAME#*${VGNAME}}
|
||||||
# If the number is becoming too high, try some random number
|
# If the number is becoming too high, try some random number
|
||||||
|
Loading…
Reference in New Issue
Block a user