B #266: Fix GROW_ROOTFS and GROW_FS on btrfs

Signed-off-by: Petr Ospalý <pospaly@opennebula.io>
pull/270/head
Petr Ospalý 2 years ago
parent 3be568eff0
commit 19a280c91b
No known key found for this signature in database
GPG Key ID: 96B7C54C30DA9F72

@ -224,7 +224,8 @@ for _FS in ${GROW_FS} ; do
LVM=$(lvdisplay "${DEVICE}" 2>/dev/null | wc -l) LVM=$(lvdisplay "${DEVICE}" 2>/dev/null | wc -l)
if [ "$LVM" -eq 0 ]; then if [ "$LVM" -eq 0 ]; then
DEVICE=$(findmnt -ln -o SOURCE "$_FS") # findmnt support --nofsroot since util-linux v2.19.1
DEVICE=$(findmnt -ln -o SOURCE --nofsroot "$_FS")
DISK=$(echo "$DEVICE" | sed 's/[0-9]*$//') DISK=$(echo "$DEVICE" | sed 's/[0-9]*$//')
PARTITION=$(echo "$DEVICE" | sed "s|^$DISK||") PARTITION=$(echo "$DEVICE" | sed "s|^$DISK||")
LVM="no" LVM="no"

Loading…
Cancel
Save