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