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.

102 lines

  1. [[storage_lvm]]
  2. LVM Backend
  3. -----------
  4. ifdef::wiki[]
  5. :pve-toplevel:
  6. :title: Storage: LVM
  7. endif::wiki[]
  8. Storage pool type: `lvm`
  9. LVM is a light software layer on top of hard disks and partitions. It
  10. can be used to split available disk space into smaller logical
  11. volumes. LVM is widely used on Linux and makes managing hard drives
  12. easier.
  13. Another use case is to put LVM on top of a big iSCSI LUN. That way you
  14. can easily manage space on that iSCSI LUN, which would not be possible
  15. otherwise, because the iSCSI specification does not define a
  16. management interface for space allocation.
  17. Configuration
  18. ~~~~~~~~~~~~~
  19. The LVM backend supports the common storage properties `content`, `nodes`,
  20. `disable`, and the following LVM specific properties:
  21. `vgname`::
  22. LVM volume group name. This must point to an existing volume group.
  23. `base`::
  24. Base volume. This volume is automatically activated before accessing
  25. the storage. This is mostly useful when the LVM volume group resides
  26. on a remote iSCSI server.
  27. `saferemove`::
  28. Zero-out data when removing LVs. When removing a volume, this makes
  29. sure that all data gets erased.
  30. `saferemove_throughput`::
  31. Wipe throughput (`cstream -t` parameter value).
  32. .Configuration Example (`/etc/pve/storage.cfg`)
  33. ----
  34. lvm: myspace
  35. vgname myspace
  36. content rootdir,images
  37. ----
  38. File naming conventions
  39. ~~~~~~~~~~~~~~~~~~~~~~~
  40. The backend use basically the same naming conventions as the ZFS pool
  41. backend.
  42. vm-<VMID>-<NAME> // normal VM images
  43. Storage Features
  44. ~~~~~~~~~~~~~~~~
  45. LVM is a typical block storage, but this backend does not support
  46. snapshot and clones. Unfortunately, normal LVM snapshots are quite
  47. inefficient, because they interfere all writes on the whole volume
  48. group during snapshot time.
  49. One big advantage is that you can use it on top of a shared storage,
  50. for example an iSCSI LUN. The backend itself implement proper cluster
  51. wide locking.
  52. TIP: The newer LVM-thin backend allows snapshot and clones, but does
  53. not support shared storage.
  54. .Storage features for backend `lvm`
  55. [width="100%",cols="m,m,3*d",options="header"]
  56. |==============================================================================
  57. |Content types |Image formats |Shared |Snapshots |Clones
  58. |images rootdir |raw |possible |no |no
  59. |==============================================================================
  60. Examples
  61. ~~~~~~~~
  62. List available volume groups:
  63. # pvesm lvmscan
  64. ifdef::wiki[]
  65. See Also
  66. ~~~~~~~~
  67. * link:/wiki/Storage[Storage]
  68. endif::wiki[]