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