Step 1 – Identify the device for VDO exampansion
Identify the storage device that will be used for the VDO volume. Make sure that the storage device is not being used for another purpose.
# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 119.2G 0 disk ├─sda1 8:1 0 1G 0 part /boot └─sda2 8:2 0 118.2G 0 part ├─rhel-root 253:0 0 50G 0 lvm / ├─rhel-swap 253:1 0 11.9G 0 lvm [SWAP] └─rhel-home 253:2 0 56.3G 0 lvm /home sdb 8:16 0 1T 0 disk
The lsblk shows sda as being used by the LVM, however, sdb is available. We will configure a VDO volume on this storage device.
Step 2 – Create VDO volume
Create the VDO volume using the VDO Manager:
# vdo create \ --name=vdo_name \ --device=block_device \ --vdoLogicalSize=logical_size
Replace vdo_name with the identifier you want to use for your VDO volume; for example, vdo1.
Replace block_device with the name of the block device where you want to create the VDO instance; for example, /dev/sdb.
Replace logical_size with the amount of logical storage that the VDO volume should present. Typical range is 2x – 10x the physical size. So, if the physical size of the storage device is 1TB and the data is expected to see 10X data reduction, then the logical size would be 10TB.
For example, to create a VDO volume for container storage on a 1 TB block device, you might use:
# vdo create \ --name=vdo1 \ --device=/dev/sdb \ --vdoLogicalSize=10T Creating VDO vdo1 Starting VDO vdo1 Starting compression on VDO vdo1 VDO instance 1 volume is ready at /dev/mapper/vdo1
Step 3 – Verify
Verify that the volume is running using the vdostats command:
# vdostats Device 1K-blocks Used Available Use% Space saving% /dev/mapper/vdo1 117220824 4051080 113169744 3% N/A
The output of vdostats shows the volume /dev/mapper/vdo1 and the stats for Used, Available, Used%, and Space Saving%. The volume /dev/mapper/vdo1 is now ready to be used.