• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

How To Create Virtual Data Optimizer(VD0) in CentOS/RHEL 7 and 8

by admin

Virtual Data Optimizer (VDO) is a block virtualization technology that allows you to easily create compressed and deduplicated pools of block storage. This post outlines steps to create Virtual Data Optimizer(VD0) filesystem in CentOS/RHEL 8 systems.

1. Install VDO using dnf or yum.

# dnf install install vdo

Verify the package installation:

# rpm -qa | grep vdo
kmod-kvdo-6.2.0.293-50.0.1.el8.x86_64
vdo-6.2.0.298-10.el8_0.x86_64

2. Create a VDO disk:

# lsblk | grep sdc
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sdc 8:32 0 5G 0 disk
# vdo create --name=vdoTEST --device=/dev/sdc --vdoLogicalSize=1G --writePolicy=async
Creating VDO vdoTEST
Starting VDO vdoTEST
Starting compression on VDO vdoTEST
VDO instance 0 volume is ready at /dev/mapper/vdoTEST

3. Check the configuration of the VDO disk.

# ls -l /dev/mapper/vdoTEST
lrwxrwxrwx. 1 root root 7 Aug 19 18:13 /dev/mapper/vdoTEST -> ../dm-8
# vdostats --hu
Device Size Used Available Use% Space saving%
/dev/mapper/vdoTEST 5.0G 3.0G 2.0G 60% 0%
# vdostats --verbose /dev/mapper/vdoTEST | grep -B6 'saving percent'
physical blocks : 1316331
logical blocks : 262144
1K-blocks : 5265324
1K-blocks used : 3169588
1K-blocks available : 2095736
used percent : 60
saving percent : 0

4. Create an LVM base on the VDO:

# pvcreate /dev/mapper/vdoTEST
Physical volume "/dev/mapper/vdoTEST" successfully created.
# vgcreate vdoTest /dev/mapper/vdoTEST
Volume group "vdoTest" successfully created
# vgdisplay vdoTest
--- Volume group ---
VG Name vdoTest
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 1
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 0
Open LV 0
Max PV 0
Cur PV 1
Act PV 1
VG Size 1020.00 MiB
PE Size 4.00 MiB
Total PE 255
Alloc PE / Size 0 / 0
Free PE / Size 255 / 1020.00 MiB
VG UUID ylwz5n-vvIA-dBrW-7KKj-iugk-eWeO-VCKcXq
# lvcreate -n vdolv01 -L 500MB vdoTest
Logical volume "vdolv01" created.
# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
vdolv01 vdoTest -wi-a----- 500.00m

5. Now, create xfs filesystem and mount the LVM volume:

# mkfs.xfs /dev/vdoTest/vdolv01
# mount -o discard /dev/vdoTest/vdolv01 /vdoTest

Verify the new mount point:

# vdostats --hu
Device Size Used Available Use% Space saving%
/dev/mapper/vdoTEST 5.0G 3.0G 2.0G 60% 96%
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vdoTest-vdolv01 496M 29M 467M 6% /vdoTest

Filed Under: CentOS/RHEL 7, CentOS/RHEL 8, Linux

Some more articles you might also be interested in …

  1. dmenu: command not found
  2. virt-manager: command not found
  3. Understanding the rc Scripts in Linux
  4. Starting iptables Fails with Error “Another app is currently holding the xtables lock”
  5. CentOS / RHEL : How to remove unused Physical Volume(PV) from Volume Group (VG) in LVM
  6. How to add words to the dictionary cracklib uses for validating passwords against known dictionary words
  7. How to enable SFTP Logging without chroot in CentOS/RHEL
  8. autopkgtest: command not found
  9. How To Disable Or Extend System Logging Rate-limit on CentOS/RHEL 7
  10. parted: command not found

You May Also Like

Primary Sidebar

Recent Posts

  • pw-cat Command Examples in Linux
  • pvs: command not found
  • pulseaudio: command not found
  • pulseaudio Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright