1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-01-07 17:17:41 +03:00

feature #1240: fix bugs and typos in lvm drivers

This commit is contained in:
Jaime Melis 2012-06-14 18:21:11 +02:00
parent 17b9a0699e
commit f6793ad087
2 changed files with 4 additions and 4 deletions

View File

@ -60,7 +60,6 @@ DEV="/dev/$VG_NAME/$LV_NAME"
let TID=ID+BASE_TID
RM_COMMAND=$(cat <<EOF
$SUDO $(tgtadm_target_delete "$TID")
$SUDO $LVREMOVE -f $VG_NAME/$LV_NAME
EOF
)

View File

@ -42,8 +42,9 @@ DST_HOST=`arg_host $DST`
# Delete the device if it's a clone (LVM snapshot)
DELETE_CMD=$(cat <<EOF
DEV=\$(readlink $DST_PATH)
VM=$(basename \$DEV|cut -d- -f4)
DISK_ID=$(basename \$DEV|cut -d- -f5)
LV=\$(basename \$DEV)
VM=$(echo \$LV|cut -d- -f4)
DISK_ID=$(echo \$LV|cut -d- -f5)
if [ -n "\$VM" -a -n "\$DISK_ID" ]; then
$SUDO $LVREMOVE -f \$DEV
@ -54,7 +55,7 @@ EOF
if [ `is_disk $DST_PATH` -eq 1 ]; then
# Disk
ssh_exec_and_log "$DST_HOST" "$DELETE_CMD" \
"Error deleting $DST_PAtH"
"Error deleting $DST_PATH"
else
# Directory
log "Deleting $DST_PATH"