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