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