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-lvmthin.adoc 2.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. [[storage_lvmthin]]
  2. LVM thin Backend
  3. ----------------
  4. ifdef::wiki[]
  5. :pve-toplevel:
  6. :title: Storage: LVM Thin
  7. endif::wiki[]
  8. Storage pool type: `lvmthin`
  9. LVM normally allocates blocks when you create a volume. LVM thin pools
  10. instead allocates blocks when they are written. This behaviour is
  11. called thin-provisioning, because volumes can be much larger than
  12. physically available space.
  13. You can use the normal LVM command line tools to manage and create LVM
  14. thin pools (see `man lvmthin` for details). Assuming you already have
  15. a LVM volume group called `pve`, the following commands create a new
  16. LVM thin pool (size 100G) called `data`:
  17. ----
  18. lvcreate -L 100G -n data pve
  19. lvconvert --type thin-pool pve/data
  20. ----
  21. Configuration
  22. ~~~~~~~~~~~~~
  23. The LVM thin backend supports the common storage properties `content`, `nodes`,
  24. `disable`, and the following LVM specific properties:
  25. `vgname`::
  26. LVM volume group name. This must point to an existing volume group.
  27. `thinpool`::
  28. The name of the LVM thin pool.
  29. .Configuration Example (`/etc/pve/storage.cfg`)
  30. ----
  31. lvmthin: local-lvm
  32. thinpool data
  33. vgname pve
  34. content rootdir,images
  35. ----
  36. File naming conventions
  37. ~~~~~~~~~~~~~~~~~~~~~~~
  38. The backend use basically the same naming conventions as the ZFS pool
  39. backend.
  40. vm-<VMID>-<NAME> // normal VM images
  41. Storage Features
  42. ~~~~~~~~~~~~~~~~
  43. LVM thin is a block storage, but fully supports snapshots and clones
  44. efficiently. New volumes are automatically initialized with zero.
  45. It must be mentioned that LVM thin pools cannot be shared across
  46. multiple nodes, so you can only use them as local storage.
  47. .Storage features for backend `lvmthin`
  48. [width="100%",cols="m,m,3*d",options="header"]
  49. |==============================================================================
  50. |Content types |Image formats |Shared |Snapshots |Clones
  51. |images rootdir |raw |no |yes |yes
  52. |==============================================================================
  53. Examples
  54. ~~~~~~~~
  55. List available LVM thin pools on volume group `pve`:
  56. # pvesm lvmthinscan pve
  57. ifdef::wiki[]
  58. See Also
  59. ~~~~~~~~
  60. * link:/wiki/Storage[Storage]
  61. endif::wiki[]