]>
Commit | Line | Data |
---|---|---|
8119f671 | 1 | [[storage_lvm]] |
aa039b0f DM |
2 | LVM Backend |
3 | ----------- | |
5f09af76 DM |
4 | ifdef::wiki[] |
5 | :pve-toplevel: | |
cb84ed18 | 6 | :title: Storage: LVM |
5f09af76 DM |
7 | endif::wiki[] |
8 | ||
aa039b0f DM |
9 | Storage pool type: `lvm` |
10 | ||
7de448c2 | 11 | LVM is a light software layer on top of hard disks and partitions. It |
aa039b0f DM |
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 | ||
5eba0743 | 21 | |
aa039b0f DM |
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 | ||
7475d2c1 FE |
40 | Called "Wipe Removed Volumes" in the web UI. Zero-out data when removing LVs. |
41 | When removing a volume, this makes sure that all data gets erased and cannot be | |
42 | accessed by other LVs created later (which happen to be assigned the same | |
43 | physical extents). This is a costly operation, but may be required as a security | |
44 | measure in certain environments. | |
aa039b0f DM |
45 | |
46 | `saferemove_throughput`:: | |
47 | ||
8c1189b6 | 48 | Wipe throughput (`cstream -t` parameter value). |
aa039b0f | 49 | |
8c1189b6 | 50 | .Configuration Example (`/etc/pve/storage.cfg`) |
aa039b0f DM |
51 | ---- |
52 | lvm: myspace | |
53 | vgname myspace | |
54 | content rootdir,images | |
55 | ---- | |
56 | ||
57 | File naming conventions | |
58 | ~~~~~~~~~~~~~~~~~~~~~~~ | |
59 | ||
60 | The backend use basically the same naming conventions as the ZFS pool | |
61 | backend. | |
62 | ||
63 | vm-<VMID>-<NAME> // normal VM images | |
64 | ||
65 | Storage Features | |
66 | ~~~~~~~~~~~~~~~~ | |
67 | ||
68 | LVM is a typical block storage, but this backend does not support | |
60ed554f DW |
69 | snapshots and clones. Unfortunately, normal LVM snapshots are quite |
70 | inefficient, because they interfere with all writes on the entire volume | |
aa039b0f DM |
71 | group during snapshot time. |
72 | ||
73 | One big advantage is that you can use it on top of a shared storage, | |
60ed554f DW |
74 | for example, an iSCSI LUN. The backend itself implements proper cluster-wide |
75 | locking. | |
aa039b0f | 76 | |
60ed554f | 77 | TIP: The newer LVM-thin backend allows snapshots and clones, but does |
aa039b0f DM |
78 | not support shared storage. |
79 | ||
80 | ||
81 | .Storage features for backend `lvm` | |
82 | [width="100%",cols="m,m,3*d",options="header"] | |
83 | |============================================================================== | |
84 | |Content types |Image formats |Shared |Snapshots |Clones | |
85 | |images rootdir |raw |possible |no |no | |
86 | |============================================================================== | |
87 | ||
88 | Examples | |
89 | ~~~~~~~~ | |
90 | ||
91 | List available volume groups: | |
92 | ||
93 | # pvesm lvmscan | |
94 | ||
deb4673f DM |
95 | ifdef::wiki[] |
96 | ||
97 | See Also | |
98 | ~~~~~~~~ | |
99 | ||
f532afb7 | 100 | * link:/wiki/Storage[Storage] |
deb4673f DM |
101 | |
102 | endif::wiki[] | |
aa039b0f DM |
103 | |
104 |