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