]> git.proxmox.com Git - pve-docs.git/blame - pve-storage-zfs.adoc
vzdump: drop overly scary & outdated warning about fleecing
[pve-docs.git] / pve-storage-zfs.adoc
CommitLineData
93f65836
SI
1[[storage_zfs]]
2ZFS over ISCSI Backend
3----------------------
4ifdef::wiki[]
5:pve-toplevel:
6:title: Storage: ZFS over ISCSI
7endif::wiki[]
8
9Storage pool type: `zfs`
10
11This backend accesses a remote machine having a ZFS pool as storage and an iSCSI
12target implementation via `ssh`. For each guest disk it creates a ZVOL and,
13exports it as iSCSI LUN. This LUN is used by {pve} for the guest disk.
14
15The following iSCSI target implementations are supported:
16
17* LIO (Linux)
18* IET (Linux)
19* ISTGT (FreeBSD)
20* Comstar (Solaris)
21
22NOTE: This plugin needs a ZFS capable remote storage appliance, you cannot use
23it to create a ZFS Pool on a regular Storage Appliance/SAN
24
25
26Configuration
27~~~~~~~~~~~~~
28
29In order to use the ZFS over iSCSI plugin you need to configure the remote
30machine (target) to accept `ssh` connections from the {pve} node. {pve} connects to the target for creating the ZVOLs and exporting them via iSCSI.
31Authentication is done through a ssh-key (without password protection) stored in
32`/etc/pve/priv/zfs/<target_ip>_id_rsa`
33
34The following steps create a ssh-key and distribute it to the storage machine
35with IP 192.0.2.1:
36
37----
38mkdir /etc/pve/priv/zfs
39ssh-keygen -f /etc/pve/priv/zfs/192.0.2.1_id_rsa
40ssh-copy-id -i /etc/pve/priv/zfs/192.0.2.1_id_rsa.pub root@192.0.2.1
41ssh -i /etc/pve/priv/zfs/192.0.2.1_id_rsa root@192.0.2.1
42----
43
44The backend supports the common storage properties `content`, `nodes`,
45`disable`, and the following ZFS over ISCSI specific properties:
46
47pool::
48
49The ZFS pool/filesystem on the iSCSI target. All allocations are done within that
50pool.
51
52portal::
53
54iSCSI portal (IP or DNS name with optional port).
55
56target::
57
58iSCSI target.
59
60iscsiprovider::
61
62The iSCSI target implementation used on the remote machine
63
64comstar_tg::
65
66target group for comstar views.
67
68comstar_hg::
69
70host group for comstar views.
71
72lio_tpg::
73
74target portal group for Linux LIO targets
75
76nowritecache::
77
78disable write caching on the target
79
80blocksize::
81
82Set ZFS blocksize parameter.
83
84sparse::
85
86Use ZFS thin-provisioning. A sparse volume is a volume whose
87reservation is not equal to the volume size.
88
89
90.Configuration Examples (`/etc/pve/storage.cfg`)
91----
92zfs: lio
93 blocksize 4k
94 iscsiprovider LIO
95 pool tank
96 portal 192.0.2.111
97 target iqn.2003-01.org.linux-iscsi.lio.x8664:sn.xxxxxxxxxxxx
98 content images
99 lio_tpg tpg1
100 sparse 1
101
102zfs: solaris
103 blocksize 4k
104 target iqn.2010-08.org.illumos:02:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx:tank1
105 pool tank
106 iscsiprovider comstar
107 portal 192.0.2.112
108 content images
109
110zfs: freebsd
111 blocksize 4k
112 target iqn.2007-09.jp.ne.peach.istgt:tank1
113 pool tank
114 iscsiprovider istgt
115 portal 192.0.2.113
116 content images
117
118zfs: iet
119 blocksize 4k
120 target iqn.2001-04.com.example:tank1
121 pool tank
122 iscsiprovider iet
123 portal 192.0.2.114
124 content images
125----
126
127Storage Features
128~~~~~~~~~~~~~~~~
129
130The ZFS over iSCSI plugin provides a shared storage, which is capable of
131snapshots. You need to make sure that the ZFS appliance does not become a single
132point of failure in your deployment.
133
134.Storage features for backend `iscsi`
135[width="100%",cols="m,m,3*d",options="header"]
136|==============================================================================
137|Content types |Image formats |Shared |Snapshots |Clones
138|images |raw |yes |yes |no
139|==============================================================================
2c462964
DC
140
141ifdef::wiki[]
142
143See Also
144~~~~~~~~
145
146* link:/wiki/Legacy:_ZFS_over_iSCSI[Legacy: ZFS over iSCSI]
147
148endif::wiki[]