update bin commands
[ganeti-extstorage-zfs] / etc / defaults.sh
1 # debugging options
2 #set -x
3 #set >&2
4
5 dir=/usr/share/ganeti/extstorage/zfs/
6
7 host_config=$dir/etc/`hostname -s`.sh
8 test -e $host_config && . $host_config
9
10 # parameters for zfs create, by default
11 # -s    sparse
12 # -b 4k block size sutable for ext4 filesystem which ganeti uses
13 # lz4   compression with low cpu operhead which always helps
14 test -z "$EXTP_CREATE" && EXTP_CREATE="-s -b 4k -o compression=lz4"
15
16 # on zfs destroy remove dependent snapshots
17 test -z "$EXTP_DESTROY" && EXTP_DESTROY="-R"
18
19 # emulate VG configured in cluster for wrapper scripts in sbin
20 test -z "$EXTP_VG" && EXTP_VG='ffzgvg'
21
22 # zfs pool and file system (existing) where to create block devices
23 test -z "$EXTP_ZFS" && EXTP_ZFS=tmp500g/$EXTP_VG
24
25 export VOL_NAME
26
27 zfs_get() {
28 zfs get $1 -o value -p -H $EXTP_ZFS/$VOL_NAME
29 }