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.

pve-storage-zfspool.adoc 2.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  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. .Configuration Example (`/etc/pve/storage.cfg`)
  24. ----
  25. zfspool: vmdata
  26. pool tank/vmdata
  27. content rootdir,images
  28. sparse
  29. ----
  30. File naming conventions
  31. ~~~~~~~~~~~~~~~~~~~~~~~
  32. The backend uses the following naming scheme for VM images:
  33. vm-<VMID>-<NAME> // normal VM images
  34. base-<VMID>-<NAME> // template VM image (read-only)
  35. subvol-<VMID>-<NAME> // subvolumes (ZFS filesystem for containers)
  36. `<VMID>`::
  37. This specifies the owner VM.
  38. `<NAME>`::
  39. This can be an arbitrary name (`ascii`) without white space. The
  40. backend uses `disk[N]` as default, where `[N]` is replaced by an
  41. integer to make the name unique.
  42. Storage Features
  43. ~~~~~~~~~~~~~~~~
  44. ZFS is probably the most advanced storage type regarding snapshot and
  45. cloning. The backend uses ZFS datasets for both VM images (format
  46. `raw`) and container data (format `subvol`). ZFS properties are
  47. inherited from the parent dataset, so you can simply set defaults
  48. on the parent dataset.
  49. .Storage features for backend `zfs`
  50. [width="100%",cols="m,m,3*d",options="header"]
  51. |==============================================================================
  52. |Content types |Image formats |Shared |Snapshots |Clones
  53. |images rootdir |raw subvol |no |yes |yes
  54. |==============================================================================
  55. Examples
  56. ~~~~~~~~
  57. It is recommended to create an extra ZFS file system to store your VM images:
  58. # zfs create tank/vmdata
  59. To enable compression on that newly allocated file system:
  60. # zfs set compression=on tank/vmdata
  61. You can get a list of available ZFS filesystems with:
  62. # pvesm zfsscan
  63. ifdef::wiki[]
  64. See Also
  65. ~~~~~~~~
  66. * link:/wiki/Storage[Storage]
  67. * link:/wiki/ZFS_on_Linux[ZFS on Linux]
  68. endif::wiki[]