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