Professional Documents
Culture Documents
Disclaimer
These are my study notes for the RHCSA exam on disk compression. There’s most likely more information than what’s needed for the exam, and
I cannot guarantee that all information is correct.
Definition
Virtual Data Optimizer (VDO) provides inline data reduction for Linux in the form of deduplication, compression, and thin provisioning. When you
set up a VDO volume, you specify a block device on which to construct your VDO volume and the amount of logical storage you plan to present.
In the Red Hat Enterprise Linux 7.5 Beta, we introduced virtual data optimizer (VDO). VDO is a kernel module that can
save disk space and reduce replication bandwidth. VDO sits on top of any block storage device and provides zero-block
elimination, deduplication of redundant blocks, and data compression.
VDO can be applied to a block device, and then normal disk operations can be applied to that device. LVM for example, can sit on top of VDO.
Physical disk -> VDO -> Volumegroup -> Logical volume -> file system
The memory required for the UDS index is determined by the index type and the required size of the deduplication window:
https://blog.victormendonca.com/2020/03/14/rhsa-v8-configure-disk-compression/ 1/5
6/14/2020 RHCSA V8: Configure Disk Compression · Victor's Blog
Storage
Logical Size
Specifies the logical VDO volume size. The VDO Logical Size is how much storage we tell the OS that we have. Because of reduction and
deduplication, this number will be bigger than the real physical size. This ratio will vary according to the type of data that is being stored (binary,
video, audio, compressed data will have a very low ratio).
Use logical size that is ten times the physical size of your block device. For example, if your block device is 1TB in size, use 10T here.
Use logical size that is three times the physical size of your block device. For example, if your block device is 1TB in size, use 3T here.
Slab Size
Specifies the size of the increment by which a VDO is grown. All of the slabs for a given volume will be of the same size, which may be any
power of 2 multiple of 128 MB up to 32 GB. At least one entire slab is reserved by VDO for metadata, and therefore cannot be used for storing
user data.
The default slab size is 2 GB in order to facilitate evaluating VDO on smaller test systems. A single VDO volume may have up to 8096 slabs.
Therefore, in the default configuration with 2 GB slabs, the maximum allowed physical storage is 16 TB. When using 32 GB slabs, the maximum
allowed physical storage is 256 TB.
https://blog.victormendonca.com/2020/03/14/rhsa-v8-configure-disk-compression/ 2/5
6/14/2020 RHCSA V8: Configure Disk Compression · Victor's Blog
https://blog.victormendonca.com/2020/03/14/rhsa-v8-configure-disk-compression/ 3/5
6/14/2020 RHCSA V8: Configure Disk Compression · Victor's Blog
To disable deduplication during VDO block creation (so only compression is used), use the --deduplication=disabled option (you will not be
able to use the sparseIndex option)
Compression
In addition to block-level deduplication, VDO also provides inline block-level compression using the HIOPS Compression™ technology.
Compression operates on blocks that have not been identified as duplicates. When unique data is seen for the first time, it is compressed.
Subsequent copies of data that have already been stored are deduplicated without requiring an additional compression step.
Configuration Steps
Install vdo (and if not installed by default kmod-vdo )
Optionally add LVM config, and/or create the file system (make sure to use the option to not discard blocks)
# mkfs.xfs -K /dev/mapper/[name]
# udevadm settle
https://blog.victormendonca.com/2020/03/14/rhsa-v8-configure-disk-compression/ 4/5
6/14/2020 RHCSA V8: Configure Disk Compression · Victor's Blog
To add it to /etc/fstab . You will need to add additional params so that systemd waits for VDO to start before mounting
x-systemd.device-timeout=
Configure how long systemd should wait for a device to show up before
giving up on an entry from /etc/fstab. Specify a time in seconds or
explicitly append a unit such as "s", "min", "h", "ms".
x-systemd.requires=
Configures a Requires= and an After= dependency between the created mount
unit and another systemd unit, such as a device or mount unit.
Administration
Check for real physical space usage
# vdostats --human-readable
https://blog.victormendonca.com/2020/03/14/rhsa-v8-configure-disk-compression/ 5/5