How to Create Virtual Data Optimizer (VDO) in RHEL

VDO is a kernel module that can reduce replication bandwidth and save disc space. VDO is a programme that sits on top of any block storage device and performs three tasks:
1. zero-block elimination,
2. redundant block deduplication,
3. data compression.

These are the critical steps in the data reduction process that allow VDO to lower its storage footprint. These stages are applied inline and on-the-fly by VDO.

The first stage is Zero-Block Elimination in which all blocks composed entirely of zeros are identified and solely stored in metadata. The second stage (Deduplication) is to find the redundant data. The incoming block is assessed by Universal Deduplication Service to determine whether the block is duplicate or not. If yes, it is not written, instead, metadata will be modified to link to an existing copy of the block on media. The last phase is compression. LZ4 compression is applied after performing elimination and deduplication. The compressed data blocks are then stored in fixed length (4 KB) blocks on the medium. Accessing data from storage can also be faster since a single physical block might include many compressed blocks.

Now let’s learn How to create Virtual Data Optimizer (VDO) in RHEL?

Step1: Install packages vdo and kmod-kvdo

#yum install vdo kmod-kvdo 

Step2: Create the vdo using vdo create command.

I will use the /dev/sde disk for creating the VDO. The size of this disk is 6Gb and I will create a VDO of 50Gb from it.

Specify three things: name (of the VDO), device and the required VDO size. So let’s assume the VDO name is VDO1, rge device used is /dev/sde and the size (vdoLogicalSize) is 50 Gb

#vdo create --name VDO1 --device=/dev/sde --vdoLogicalSize=50Gb

The output below shows that the required VDO is created

How to Create Virtual Data Optimizer (VDO) in RHEL

Step3: List all created volumes using the vdo list command

#vdo list

Step4: Format the created VDO

#mkfs.xfs /dev/mapper/VDO1

Step5: Mount at created VDO at a mount point

Create a mount point.

#mkdir /vdo_mount

Make an entry in the /etc/fstab file as below

#etc/fstab file
/dev/mapper/VDO1 /vdo_mount xfs defaults,x-systemd.requires=vdo.service 0 0 

Finally, run the command

#mount -a

If no error, the VDO is mounted successfully.

Video on How to create VDO

Relevant Topics