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