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