mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-25 02:50:08 +03:00
Bug #1635: fix for common, iscsi and lvm
This commit is contained in:
parent
627058c341
commit
6ce0a5b079
@ -36,16 +36,12 @@ fi
|
||||
. $TMCOMMON
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Return if deleting a disk, we will delete them when removing the
|
||||
# Return if deleting a disk, we will delete them when removing the
|
||||
# remote_system_ds directory for the VM (remotely)
|
||||
#-------------------------------------------------------------------------------
|
||||
DST_PATH=`arg_path $DST`
|
||||
DST_HOST=`arg_host $DST`
|
||||
|
||||
if [ `is_disk $DST_PATH` -eq 1 ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
log "Deleting $DST_PATH"
|
||||
ssh_exec_and_log $DST_HOST "rm -rf $DST_PATH" "Error deleting $DST_PATH"
|
||||
|
||||
|
@ -124,6 +124,9 @@ DELETE_CMD=$(cat <<EOF
|
||||
|
||||
# remove lv
|
||||
$SUDO $LVREMOVE -f $VG_NAME/$TARGET_LV_NAME
|
||||
|
||||
# remove link
|
||||
rm -f $DST_PATH
|
||||
EOF
|
||||
)
|
||||
|
||||
|
@ -43,6 +43,9 @@ DST_HOST=`arg_host $DST`
|
||||
DELETE_CMD=$(cat <<EOF
|
||||
DEV=\$(readlink $DST_PATH)
|
||||
$SUDO $LVREMOVE -f \$DEV
|
||||
|
||||
# remove link
|
||||
rm -f $DST_PATH
|
||||
EOF
|
||||
)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user