gnt-instance move works only to zfs
[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 list volumes, show size or snapshots.
60
61
62 arh-hw:/usr/share/ganeti/extstorage/zfs# ./bin/list 
63 NAME                                                           USED  AVAIL  REFER  MOUNTPOINT
64 tmp500g/block                                                  612M  87.2G    30K  /tmp500g/block
65 tmp500g/block/af1a90e8-0566-4cbf-bc8c-99fc82b67ce3.ext.disk0   612M  87.2G   610M  -
66
67
68 arh-hw:/usr/share/ganeti/extstorage/zfs# ./bin/size 
69 NAME                                                          PROPERTY  VALUE    SOURCE
70 tmp500g/block/af1a90e8-0566-4cbf-bc8c-99fc82b67ce3.ext.disk0  volsize   11G      local
71
72
73 arh-hw:/usr/share/ganeti/extstorage/zfs# ./bin/snapshots 
74 NAME                                                                      USED  AVAIL  REFER  MOUNTPOINT
75 tmp500g/block@etckeeper                                                      0      -    30K  -
76 tmp500g/block/af1a90e8-0566-4cbf-bc8c-99fc82b67ce3.ext.disk0@2014-06-24  2.64M      -   610M  -
77
78 KNOWN BUGS
79
80 - in current ganeti, gnt-backup export doesn't work because extstorage
81   snapshoot hook is not available
82 - gnt-instance move works from somewhere to zfs, but not from zfs to somewhere