mirror of
https://github.com/OpenNebula/one.git
synced 2025-01-11 05:17:41 +03:00
Fix RB_FORMAT issues
This commit is contained in:
parent
ccc47d6534
commit
2b5164b195
@ -56,7 +56,7 @@ RBD_SNAP="${VM_ID}-${DISK_ID}"
|
||||
CLONE_CMD=$(cat <<EOF
|
||||
set -e
|
||||
|
||||
RBD_FORMAT=`rbd info $SRC_PATH | sed -n 's/.*format: // p'`
|
||||
RBD_FORMAT=\$(rbd info $SRC_PATH | sed -n 's/.*format: // p')
|
||||
|
||||
if [ "\$RBD_FORMAT" = "2" ]; then
|
||||
$RBD snap create "$SRC_PATH@$RBD_SNAP"
|
||||
|
@ -91,7 +91,7 @@ log "Deleting $DST_PATH"
|
||||
DELETE_CMD=$(cat <<EOF
|
||||
set -e
|
||||
|
||||
RBD_FORMAT=`rbd info $SRC_PATH | sed -n 's/.*format: // p'`
|
||||
RBD_FORMAT=\$(rbd info $RBD_SRC | sed -n 's/.*format: // p')
|
||||
|
||||
$RBD rm $RBD_SRC
|
||||
|
||||
|
@ -80,9 +80,9 @@ log "Dumping $RBD_DST to $DST"
|
||||
DUMP_CMD=$(cat <<EOF
|
||||
set -e
|
||||
|
||||
RBD_FORMAT=`rbd info $SRC_PATH | sed -n 's/.*format: // p'`
|
||||
RBD_FORMAT=\$(rbd info $RBD_DST | sed -n 's/.*format: // p')
|
||||
|
||||
if [ "\$RBD_FORMAT" = "2" ]; then
|
||||
if [ "\${RBD_FORMAT}" = "2" ]; then
|
||||
$RBD flatten $RBD_DST
|
||||
$RBD snap unprotect $RBD_SRC@$RBD_SNAP
|
||||
$RBD snap rm $RBD_SRC@$RBD_SNAP
|
||||
|
Loading…
Reference in New Issue
Block a user