1 Ganet extstorage provider for local zfs volumes
3 http://docs.ganeti.org/ganeti/master/html/man-ganeti-extstorage-interface.html
7 On node which has zfs storage pool
9 cd /usr/share/ganeti/extstorage/
10 git clone https://github.com/ffzg/ganeti-extstorage-zfs zfs
14 You need to specify zfs filesystem under which block devices will be created.
16 Now ssh into ganeti master node and do following:
18 1. enable new disk template
20 gnt-cluster modify --enabled-disk-templates plain,drbd,ext \
21 --ipolicy-disk-templates plain,drbd,ext
23 2. create log directory
25 mkdir /var/log/ganeti/extstorage
27 3. try instance creation with something similar to
29 gnt-instance add -t ext --disk=0:size=10G,provider=zfs \
30 --net 0:mode=bridged,link=br1001 \
31 --net 1:mode=bridged,link=br0060 \
32 --net 2:mode=bridged,link=br0080 \
33 --no-name-check --no-ip-check \
34 -o debootstrap+default \
35 -B maxmem=1G -n arh-hw zfs
37 4. install helper scripts for daily block snapshots
39 ln -sf /usr/share/ganeti/extstorage/zfs/bin/daily-block-snapshot /etc/cron.daily/
41 5. install lvm wrapper scripts to report zfs volumes as lv
43 find /usr/share/ganeti/extstorage/zfs/sbin/ -type f | xargs -i ln -v -s -f {} /sbin/
45 This scripts enable gnt-node commands to work:
47 root@vmh02:/home/dpavlin# gnt-node list arh-hw
48 Node DTotal DFree MTotal MNode MFree Pinst Sinst
49 arh-hw.gnt.ffzg.hr 87.8G 87.2G 7.8G 252M 5.6G 1 0
51 root@vmh02:/home/dpavlin# gnt-node list-storage arh-hw
52 Node Type Name Size Used Free Allocatable
53 arh-hw.gnt.ffzg.hr lvm-vg arh-hw 190.0G 62.7G 127.3G Y
54 arh-hw.gnt.ffzg.hr lvm-vg ffzgvg 87.8G 610M 87.2G Y
59 Helper scripts in bin directory to list volumes, show size or snapshots.
64 - in current ganeti, gnt-backup export doesn't work because extstorage
65 snapshoot hook is not available