[Vdo-devel] Trying to test thin provisioned LVM on VDO

James Hogarth james.hogarth at gmail.com
Wed Jul 11 08:36:36 UTC 2018


Hi,

So I'm doing some testing with a view to running thin provisioned LVM
on VDO (principally for docker usage) in the near future but I'm
getting some odd behaviour I'd like clarified.

I followed the RHEL7.5 storage documentation for the appropriate
commands but I appear to have hit a scenario where VDO is not being
informed of discards, and is thus never freeing its pool.

I'm running kernel 4.17.4-200.fc28.x86_64 and the Fedora 28 COPR build of VDO.

Device /dev/sdb2 is a ~512GB partition on a 1TB rotational disk.

The steps taken to create the volumes:

vdo create --name=storage --device=/dev/sdb2
pvcreate /dev/mapper/storage
vgcreate VG_storage /dev/mapper/storage
lvcreate -l100%FREE -T VG_storage/LV_thinpool
lvcreate -V150G -T VG_storage/LV_thinpool -n steam
lvcreate -V150G -T VG_storage/LV_thinpool -n gog
lvcreate -V500G -T VG_storage/LV_thinpool -n vmimages
lvcreate -V50G -T VG_storage/LV_thinpool -n vmisos

Filesystems were just created with:
mkfs -t xfs /dev/mapper/VG_storage-gog

The fstab looks like this for each line:
/dev/mapper/VG_storage-vmimages /var/lib/libvirt/images xfs
defaults,x-systemd.requires=vdo.service 0 0


When starting the system the kernel reports in the logs:

Jul 11 08:53:43 james-lap kernel: device-mapper: thin: Data device
(dm-4) max discard sectors smaller than a block: Disabling discard
passdown.

According to dmsetup device 4 is:
VG_storage-LV_thinpool_tdata (253:4)

After copying a few VM images into the libvirt images directory I removed them.

LVS and VDO showed the used space the same after removal.

I carried out an fstrim on the libvirt images partition.

LVS showed the used space drop to essentially zero ... but VDO didn't
show the same reclamation of space.

What am I missing here? Did I need to do the "vdo create" or vgcreate
or lvcreate with specific block size options to ensure discards reach
the VDO layer?




More information about the vdo-devel mailing list