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