You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

112 lines
2.5KB

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