]> git.proxmox.com Git - pve-docs.git/blob - pve-storage-zfspool.adoc
add general introduction and chapters matching the qm creation wizard in the GUI
[pve-docs.git] / pve-storage-zfspool.adoc
1 Local ZFS Pool Backend
2 ----------------------
3 include::attributes.txt[]
4
5 Storage pool type: `zfspool`
6
7 This backend allows you to access local ZFS pools (or ZFS filesystems
8 inside such pools).
9
10 Configuration
11 ~~~~~~~~~~~~~
12
13 The backend supports the common storage properties `content`, `nodes`,
14 `disable`, and the following ZFS specific properties:
15
16 pool::
17
18 Select the ZFS pool/filesystem. All allocations are done within that
19 pool.
20
21 blocksize::
22
23 Set ZFS blocksize parameter.
24
25 sparse::
26
27 Use ZFS thin-provisioning. A sparse volume is a volume whose
28 reservation is not equal to the volume size.
29
30 .Configuration Example ('/etc/pve/storage.cfg')
31 ----
32 zfspool: vmdata
33 pool tank/vmdata
34 content rootdir,images
35 sparse
36 ----
37
38 File naming conventions
39 ~~~~~~~~~~~~~~~~~~~~~~~
40
41 The backend uses the following naming scheme for VM images:
42
43 vm-<VMID>-<NAME> // normal VM images
44 base-<VMID>-<NAME> // template VM image (read-only)
45 subvol-<VMID>-<NAME> // subvolumes (ZFS filesystem for containers)
46
47 `<VMID>`::
48
49 This specifies the owner VM.
50
51 `<NAME>`::
52
53 This scan be an arbitrary name (`ascii`) without white spaces. The
54 backend uses `disk[N]` as default, where `[N]` is replaced by an
55 integer to make the name unique.
56
57
58 Storage Features
59 ~~~~~~~~~~~~~~~~
60
61 ZFS is probably the most advanced storage type regarding snapshot and
62 cloning. The backend uses ZFS datasets for both VM images (format
63 `raw`) and container data (format `subvol`). ZFS properties are
64 inherited from the parent dataset, so you can simply set defaults
65 on the parent dataset.
66
67 .Storage features for backend `zfs`
68 [width="100%",cols="m,m,3*d",options="header"]
69 |==============================================================================
70 |Content types |Image formats |Shared |Snapshots |Clones
71 |images rootdir |raw subvol |no |yes |yes
72 |==============================================================================
73
74 Examples
75 ~~~~~~~~
76
77 It is recommended to create and extra ZFS filesystem to store your VM images:
78
79 # zfs create tank/vmdata
80
81 To enable compression on that newly allocated filesystem:
82
83 # zfs set compression=on tank/vmdata
84
85 You can get a list of available ZFS filesystems with:
86
87 # pvesm zfsscan
88
89 ifdef::wiki[]
90
91 See Also
92 ~~~~~~~~
93
94 * link:/index.php/Storage[Storage]
95
96 endif::wiki[]