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