]> git.proxmox.com Git - pve-docs.git/blame - pve-storage-zfspool.adoc
include attributes.txt
[pve-docs.git] / pve-storage-zfspool.adoc
CommitLineData
aa039b0f
DM
1Local ZFS Pool Backend
2----------------------
fc3425bd 3include::attributes.txt[]
aa039b0f
DM
4
5Storage pool type: `zfspool`
6
7This backend allows you to access local ZFS pools (or ZFS filesystems
8inside such pools).
9
10Configuration
11~~~~~~~~~~~~~
12
13The backend supports the common storage properties `content`, `nodes`,
14`disable`, and the following ZFS specific properties:
15
16pool::
17
18Select the ZFS pool/filesystem. All allocations are done within that
19pool.
20
21blocksize::
22
23Set ZFS blocksize parameter.
24
25sparse::
26
27Use ZFS thin-provisioning. A sparse volume is a volume whose
28reservation is not equal to the volume size.
29
30.Configuration Example ('/etc/pve/storage.cfg')
31----
32zfspool: vmdata
33 pool tank/vmdata
34 content rootdir,images
35 sparse
36----
37
38File naming conventions
39~~~~~~~~~~~~~~~~~~~~~~~
40
41The 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
49This specifies the owner VM.
50
51`<NAME>`::
52
53This scan be an arbitrary name (`ascii`) without white spaces. The
54backend uses `disk[N]` as default, where `[N]` is replaced by an
55integer to make the name unique.
56
57
58Storage Features
59~~~~~~~~~~~~~~~~
60
61ZFS is probably the most advanced storage type regarding snapshot and
62cloning. The backend uses ZFS datasets for both VM images (format
63`raw`) and container data (format `subvol`). ZFS properties are
64inherited from the parent dataset, so you can simply set defaults
65on 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
74Examples
75~~~~~~~~
76
77It is recommended to create and extra ZFS filesystem to store your VM images:
78
79 # zfs create tank/vmdata
80
81To enable compression on that newly allocated filesystem:
82
83 # zfs set compression=on tank/vmdata
84
85You can get a list of available ZFS filesystems with:
86
87 # pvesm zfsscan
deb4673f
DM
88
89ifdef::wiki[]
90
91See Also
92~~~~~~~~
93
f532afb7 94* link:/wiki/Storage[Storage]
deb4673f
DM
95
96endif::wiki[]