Storage: LVM: Difference between revisions

From Proxmox VE
Jump to navigation Jump to search
No edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
Line 23: Line 23:
on a remote iSCSI server.
on a remote iSCSI server.
saferemove
saferemove
Zero-out data when removing LVs. When removing a volume, this makes
Called "Wipe Removed Volumes" in the web UI. Zero-out data when removing LVs.
sure that all data gets erased.
When removing a volume, this makes sure that all data gets erased and cannot be
accessed by other LVs created later (which happen to be assigned the same
physical extents). This is a costly operation, but may be required as a security
measure in certain environments.
saferemove_throughput
saferemove_throughput
Wipe throughput (cstream -t parameter value).
Wipe throughput (cstream -t parameter value).
Line 37: Line 40:
Storage Features
Storage Features
LVM is a typical block storage, but this backend does not support
LVM is a typical block storage, but this backend does not support
snapshot and clones. Unfortunately, normal LVM snapshots are quite
snapshots and clones. Unfortunately, normal LVM snapshots are quite
inefficient, because they interfere all writes on the whole volume
inefficient, because they interfere with all writes on the entire volume
group during snapshot time.
group during snapshot time.
One big advantage is that you can use it on top of a shared storage,
One big advantage is that you can use it on top of a shared storage,
for example an iSCSI LUN. The backend itself implement proper cluster
for example, an iSCSI LUN. The backend itself implements proper cluster-wide
wide locking.
locking.
The newer LVM-thin backend allows snapshot and clones, but does
The newer LVM-thin backend allows snapshots and clones, but does
not support shared storage.
not support shared storage.
Table 1. Storage features for backend lvm
Table 1. Storage features for backend lvm

Latest revision as of 17:30, 6 March 2024

Storage pool type: lvm

LVM is a light software layer on top of hard disks and partitions. It can be used to split available disk space into smaller logical volumes. LVM is widely used on Linux and makes managing hard drives easier.

Another use case is to put LVM on top of a big iSCSI LUN. That way you can easily manage space on that iSCSI LUN, which would not be possible otherwise, because the iSCSI specification does not define a management interface for space allocation.

Configuration

The LVM backend supports the common storage properties content, nodes, disable, and the following LVM specific properties:

vgname

LVM volume group name. This must point to an existing volume group.

base

Base volume. This volume is automatically activated before accessing the storage. This is mostly useful when the LVM volume group resides on a remote iSCSI server.

saferemove

Called "Wipe Removed Volumes" in the web UI. Zero-out data when removing LVs. When removing a volume, this makes sure that all data gets erased and cannot be accessed by other LVs created later (which happen to be assigned the same physical extents). This is a costly operation, but may be required as a security measure in certain environments.

saferemove_throughput

Wipe throughput (cstream -t parameter value).

Configuration Example (/etc/pve/storage.cfg)
lvm: myspace
        vgname myspace
        content rootdir,images

File naming conventions

The backend use basically the same naming conventions as the ZFS pool backend.

vm-<VMID>-<NAME>      // normal VM images

Storage Features

LVM is a typical block storage, but this backend does not support snapshots and clones. Unfortunately, normal LVM snapshots are quite inefficient, because they interfere with all writes on the entire volume group during snapshot time.

One big advantage is that you can use it on top of a shared storage, for example, an iSCSI LUN. The backend itself implements proper cluster-wide locking.

Tip The newer LVM-thin backend allows snapshots and clones, but does not support shared storage.
Table 1. Storage features for backend lvm
Content types Image formats Shared Snapshots Clones

images rootdir

raw

possible

no

no

Examples

List available volume groups:

# pvesm lvmscan

See Also