In this article, we’ll explain what the Virtual Data Optimizer (VDO) is and provide some examples of usage.
Introduction to Virtual Data Optimizer (VDO)
Virtual Data Optimizer (VDO) is a Linux kernel module and user-space toolset that provides inline data reduction through:
- Deduplication
- Compression
- Thin provisioning
VDO is designed to optimize storage usage, especially in environments with large volumes of redundant data. It’s particularly useful in virtualized and containerized setups.
Based on Red Hat documentation:
- When hosting active VMs or containers, Red Hat recommends provisioning storage at a 10:1 logical to physical ratio:
- That is, if you are utilizing 1 TB of physical storage, you would present it as 10 TB of logical storage.
- For object storage, Red Hat recommends using a 3:1 logical to physical ratio:
- That is, 1 TB of physical storage would present as 3 TB of logical storage.
VDO Deployment Scenarios
We can deploy VDO in a variety of ways to provide deduplicated storage for:
- both block and file access
- both local and remote storage
KVM:

File systems:

iSCSI:

LVM:

Encryption:

Components of a VDO volume
VDO uses a block device as a backing store, which can include an aggregation of physical storage consisting of one or more disks, partitions, or even flat files. When a storage management tool creates a VDO volume, VDO reserves volume space for the UDS index and the VDO volume. The UDS index and the VDO volume interact to provide deduplicated block storage:

The VDO solution consists of the following components:
- kvdo: A kernel module that loads into the Linux Device Mapper layer provides a deduplicated, compressed, and thinly provisioned block storage volume.
- uds: A kernel module that communicates with the Universal Deduplication Service (UDS) index on the volume and analyzes data for duplicates.
Creating a VDO Volume and Using it with XFS
1- Install VDO tools and start/enable VDO service:
dnf install vdo kmod-kvdo -y
systemctl enable vdo
systemctl start vdo
systemctl status vdo

2- Create a new VDO volume.
In our case, for instance, the block device that will be used is /dev/sdh with a size of 10 GB:
vdo create --name=VDO1 --device=/dev/sdh --vdoLogicalSize=30G --writePolicy=auto

3- Check the VDO status:
vdo status
4- Format the VDO volume with XFS:
mkfs.xfs -K /dev/mapper/VDO1
5- Mount:
mkdir /mnt/VDO1
mount -t xfs /dev/mapper/VDO1 /mnt/VDO1/
6- Inspect:
df -Th | grep -i -E "filesystem|vdo1"

7- Create a file in the mount point used by the VDO:
dd if=/dev/zero of=/mnt/VDO1/test.dd bs=1G count=15
8- Inspect the mount point usage with “df”:
df -Th | grep -i -E "filesystem|vdo1"

To remember, our physical disk has 10GB and our logical volume has 30GB:
vdo status | grep -i -E "VDO1|physical|logical"

9- To inspect the VDO in a human-readable format:
vdostats --human-readable

10- To mount automatically the VDO volume on the system boot, add the following entry to/etc/fstab:
/dev/mapper/VDO1 /mnt/VDO1 xfs defaults 0 0
11- Execute the “mount -a” or reboot the system to test.
Creating a VDO Volume and Using it with LVM
In this example, we’ll create a new VDO volume and, instead of creating a filesystem under the VDO volume, we’ll create an LVM Volume Group (VG).
For this example, we’ll use a new block device /dev/sdi with a size of 20GB.
1- Create the VDO volume. The VDO logical size will be defined as 60GB – we’re considering the 3:1 logical to physical ratio:
vdo create --name=VDOLVM --device=/dev/sdi --vdoLogicalSize=60G --writePolicy=auto

2- Create the Physical Volume (PV) using the VDO volume:
pvcreate /dev/mapper/VDOLVM
3- Create the Volume Group (VG) using the PV:
vgcreate VGVDO /dev/mapper/VDOLVM
4- Inspect the VG:
vgdisplay VGVDO

5- Let’s create four Logical Volumes (LV), each one with 15GB:
lvcreate -L 15GB -n lv-vdo-01 VGVDO
lvcreate -L 15GB -n lv-vdo-02 VGVDO
lvcreate -L 15GB -n lv-vdo-03 VGVDO
lvcreate -l 3839 -n lv-vdo-04 VGVDO
6- Inspect the LVs:
lvs | grep -i -E "VG|VGVDO"

7- Create the filesystem, following the guidelines:
- For the first and second Logical Volumes, create an XFS filesystem.
- For the third and fourth Logical Volumes, create an EXT4 filesystem.
Creating XFS filesystems:
mkfs.xfs -K /dev/VGVDO/lv-vdo-01
mkfs.xfs -K /dev/VGVDO/lv-vdo-02

Creating EXT4 filesystems:
mkfs.ext4 -E nodiscard /dev/VGVDO/lv-vdo-03
mkfs.ext4 -E nodiscard /dev/VGVDO/lv-vdo-04

8- Add the entries to /etc/fstab to mount it automatically on the system boot:
/dev/VGVDO/lv-vdo-01 /mnt/dir-lv-vdo-01 xfs defaults 0 0
/dev/VGVDO/lv-vdo-02 /mnt/dir-lv-vdo-02 xfs defaults 0 0
/dev/VGVDO/lv-vdo-03 /mnt/dir-lv-vdo-03 ext4 defaults 0 0
/dev/VGVDO/lv-vdo-04 /mnt/dir-lv-vdo-04 ext4 defaults 0 0
9- Mount and inspect:
mount -a
lsblk -fi | grep -i -E "name|sdi|VDOLVM|VGVDO"

10- To get details of the VDO volume:
vdostats --human-readable /dev/mapper/VDOLVM

That’s it for now 🙂