Learn how to configure Virtual Data Optimizer (VDO) in CentOS 8 to optimize storage with deduplication, compression, and thin provisioning for efficient disk space management. #centlinux #linux #storage
Table of Contents
What is Virtual Data Optimizer?
VDO (Virtual Data Optimizer) is a storage software that can be used as an additional storage layer under the local filesystems, iSCSI or Ceph storages. VDO provides inline data reduction for Linux in the form of deduplication, compression and thin provisioning.
VDO is commonly used in enterprise environments to maximize the use of existing storage infrastructure, improve performance, and reduce costs. It is especially beneficial in virtualized environments, where data redundancy and storage sprawl can become significant issues.
In this article, we will configure Virtual Data Optimizer (VDO) on CentOS 8 and then we will create filesystem and persistently mount the volume.
Virtual Data Optimizer (VDO) Features
The core features of Virtual Data Optimizer (VDO) are:
- Supports Local and Remote Storages
- Deduplication
- Compression
- Thin Provisioning
Virtual Data Optimizer (VDO) Applications
Although we can use Virtual Data Optimizer (VDO) in various situations to save disk space, but two major applications of VDO are:
- VM storage
- BLOB storage backends
Recommended Training: Linux Administration: The Complete Linux Bootcamp in 2025 from Andrei Dumitrescu, Crystal Mind Academy
Linux Server Specification
We have provisioned a virtual machine with a minimal installation of CentOS 8, ensuring a lightweight and efficient setup. This minimal installation provides a base operating system with only essential packages, reducing resource usage and potential security vulnerabilities.
The virtual machine is configured with the following hardware specifications, which are optimized for stability and performance in our environment:
- CPU – 3.4 Ghz (2 cores)
- Memory – 1 GB
- Storage – 20 GB
- Operating System – CentOS Linux 8.0
- Hostname – vdo-storage-01.centlinux.com
- IP Address – 192.168.116.206 /24
This minimal installation setup provides a clean and controlled environment, allowing us to configure Virtual Data Optimizer (VDO) efficiently while maintaining a lightweight footprint on system resources.
Install Virtual Data Optimizer (VDO) on CentOS 8
To begin the configuration process, we need to connect to the CentOS 8 server where Virtual Data Optimizer (VDO) will be set up.
Use an SSH client to connect to the server named vdo-storage-01.centlinux.com as the root user. This ensures we have the necessary administrative privileges to install and configure Virtual Data Optimizer.
Before proceeding with the installation, it is essential to refresh the DNF package manager cache. This step ensures that we have access to the latest package versions and necessary dependencies for a smooth installation process.
# dnf makecache
CentOS-8 - AppStream 3.0 kB/s | 4.3 kB 00:01
CentOS-8 - Base 2.8 kB/s | 3.9 kB 00:01
CentOS-8 - Extras 730 B/s | 1.5 kB 00:02
Metadata cache created.
To ensure system stability, security, and compatibility with the latest software packages, it is important to update all installed packages on CentOS 8 before proceeding with any further configurations.
By updating the system, we can:
- Patch security vulnerabilities to protect against potential threats.
- Improve system performance and stability with the latest updates.
- Ensure compatibility with new software installations, including VDO (Virtual Data Optimizer).
Use the following command to update all installed packages and refresh the system repositories. This step will ensure that the latest bug fixes, kernel updates, and software enhancements are applied to the server.
# dnf update -y
To setup Virtual Data Optimizer on CentOS 8, we have to install following two packages.
- kmod-kvdo – Kernel Modules for Virtual Data Optimizer
- vdo – Management tools for Virtual Data Optimizer
We are installing both of these packages using a single dnf command.
# dnf install -y kmod-kvdo vdo
The Virtual Data Optimizer (VDO) service is automatically enabled and started by the installer.
# systemctl status vdo.service
â vdo.service - VDO volume services
Loaded: loaded (/usr/lib/systemd/system/vdo.service; enabled; vendor preset:>
Active: active (exited) since Sun 2019-12-22 12:54:27 PKT; 20min ago
Main PID: 801 (code=exited, status=0/SUCCESS)
Tasks: 0 (limit: 5948)
Memory: 0B
CGroup: /system.slice/vdo.service
Dec 22 12:54:12 vdo-storage-01.centlinux.com systemd[1]: Starting VDO volume serv>
Dec 22 12:54:27 vdo-storage-01.centlinux.com systemd[1]: Started VDO volume servi>
Virtual Data Optimizer (VDO) has been installed on CentOS 8.
Read Also: How to configure Stratis Filesystem on CentOS 8
Create a VDO Volume
We have added an additional storage disk to our CentOS 8 virtual machine, which is recognized as /dev/sdb. This extra disk will be utilized as the VDO data store, where we will create VDO volumes for optimized storage management.
By configuring /dev/sdb as the dedicated VDO storage device, we aim to:
- Enable data deduplication and compression for efficient disk utilization.
- Reduce storage overhead by eliminating redundant data blocks.
- Improve overall performance and scalability for handling large datasets.
However, while attempting to create a VDO volume on /dev/sdb, we encountered the following error message, which may be due to missing dependencies, incorrect configurations, or conflicts with existing storage settings. To resolve this issue, we will analyze the error, troubleshoot the possible causes, and apply the necessary fixes to ensure a successful VDO setup.
# vdo create --name=vdo1 --device=/dev/sdb --vdoLogicalSize=1T
Creating VDO vdo1
vdo: ERROR - Kernel module kvdo not installed
vdo: ERROR - modprobe: FATAL: Module kvdo not found in directory /lib/modules/4.18.0-80.el8.x86_64
It is a known bug and as a workaround, we restarted the CentOS 8 server.
# systemctl reboot
After restart, we try to create the VDO volume again, and it is working now.
# vdo create --name=vdo1 --device=/dev/sdb --vdoLogicalSize=1T
Creating VDO vdo1
Starting VDO vdo1
Starting compression on VDO vdo1
VDO instance 0 volume is ready at /dev/mapper/vdo1
Since we are utilizing a VDO (Virtual Data Optimizer) volume as a local filesystem, it is essential to format the volume with a suitable filesystem before it can be used for data storage and access.
Creating a filesystem on the VDO volume will allow us to:
- Organize and store files efficiently within the optimized storage space.
- Ensure compatibility with Linux file operations such as reading, writing, and managing files.
- Leverage the benefits of VDO’s deduplication and compression while maintaining a structured storage system.
Depending on the use case, we can choose a filesystem type such as ext4, XFS, or Btrfs, with XFS being the recommended choice for CentOS 8 due to its scalability and performance advantages. Once the filesystem is created, we will also need to mount the VDO volume so it becomes accessible within the system for storing and managing data efficiently.
# mkfs.xfs -K /dev/mapper/vdo1
meta-data=/dev/mapper/vdo1 isize=512 agcount=4, agsize=67108864 blks
= sectsz=4096 attr=2, projid32bit=1
= crc=1 finobt=1, sparse=1, rmapbt=0
= reflink=1
data = bsize=4096 blocks=268435456, imaxpct=5
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0, ftype=1
log =internal log bsize=4096 blocks=131072, version=2
= sectsz=4096 sunit=1 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
Persistently Mount VDO Volume
Create a directory to mount our VDO volume.
# mkdir /mnt/vdo1
To persistently mount our VDO volume, we must add an entry in /etc/fstab file.
# vi /etc/fstab
Add following line in this file.
/dev/mapper/vdo1 /mnt/vdo1 xfs defaults,x-systemd.req=vdo.service,discard 0 0
Execute following command to inform Systemd about the new entry in /etc/fstab file.
# systemctl daemon-reload
Mount entries in /etc/fstab file.
# mount -a
Check list of block devices.
# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 60G 0 disk
ââsda1 8:1 0 1G 0 part /boot
ââsda2 8:2 0 59G 0 part
ââcl-root 253:0 0 38.2G 0 lvm /
ââcl-swap 253:1 0 2.1G 0 lvm [SWAP]
ââcl-home 253:2 0 18.7G 0 lvm /home
sdb 8:16 0 10G 0 disk
ââvdo1 253:3 0 1T 0 vdo /mnt/vdo1
sr0 11:0 1 6.7G 0 rom
Check status of VDO volumes.
# vdostats
Device 1K-blocks Used Available Use% Space saving%
/dev/mapper/vdo1 10485760 4200156 6285604 40% 99%
We have successfully configured VDO on CentOS 8.
Final Thoughts
Configuring Virtual Data Optimizer (VDO) on CentOS 8 can significantly enhance your storage efficiency by reducing the physical footprint of your data through deduplication, compression, and thin provisioning. By implementing VDO, you can optimize your storage resources, improve system performance, and lower overall costs.
Optimize your cloud infrastructure and secure your servers with my AWS and Linux administration services. Let’s ensure your systems run smoothly. Connect with me on Fiverr now!
Thank you for considering my services, and I look forward to helping you achieve your storage optimization goals!
FAQs
1. What is Virtual Data Optimizer (VDO) in CentOS 8?
VDO (Virtual Data Optimizer) is a block-level storage optimization technology that helps reduce storage usage through deduplication, compression, and thin provisioning, improving disk space efficiency.
2. What are the benefits of using VDO on CentOS 8?
VDO helps optimize disk space, reduce storage costs, and improve data efficiency by eliminating duplicate data blocks and compressing stored data, making it ideal for virtualized and cloud environments.
3. What are the system requirements for configuring VDO?
To configure VDO, you need a CentOS 8 system with a dedicated block device or partition, sufficient available disk space, and the necessary VDO utilities installed.
4. How can I check if VDO is working properly?
After configuring VDO, you can use system commands to monitor VDO statistics, check storage savings, and verify that deduplication and compression are effectively reducing disk usage.
5. Can VDO be used with LVM (Logical Volume Manager)?
Yes, VDO can be integrated with LVM to create optimized logical volumes, allowing better storage management, snapshot capabilities, and increased flexibility for enterprise workloads.