]> git.proxmox.com Git - pve-docs.git/blame_incremental - pve-storage-lvm.adoc
more ACME documentation
[pve-docs.git] / pve-storage-lvm.adoc
... / ...
CommitLineData
1LVM Backend
2-----------
3ifdef::wiki[]
4:pve-toplevel:
5:title: Storage: LVM
6endif::wiki[]
7
8Storage pool type: `lvm`
9
10LVM is a light software layer on top of hard disks and partitions. It
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
20
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
44Wipe throughput (`cstream -t` parameter value).
45
46.Configuration Example (`/etc/pve/storage.cfg`)
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
91ifdef::wiki[]
92
93See Also
94~~~~~~~~
95
96* link:/wiki/Storage[Storage]
97
98endif::wiki[]
99
100