VM clone speed improvement for shared storage clouds

Overview

This guide (extracted from this mail from Jhon Masschelein) shows how to improve clone speed for shared storage clouds

Guide

Substitute the $DST_HOST with the address of the NFS file-server, so that the 'cp' is performed locally and not over the network in src/tm_mad/shared/clone:

*)
    log "Cloning $SRC_PATH in $DST"
    ssh_exec_and_log $DST_HOST \
                     "cd $DST_DIR; cp -r $SRC_PATH $DST_PATH" \
                     "Error copying $SRC to $DST"
    ;;
esac

Keep in mind that you need SSH password-less access to the NFS file-server from the frontend for this to work.

You can replace the $DST_HOST with

DST_HOST=`mount|grep " $DST_DS_PATH "|cut -d ':' -f 1`

in the /var/lib/one/remotes/tm/shared/clone.

You can use cp –reflink=auto for COW filesystems like btrfs.

*)
    log "Cloning $SRC_PATH in $DST"
    ssh_exec_and_log $DST_HOST \
                     "cd $DST_DIR; cp -r --reflink=auto $SRC_PATH $DST_PATH" \
                     "Error copying $SRC to $DST"
    ;;
esac
local_scp_tm_shared · Last modified: 2013/11/21 16:01 by dad
Admin · Login