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