What – Virtual Data Optimizer (VDO) is a device mapper module which adds data reduction capabilities to the Linux block storage stack. VDO is a block virtualization technology that combines:
- Data Compression (Compress Remaining Blocks)
- Data Deduplication (Eliminate Duplicate Blocks)
- Thin provisioning (Eliminate Zero Blocks)
Data Deduplication is a technique for eliminating duplicate copies of repeating data. It is used to improve storage utilization and can also be applied to network data transfers to reduce the number of bytes that must be sent.
Why – VDO Can be used to
- Saves storage space inline
- Compresses files
- Eliminates duplications
- Enables you to allocate more virtual space than how much the physical or logical storage provides
- Enables you to extend the virtual storage by growing
How – VDO can be created on top of many types of storage like
- LVM
- Physical volume
- Software RAID
Note the Kernel and Package version :
- Red Hat Enterprise Linux release 8.3 (Ootpa)
- kernel-4.18.0-240.1.1.el8_3.x86_64
- vdo-6.2.3.114-14.el8.x86_64
- kmod-kvdo-6.2.3.114-74.el8.x86_64
- modprobe kvdo
Install VDO : yum install vdo -y
Physical/Virtual Volume : /dev/xvdf (10 GiB)
- vdo create –name=vdo_vol –device=/dev/xvdf –vdoLogicalSize=100G
- vdostats –hu
- mkfs.xfs /dev/mapper/vdo_vol
- mkdir /test-vdo
- mount /dev/mapper/vdo_vol /test-vdo
LVM (Logical Volume Manager): /dev/mapper/vdo_vg-vdo_lv
- pvcreate /dev/xvdf1
- vgcreate vdo_vg /dev/xvdf1
- lvcreate -l +100%FREE -n vdo_lv vdo_vg
- vdo create –name=vdo_vol –device=/dev/mapper/vdo_vg-vdo_lv –vdoLogicalSize=100G –sparseIndex=enabled
- mkfs.xfs /dev/mapper/vdo_vol
- mkdir /test-vdo
- mount /dev/mapper/vdo_vol /test-vdo
VDO Commands:
Start VDO Volume : vdo start –name=vdo_vol
Stop VDO Volume : vdo stop –name=vdo_vol
To Discard unused blocks regularly : systemctl enable –now fstrim.timer
Activate VDO Volume : vdo activate –name=vdo_vol
Deactivate VDO Volume : vdo deactivate –name=vdo_vol
Check Status : vdo status –name=vdo_vol
Enable Deduplication : vdo enableDeduplication –name=vdo_vol
Disable Deduplication : vdo disableDeduplication –name=vdo_vol
Enable Compression : vdo enableCompression –name=vdo_vol
Disable Compression : vdo disableCompression –name=vdo_vol
Increase Logical Size: vdo growLogical –name=vdo_vol –vdoLogicalSize=new-logical-size
Increase Physical Size : vdo growPhysical –name=vdo_vol
Remove VDO Volume : vdo remove –force –name=vdo_vol