7 #vol_opt="-b 4k -s -o compression=lz4"
10 zfs list -r $pool/block
12 test ! -z "/mnt/*" && df -h /mnt/* | grep -v aufs
14 du -hcs /$pool/ganeti/export/* | cut -d/ -f1,5
20 umount /mnt/$instance || true
21 zfs destroy $pool/block/$instance || true
23 zfs create -V $size $vol_opt $pool/block/$instance
25 test -d /mnt/$instance || mkdir /mnt/$instance
28 echo -n "waiting for $1 "
29 while [ ! -e $1 ] ; do
36 wait_for /dev/zvol/$pool/block/$instance
38 label=`echo $instance | cut -d. -f1`
39 echo "label $label = $instance"
41 time mkfs.ext4 -m 0 -L $label /dev/zvol/$pool/block/$instance
43 wait_for /dev/disk/by-label/$label
45 mount /dev/disk/by-label/$label /mnt/$instance/
47 dump=`ls /$pool/ganeti/export/$instance/*.disk0*.snap`
49 zpool iostat 2 | tee /dev/shm/$instance &
51 ( while true; do zfs list $pool/block/$instance ; sleep 10 ; done ) &
57 wc -l /dev/shm/$instance