X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=etc%2Fdefaults.sh;h=330c7a0a48fd786666840a94632a41224bd1d9d4;hb=a06634fe32eac7b42b003a99a11b3b527f7e7cd9;hp=f9d914472d5e1bc45fc43eec93412ba6c49aef31;hpb=cd49d811dbd870e40ba1eb9e9763b656c54a89db;p=ganeti-extstorage-zfs diff --git a/etc/defaults.sh b/etc/defaults.sh index f9d9144..330c7a0 100644 --- a/etc/defaults.sh +++ b/etc/defaults.sh @@ -1,5 +1,5 @@ # debugging options -#set -x +set -x #set >&2 dir=/usr/share/ganeti/extstorage/zfs/ @@ -13,8 +13,20 @@ test -e $host_config && . $host_config # lz4 compression with low cpu operhead which always helps test -z "$EXTP_CREATE" && EXTP_CREATE="-s -b 4k -o compression=lz4" -# on zfs destroy remove snapshots of instance disks -test -z "$EXTP_DESTROY" && EXTP_DESTROY="-r" +# on zfs destroy remove dependent snapshots +test -z "$EXTP_DESTROY" && EXTP_DESTROY="-R" # emulate VG configured in cluster for wrapper scripts in sbin test -z "$EXTP_VG" && EXTP_VG='ffzgvg' + +# zfs pool and file system (existing) where to create block devices +test -z "$EXTP_ZFS" && EXTP_ZFS=tmp500g/$EXTP_VG + +# show numbers without compression for volume sizes +test -z "$EXTP_USED" && EXTP_USED=logicalused + +export VOL_NAME + +zfs_get() { +zfs get $1 -o value -p -H $EXTP_ZFS/$VOL_NAME +}