Bookmark this page

Guided Exercise: Compressing and Deduplicating Storage with VDO

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.

  1. On servera, create a VDO volume named vdo1, with the /dev/vdd device. Set its logical size to 20 GB.

    1. Log in to servera as the root user.

      [student@workstation ~]$ ssh root@servera
    2. 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=20G
      Creating VDO vdo1
      Starting VDO vdo1
      Starting compression on VDO vdo1
      VDO instance 0 volume is ready at /dev/mapper/vdo1
    3. Verify that the vdo1 volume is available.

      [root@servera ~]# vdo list
      vdo1
      
  2. Verify that both compression and deduplication features are enabled on the vdo1 volume.

    1. Verify that deduplication is enabled on the vdo1 volume.

      [root@servera ~]# vdo status -n vdo1 | grep Deduplication
        Deduplication: enabled
    2. Verify that compression is enabled on the vdo1 volume.

      [root@servera ~]# vdo status -n vdo1 | grep Compression
        Compression: enabled
  3. Create an XFS file system on the vdo1 volume, and mount it on /mnt/vdo1.

    1. 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
    2. Create the /mnt/vdo1 directory.

      [root@servera ~]# mkdir -m 1777 /mnt/vdo1
    3. Mount the vdo1 volume on /mnt/vdo1.

      [root@servera ~]# mount /dev/mapper/vdo1 /mnt/vdo1/
  4. Create several copies of a file on the vdo1 volume to verify how deduplication takes place.

    1. Verify the status of the vdo1 volume. When created, a VDO volume reserves around 3 or 4 GB for itself.

      [root@servera ~]# vdostats --human-readable
      Device                    Size      Used Available Use% Space saving%
      /dev/mapper/vdo1         20.0G      4.0G     16.0G  20%           98%
    2. 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
    3. Verify the status of the vdo1 volume to see the changes in Use%, and Space saving%.

      [root@servera ~]# vdostats --human-readable
      Device                    Size      Used Available Use% Space saving%
      /dev/mapper/vdo1         20.0G      4.4G     15.6G  22%            3%
    4. Create another copy of the install.img file in the /mnt/vdo1 directory.

      [root@servera ~]# cp install.img /mnt/vdo1/install.img.2
    5. Verify the status of the vdo1 volume, and the size increase of Space saving%.

      [root@servera ~]# vdostats --human-readable
      Device                    Size      Used Available Use% Space saving%
      /dev/mapper/vdo1         20.0G      4.5G     15.5G  22%           50%
    6. Create an additional copy of the install.img file in the /mnt/vdo1 directory.

      [root@servera ~]# cp install.img /mnt/vdo1/install.img.3
    7. Verify the status of the vdo1 volume, and the size increase of Space saving%.

      [root@servera ~]# vdostats --human-readable
      Device                    Size      Used Available Use% Space saving%
      /dev/mapper/vdo1         20.0G      4.5G     15.5G  22%           67%
  5. Remove the vdo1 volume. When done, log out from servera.

    1. Unmount the vdo1 volume.

      [root@servera ~]# umount /mnt/vdo1
    2. Remove the vdo1 volume.

      [root@servera ~]# vdo remove --name=vdo1
      Removing VDO vdo1
      Stopping VDO vdo1
                  
    3. Log out from servera.

      [root@servera ~]# exit
      [student@workstation ~]$ 

This concludes the guided exercise.

Revision: rh354-8.0-0e36520