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