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