#!/bin/sh -e
-pool=workshop
+pool=`zfs list -H -o name | head -1` # use first pool as target for zvol
+ganeti_export=/var/lib/ganeti/export
size=60G
vol_opt="-b 4k -s"
if [ -z "$1" ] ; then
zfs list -r $pool/block
+# echo
+# test ! -z "/mnt/*" && df -h /mnt/* | grep -v aufs
echo
- test ! -z "/mnt/*" && df -h /mnt/* | grep -v aufs
- echo
- du -hcs /$pool/ganeti/export/* | cut -d/ -f1,5
+ du -hcs $ganeti_export/* | cut -d/ -f1,6 | sed 's,/,,'
exit 1
else
instance=$1
mount /dev/disk/by-label/$label /mnt/$instance/
cd /mnt/$instance/
-dump=`ls /$pool/ganeti/export/$instance/*.disk0*.snap`
+dump=`ls $ganeti_export/$instance/*.disk0*.snap`
ls -alh $dump
zpool iostat 2 | tee /dev/shm/$instance &
pid_iostat=$!