diff options
Diffstat (limited to 'testModule/hooks/pre-mount.sh')
| -rwxr-xr-x | testModule/hooks/pre-mount.sh | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/testModule/hooks/pre-mount.sh b/testModule/hooks/pre-mount.sh index 00871764..548e748d 100755 --- a/testModule/hooks/pre-mount.sh +++ b/testModule/hooks/pre-mount.sh @@ -1,12 +1,15 @@ -# TODO -warn '............PRE-MOUNT.............' - -insmod /usr/lib/modules/3.10.0-229.1.2.el7.x86_64/extra/dnbd3.ko -local dnbd3_device_node="$(dnbd3-client -h 132.230.4.1 -i stage4/torben/test \ - -r 1 -d /dev/dnbd0)" -dnbd3_device_node='/dev/dnbd0' -qemu-img create -f qcow2 -o backing_file="$dnbd3_device_node",backing_fmt=qcow2 /test.qcow2 -insmod /usr/lib/modules/3.10.0-229.1.2.el7.x86_64/extra/nbd.ko -# NOTE: "--persistent" doesn't work with wrapper. -#systemd_preserve_process_marker /usr/bin/qemu-nbd --connect=/dev/nbd0 /test.qcow2 --socket /qemu-nbd-TEST -/usr/bin/qemu-nbd-systemd-mark --connect=/dev/nbd0 /test.qcow2 --socket /qemu-nbd-TEST +if [ $PRE_MOUNT_READY ]; then + warn '............PRE-MOUNT ALREADY DONE.............' +else + export PRE_MOUNT_READY=true + warn '............PRE-MOUNT.............' + #insmod /usr/lib/modules/3.10.0-229.1.2.el7.x86_64/extra/dnbd3.ko + #local dnbd3_device_node="$(dnbd3-client -h 132.230.4.1 -i stage4/torben/test \ + # -r 1 -d /dev/dnbd0)" + #dnbd3_device_node='/dev/dnbd0' + #qemu-img create -f qcow2 -o backing_file="$dnbd3_device_node",backing_fmt=qcow2 /test.qcow2 + qemu-img create -f qcow2 /run/test.qcow2 100M + insmod /usr/lib/modules/3.10.0-229.1.2.el7.x86_64/extra/nbd.ko + /usr/bin/qemu-nbd-systemd-mark-alternate --connect=/dev/nbd0 /run/test.qcow2 --socket /run/qemu-nbd-TEST --aio=native + #--persistent +fi |
