CLOUDSTACK-7345 changed dd blocksize to 128k when using NFS.

Signed-off-by: Daan Hoogland <daan@onecht.net>
This commit is contained in:
Brenn Oosterbaan 2014-08-14 09:35:14 +02:00 committed by Daan Hoogland
parent 47fee57312
commit 8b7130fa65
1 changed files with 6 additions and 1 deletions

View File

@ -200,8 +200,13 @@ def isfile(path, isISCSI):
def copyfile(fromFile, toFile, isISCSI):
logging.debug("Starting to copy " + fromFile + " to " + toFile)
errMsg = ''
if isISCSI:
bs = "4M"
else:
bs = "128k"
try:
cmd = ['dd', 'if=' + fromFile, 'iflag=direct', 'of=' + toFile, 'oflag=direct', 'bs=4M']
cmd = ['dd', 'if=' + fromFile, 'iflag=direct', 'of=' + toFile, 'oflag=direct', 'bs=' + bs]
txt = util.pread2(cmd)
except:
try: