In this exercise, you will perform file activities that demonstrate the integrated compression and deduplication features.
Outcomes
You should be able to see the effects of deduplication on a Virtual Data Optimizer (VDO) volume.
On servera, create a VDO volume named vdo1, with the /dev/vdd device.
Set its logical size to 20 GB.
Log in to servera as the root user.
[student@workstation ~]$ssh root@servera
Create the vdo1 volume, using /dev/vdd as the device.
Use 20 GB as its logical size.
[root@servera ~]#vdo create --name=vdo1 --device=/dev/vdd --vdoLogicalSize=20GCreating VDO vdo1 Starting VDO vdo1 Starting compression on VDO vdo1 VDO instance 0 volume is ready at /dev/mapper/vdo1
Verify that the vdo1 volume is available.
[root@servera ~]#vdo listvdo1
Verify that both compression and deduplication features are enabled on the vdo1 volume.
Verify that deduplication is enabled on the vdo1 volume.
[root@servera ~]#vdo status -n vdo1 | grep DeduplicationDeduplication: enabled
Verify that compression is enabled on the vdo1 volume.
[root@servera ~]#vdo status -n vdo1 | grep CompressionCompression: enabled
Create an XFS file system on the vdo1 volume, and mount it on /mnt/vdo1.
Create an XFS file system on the vdo1 volume.
Wait until the system registers the device node.
[root@servera ~]#mkfs.xfs -K /dev/mapper/vdo1...output omitted...[root@servera ~]#udevadm settle
Create the /mnt/vdo1 directory.
[root@servera ~]#mkdir -m 1777 /mnt/vdo1
Mount the vdo1 volume on /mnt/vdo1.
[root@servera ~]#mount /dev/mapper/vdo1 /mnt/vdo1/
Create several copies of a file on the vdo1 volume to verify how deduplication takes place.
Verify the status of the vdo1 volume.
When created, a VDO volume reserves around 3 or 4 GB for itself.
[root@servera ~]#vdostats --human-readableDevice Size Used Available Use% Space saving% /dev/mapper/vdo1 20.0G 4.0G 16.0G 20% 98%
Download the http://content.example.com/rhel8.0/x86_64/dvd/images/install.img file, and copy it to the /mnt/vdo1 directory.
It may take up to a minute to download it.
[root@servera ~]#wget \>http://content.example.com/rhel8.0/x86_64/dvd/images/install.img[root@servera ~]#cp install.img /mnt/vdo1
Verify the status of the vdo1 volume to see the changes in Use%, and Space saving%.
[root@servera ~]#vdostats --human-readableDevice Size Used Available Use% Space saving% /dev/mapper/vdo1 20.0G 4.4G 15.6G 22% 3%
Create another copy of the install.img file in the /mnt/vdo1 directory.
[root@servera ~]#cp install.img /mnt/vdo1/install.img.2
Verify the status of the vdo1 volume, and the size increase of Space saving%.
[root@servera ~]#vdostats --human-readableDevice Size Used Available Use% Space saving% /dev/mapper/vdo1 20.0G 4.5G 15.5G 22% 50%
Create an additional copy of the install.img file in the /mnt/vdo1 directory.
[root@servera ~]#cp install.img /mnt/vdo1/install.img.3
Verify the status of the vdo1 volume, and the size increase of Space saving%.
[root@servera ~]#vdostats --human-readableDevice Size Used Available Use% Space saving% /dev/mapper/vdo1 20.0G 4.5G 15.5G 22% 67%
Remove the vdo1 volume.
When done, log out from servera.
Unmount the vdo1 volume.
[root@servera ~]#umount /mnt/vdo1
Remove the vdo1 volume.
[root@servera ~]#vdo remove --name=vdo1Removing VDO vdo1 Stopping VDO vdo1
Log out from servera.
[root@servera ~]#exit[student@workstation ~]$
This concludes the guided exercise.