3.5. Creating an LVM-VDO volume
This procedure creates an VDO logical volume (LV) on a VDO pool LV.
Conditions préalables
- Install the VDO software. For more information, see Installing VDO.
- An LVM volume group with free storage capacity exists on your system.
Procédure
Pick a name for your VDO LV, such as
vdo1
. You must use a different name and device for each VDO LV on the system.In all the following steps, replace vdo-name with the name.
Create the VDO LV:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow lvcreate --type vdo \ --name vdo-name
# lvcreate --type vdo \ --name vdo-name --size physical-size --virtualsize logical-size \ vg-name
- Replace vg-name with the name of an existing LVM volume group where you want to place the VDO LV.
- Replace logical-size with the amount of logical storage that the VDO LV will present.
If the physical size is larger than 16TiB, add the following option to increase the slab size on the volume to 32GiB:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow --config 'allocation/vdo_slab_size_mb=32768'
--config 'allocation/vdo_slab_size_mb=32768'
If you use the default slab size of 2GiB on a physical size larger than 16TiB, the
lvcreate
command fails with the following error:Copy to Clipboard Copied! Toggle word wrap Toggle overflow ERROR - vdoformat: formatVDO failed on '/dev/device': VDO Status: Exceeds maximum number of slabs supported
ERROR - vdoformat: formatVDO failed on '/dev/device': VDO Status: Exceeds maximum number of slabs supported
Exemple 3.1. Creating a VDO LV for container storage
For example, to create a VDO LV for container storage on a 1TB VDO pool LV, you can use:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow lvcreate --type vdo \ --name vdo1
# lvcreate --type vdo \ --name vdo1 --size 1T --virtualsize 10T \ vg-name
ImportantIf a failure occurs when creating the VDO volume, remove the volume to clean up.
Create a file system on the VDO LV:
For the XFS file system:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow mkfs.xfs -K /dev/vg-name/vdo-name
# mkfs.xfs -K /dev/vg-name/vdo-name
For the ext4 file system:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow mkfs.ext4 -E nodiscard /dev/vg-name/vdo-name
# mkfs.ext4 -E nodiscard /dev/vg-name/vdo-name
Ressources supplémentaires
-
lvmvdo(7)
man page