mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
CLOUDSTACK-7345 changed dd blocksize to 128k when using NFS.
Signed-off-by: Daan Hoogland <daan@onecht.net> (cherry picked from commit 8b7130fa65a3ce010a54015b3350b94b56414462)
This commit is contained in:
parent
a38bb389b2
commit
7c92bac4a3
@ -200,8 +200,13 @@ def isfile(path, isISCSI):
|
|||||||
def copyfile(fromFile, toFile, isISCSI):
|
def copyfile(fromFile, toFile, isISCSI):
|
||||||
logging.debug("Starting to copy " + fromFile + " to " + toFile)
|
logging.debug("Starting to copy " + fromFile + " to " + toFile)
|
||||||
errMsg = ''
|
errMsg = ''
|
||||||
|
if isISCSI:
|
||||||
|
bs = "4M"
|
||||||
|
else:
|
||||||
|
bs = "128k"
|
||||||
|
|
||||||
try:
|
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)
|
txt = util.pread2(cmd)
|
||||||
except:
|
except:
|
||||||
try:
|
try:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user