LVM with thin-provisioning fails during boot without thin-provisioning-tools package

2025-07-13

Abstract/Summary

I had an issue, that my Debian 13 (Trixie) server that is mounting an thin-provisioned LVM volume via /etc/fstab was not booting properly due to the missing package thin-provisioning-tools. Installing this package fixed the issue.

Detailed explanation

My server failed booting and logged the following:

Jul 13 07:33:01 srv-7 systemd[1]: dev-mapper-vgmain\x2dlvvmstorage.device: Job dev-mapper-vgmain\x2dlvvmstorage.device/start timed out.
Jul 13 07:33:01 srv-7 systemd[1]: Timed out waiting for device dev-mapper-vgmain\x2dlvvmstorage.device - /dev/mapper/vgmain-lvvmstorage.
Jul 13 07:33:01 srv-7 systemd[1]: Dependency failed for systemd-fsck@dev-mapper-vgmain\x2dlvvmstorage.service - File System Check on /dev/mapper/vgmain-lvvmstorage.
Jul 13 07:33:01 srv-7 systemd[1]: Dependency failed for var-lib-libvirt-images.mount - /var/lib/libvirt/images.
Jul 13 07:33:01 srv-7 systemd[1]: Dependency failed for local-fs.target - Local File Systems.

The failing units are generated by systemd-fstab-generator from fstab. The failing unit is generated from this fstab entry:

/dev/mapper/vgmain-lvvmstorage /var/lib/libvirt/images/ xfs defaults 0 1

vgmain-lvvmstorage is a thin-provisioned logical volume. It was not showing up in /dev/mapper/. Probably because it was not activated (missing a attribute at position 5), as can be seen here:

root@srv-7:~# lvs
  LV          VG     Attr       LSize Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  lvvmstorage vgmain twi---tz-- 1.00t

Manually activating it failed and gave me the following helpful error message:

root@srv-7:~# lvchange --activate y /dev/vgmain/lvvmstorage 
  /usr/sbin/thin_check: execvp failed: No such file or directory
  WARNING: Check is skipped, please install recommended missing binary /usr/sbin/thin_check!

thin_check is contained in thin-provisioning-tools. So I installed that package.

apt install thin-provisioning-tools

After installing the package the activation works and the device can be activated.

root@srv-7:~# lvs
  LV          VG     Attr       LSize Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  lvvmstorage vgmain twi-aotz-- 1.00t             0.00   10.42

This turned out to be reboot safe as well.

The thin-provisioning-tools package is listed in the recommended packages for lvm2 (https://packages.debian.org/trixie/lvm2), however for some reason it was not installed on my system. Maybe I had some kind of to minimal installation for that.