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