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