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