]>
Commit | Line | Data |
---|---|---|
9801e1c3 DM |
1 | LVM thin Backend |
2 | ---------------- | |
fc3425bd | 3 | include::attributes.txt[] |
9801e1c3 | 4 | |
5f09af76 DM |
5 | ifdef::wiki[] |
6 | :pve-toplevel: | |
cb84ed18 | 7 | :title: Storage: LVM Thin |
5f09af76 DM |
8 | endif::wiki[] |
9 | ||
9801e1c3 DM |
10 | Storage pool type: `lvmthin` |
11 | ||
12 | LVM normally allocates blocks when you create a volume. LVM thin pools | |
13 | instead allocates blocks when they are written. This behaviour is | |
14 | called thin-provisioning, because volumes can be much larger than | |
15 | physically available space. | |
16 | ||
17 | You can use the normal LVM command line tools to manage and create LVM | |
8c1189b6 | 18 | thin pools (see `man lvmthin` for details). Assuming you already have |
9801e1c3 DM |
19 | a LVM volume group called `pve`, the following commands create a new |
20 | LVM thin pool (size 100G) called `data`: | |
21 | ||
22 | ---- | |
23 | lvcreate -L 100G -n data pve | |
24 | lvconvert --type thin-pool pve/data | |
25 | ---- | |
26 | ||
27 | ||
28 | Configuration | |
29 | ~~~~~~~~~~~~~ | |
30 | ||
31 | The LVM thin backend supports the common storage properties `content`, `nodes`, | |
32 | `disable`, and the following LVM specific properties: | |
33 | ||
34 | `vgname`:: | |
35 | ||
36 | LVM volume group name. This must point to an existing volume group. | |
37 | ||
38 | `thinpool`:: | |
39 | ||
40 | The name of the LVM thin pool. | |
41 | ||
42 | ||
8c1189b6 | 43 | .Configuration Example (`/etc/pve/storage.cfg`) |
9801e1c3 DM |
44 | ---- |
45 | lvmthin: local-lvm | |
46 | thinpool data | |
47 | vgname pve | |
48 | content rootdir,images | |
49 | ---- | |
50 | ||
51 | ||
52 | File naming conventions | |
53 | ~~~~~~~~~~~~~~~~~~~~~~~ | |
54 | ||
55 | The backend use basically the same naming conventions as the ZFS pool | |
56 | backend. | |
57 | ||
58 | vm-<VMID>-<NAME> // normal VM images | |
59 | ||
60 | ||
61 | Storage Features | |
62 | ~~~~~~~~~~~~~~~~ | |
63 | ||
64 | LVM thin is a block storage, but fully supports snapshots and clones | |
65 | efficiently. New volumes are automatically initialized with zero. | |
66 | ||
67 | It must be mentioned that LVM thin pools cannot be shared across | |
68 | multiple nodes, so you can only use them as local storage. | |
69 | ||
70 | .Storage features for backend `lvmthin` | |
71 | [width="100%",cols="m,m,3*d",options="header"] | |
72 | |============================================================================== | |
73 | |Content types |Image formats |Shared |Snapshots |Clones | |
74 | |images rootdir |raw |no |yes |yes | |
75 | |============================================================================== | |
76 | ||
77 | Examples | |
78 | ~~~~~~~~ | |
79 | ||
80 | List available LVM thin pools on volume group `pve`: | |
81 | ||
82 | # pvesm lvmthinscan pve | |
83 | ||
deb4673f DM |
84 | ifdef::wiki[] |
85 | ||
86 | See Also | |
87 | ~~~~~~~~ | |
88 | ||
f532afb7 | 89 | * link:/wiki/Storage[Storage] |
deb4673f DM |
90 | |
91 | endif::wiki[] |