Skip to content

Commit 4e1527e

Browse files
committed
use directIO flags when dd'ing template
This makes sure dom0 in xenserver doesn't get hammered when copying templates. It doesn't make sense to use the cache of dom0 as the template does not fit in memory. The directIO flags prevent it from trying.
1 parent 85bb685 commit 4e1527e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/vm/hypervisor/xenserver/copy_vhd_from_secondarystorage.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ copyvhd()
104104
exit 0
105105
fi
106106
if [ "${parent##*vhd has}" = " no parent" ]; then
107-
dd if=$srcvhd of=$desvhd bs=2M
107+
dd if=$srcvhd of=$desvhd bs=2M oflag=direct iflag=direct
108108
if [ $? -ne 0 ]; then
109109
echo "31#failed to dd $srcvhd to $desvhd"
110110
cleanup

0 commit comments

Comments
 (0)