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