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