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