2 |
|
|
3 |
pool=workshop |
pool=workshop |
4 |
|
|
|
instance=koha.ffzg.hr |
|
5 |
size=60G |
size=60G |
6 |
instance=prod.vbz.ffzg.hr |
vol_opt="-b 4k -s" |
7 |
instance=bookreader.rot13.org |
#vol_opt="-b 4k -s -o compression=lz4" |
8 |
|
|
9 |
if [ -z "$1" ] ; then |
if [ -z "$1" ] ; then |
10 |
zfs list -r $pool/block |
zfs list -r $pool/block |
11 |
echo |
echo |
12 |
test -e "/mnt/*" && df -h /mnt/* | grep -v aufs |
test ! -z "/mnt/*" && df -h /mnt/* | grep -v aufs |
13 |
echo |
echo |
14 |
du -hcs /$pool/ganeti/export/* | cut -d/ -f1,5 |
du -hcs /$pool/ganeti/export/* | cut -d/ -f1,5 |
15 |
exit 1 |
exit 1 |
20 |
umount /mnt/$instance || true |
umount /mnt/$instance || true |
21 |
zfs destroy $pool/block/$instance || true |
zfs destroy $pool/block/$instance || true |
22 |
|
|
23 |
zfs create -V $size -b 4k -s $pool/block/$instance |
zfs create -V $size $vol_opt $pool/block/$instance |
24 |
|
|
25 |
test -d /mnt/$instance || mkdir /mnt/$instance |
test -d /mnt/$instance || mkdir /mnt/$instance |
26 |
|
|