7 instance=prod.vbz.ffzg.hr
8 instance=bookreader.rot13.org
11 zfs list -r $pool/block
13 test -e "/mnt/*" && df -h /mnt/* | grep -v aufs
15 du -hcs /$pool/ganeti/export/* | cut -d/ -f1,5
21 umount /mnt/$instance || true
22 zfs destroy $pool/block/$instance || true
24 zfs create -V $size -b 4k -s $pool/block/$instance
26 test -d /mnt/$instance || mkdir /mnt/$instance
29 echo -n "waiting for $1 "
30 while [ ! -e $1 ] ; do
37 wait_for /dev/zvol/$pool/block/$instance
39 label=`echo $instance | cut -d. -f1`
40 echo "label $label = $instance"
42 time mkfs.ext4 -m 0 -L $label /dev/zvol/$pool/block/$instance
44 wait_for /dev/disk/by-label/$label
46 mount /dev/disk/by-label/$label /mnt/$instance/
48 dump=`ls /$pool/ganeti/export/$instance/*.disk0*.snap`
50 zpool iostat 2 | tee /dev/shm/$instance &
52 ( while true; do zfs list $pool/block/$instance ; sleep 10 ; done ) &
58 wc -l /dev/shm/$instance