]> git.proxmox.com Git - pve-docs.git/blob - pve-storage-lvmthin.adoc
ha-manager.adoc: reorder sections
[pve-docs.git] / pve-storage-lvmthin.adoc
1 LVM thin Backend
2 ----------------
3 ifdef::wiki[]
4 :pve-toplevel:
5 :title: Storage: LVM Thin
6 endif::wiki[]
7
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
16 thin pools (see `man lvmthin` for details). Assuming you already have
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
41 .Configuration Example (`/etc/pve/storage.cfg`)
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
82 ifdef::wiki[]
83
84 See Also
85 ~~~~~~~~
86
87 * link:/wiki/Storage[Storage]
88
89 endif::wiki[]