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