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