make gnt-node work with vg and lv emulation
[ganeti-extstorage-zfs] / README
1 Ganet extstorage provider for local zfs volumes
2
3 http://docs.ganeti.org/ganeti/master/html/man-ganeti-extstorage-interface.html
4
5 INSTALLATION
6
7 On node which has zfs storage pool
8
9   cd /usr/share/ganeti/extstorage/
10   git clone https://github.com/ffzg/ganeti-extstorage-zfs zfs
11   cd zfs
12   vi defaults.sh
13
14 You need to specify zfs filesystem under which block devices will be created.
15
16 Now ssh into ganeti master node and do following:
17
18 1. enable new disk template
19
20   gnt-cluster modify --enabled-disk-templates plain,drbd,ext \
21         --ipolicy-disk-templates plain,drbd,ext
22
23 2. create log directory
24
25   mkdir /var/log/ganeti/extstorage
26
27 3. try instance creation with something similar to
28
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
36
37 4. install helper scripts for daily block snapshots
38
39   ln -sf /usr/share/ganeti/extstorage/zfs/bin/daily-block-snapshot /etc/cron.daily/
40
41 5. install lvm wrapper scripts to report zfs volumes as lv
42
43   find /usr/share/ganeti/extstorage/zfs/sbin/ -type f | xargs -i ln -v -s -f {} /sbin/
44
45 This scripts enable gnt-node commands to work:
46
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
50
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
55
56
57 HELPER SCRIPTS
58
59 Helper scripts in bin directory to list volumes, show size or snapshots.
60
61
62 KNOWN BUGS
63
64 - in current ganeti, gnt-backup export doesn't work because extstorage
65   snapshoot hook is not available