]> git.proxmox.com Git - pve-docs.git/blame - pve-storage-lvmthin.adoc
add general introduction and chapters matching the qm creation wizard in the GUI
[pve-docs.git] / pve-storage-lvmthin.adoc
CommitLineData
9801e1c3
DM
1LVM thin Backend
2----------------
fc3425bd 3include::attributes.txt[]
9801e1c3
DM
4
5Storage pool type: `lvmthin`
6
7LVM normally allocates blocks when you create a volume. LVM thin pools
8instead allocates blocks when they are written. This behaviour is
9called thin-provisioning, because volumes can be much larger than
10physically available space.
11
12You can use the normal LVM command line tools to manage and create LVM
13thin pools (see 'man lvmthin' for details). Assuming you already have
14a LVM volume group called `pve`, the following commands create a new
15LVM thin pool (size 100G) called `data`:
16
17----
18lvcreate -L 100G -n data pve
19lvconvert --type thin-pool pve/data
20----
21
22
23Configuration
24~~~~~~~~~~~~~
25
26The LVM thin backend supports the common storage properties `content`, `nodes`,
27`disable`, and the following LVM specific properties:
28
29`vgname`::
30
31LVM volume group name. This must point to an existing volume group.
32
33`thinpool`::
34
35The name of the LVM thin pool.
36
37
38.Configuration Example ('/etc/pve/storage.cfg')
39----
40lvmthin: local-lvm
41 thinpool data
42 vgname pve
43 content rootdir,images
44----
45
46
47File naming conventions
48~~~~~~~~~~~~~~~~~~~~~~~
49
50The backend use basically the same naming conventions as the ZFS pool
51backend.
52
53 vm-<VMID>-<NAME> // normal VM images
54
55
56Storage Features
57~~~~~~~~~~~~~~~~
58
59LVM thin is a block storage, but fully supports snapshots and clones
60efficiently. New volumes are automatically initialized with zero.
61
62It must be mentioned that LVM thin pools cannot be shared across
63multiple 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
72Examples
73~~~~~~~~
74
75List available LVM thin pools on volume group `pve`:
76
77 # pvesm lvmthinscan pve
78
deb4673f
DM
79ifdef::wiki[]
80
81See Also
82~~~~~~~~
83
84* link:/index.php/Storage[Storage]
85
86endif::wiki[]