tm-ceph.patch

Ruben S. Montero, 12/12/2014 01:13 PM

Download (1.15 KB)

View differences:

clone 2014-12-11 09:32:18.882111020 +0100
76 76
CLONE_CMD=$(cat <<EOF
77 77
    set -e
78 78

  
79
    RBD_FORMAT=\$($RBD info $SRC_PATH | sed -n 's/.*format: // p')
80

  
81
    if [ "\$RBD_FORMAT" = "2" ]; then
82
        $RBD snap create "$SRC_PATH@$RBD_SNAP"
83
        $RBD snap protect "$SRC_PATH@$RBD_SNAP"
84
        $RBD clone "$SRC_PATH@$RBD_SNAP" $RBD_DST
85
    else
86
        $RBD copy $SRC_PATH $RBD_DST
79
    if ! $RBD info $RBD_DST; then
80
        RBD_FORMAT=\$($RBD info $SRC_PATH | sed -n 's/.*format: // p')
81
        if [ "\$RBD_FORMAT" = "2" ]; then
82
            $RBD snap create "$SRC_PATH@$RBD_SNAP"
83
            $RBD snap protect "$SRC_PATH@$RBD_SNAP"
84
            $RBD clone "$SRC_PATH@$RBD_SNAP" $RBD_DST
85
        else
86
            $RBD copy $SRC_PATH $RBD_DST
87
        fi
87 88
    fi
88 89
EOF
89 90
)
90 91

  
91
-