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