From 00a61d74a5f7339c79fadc708c8f89abaf5025d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Gonz=C3=A1lez?= Date: Thu, 18 Nov 2021 12:38:14 +0100 Subject: [PATCH] M #: Fix minor bug on LVM delete operation (#1584) If ZERO_LVM_ON_DELETE is not set the lock name will be undefined when trying to remove the device. --- src/tm_mad/fs_lvm/delete | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/tm_mad/fs_lvm/delete b/src/tm_mad/fs_lvm/delete index dcd025663f..f1476c1617 100755 --- a/src/tm_mad/fs_lvm/delete +++ b/src/tm_mad/fs_lvm/delete @@ -68,6 +68,8 @@ DEV=$($SSH "$DST_HOST" "readlink $DST_PATH 2> /dev/null | grep \"^/dev/\"") if [ -n "$DEV" ]; then + LOCK="tm-fs_lvm-${DS_SYS_ID}.lock" + if [ "${ZERO_LVM_ON_DELETE}" = "yes" ]; then # Activate device ACTIVATE_CMD=$(cat <