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