I've got LVM logical volume on top of MDADM RAID1 setup. I'm trying to add SSD device as Cache to this logical volume via:

vgextend dataVG /dev/sdd
lvcreate --type cache --cachemode writethrough -L 120G -n dataLV_cachepool dataVG/dataLV /dev/sdd

All seems to be fine until I reboot my system. After the reboot it fail to start and I get recovery mode (Ubuntu).

I see the following errors during the boot process:

lvm[740]:   dataVG: autoactivation failed.
systemd[1]: lvm2-pvscan@9:2.service: Main process exited, code=exited, status=5/NOTINSTALLED
systemd[1]: lvm2-pvscan@9:2.service: Failed with result 'exit-code'.
systemd[1]: Failed to start LVM2 PV scan on device 9:2.
lvm[774]:   /usr/sbin/cache_check: execvp failed: No such file or directory
lvm[774]:   Check of pool dataVG/dataLV_cachepool failed (status:2). Manual repair required!
lvm[774]:   0 logical volume(s) in volume group "dataVG" now active
lvm[774]:   dataVG: autoactivation failed.
systemd[1]: Started File System Check on /dev/mapper/BACKUPVG-mainbackup.
systemd[1]: lvm2-pvscan@8:16.service: Main process exited, code=exited, status=5/NOTINSTALLED
systemd[1]: lvm2-pvscan@8:16.service: Failed with result 'exit-code'.
systemd[1]: Failed to start LVM2 PV scan on device 8:16.
systemd[1]: Mounting /mnt/mainbackup...
systemd[1]: Mounted /mnt/mainbackup.
kernel: EXT4-fs (dm-1): mounted filesystem with ordered data mode. Opts: (null)
systemd[1]: dev-mapper-dataVG\x2dataLV.device: Job dev-mapper-dataVG\x2dataLV.device/start timed out.
systemd[1]: Timed out waiting for device dev-mapper-dataVG\x2dataLV.device.
systemd[1]: Dependency failed for /mnt/dataLV.
systemd[1]: Dependency failed for Local File Systems.
systemd[1]: local-fs.target: Job local-fs.target/start failed with result 'dependency'.
systemd[1]: local-fs.target: Triggering OnFailure= dependencies.
systemd[1]: mnt-dataLV.mount: Job mnt-dataLV.mount/start failed with result 'dependency'.
systemd[1]: Dependency failed for File System Check on /dev/mapper/dataVG-dataLV.
systemd[1]: systemd-fsck@dev-mapper-dataVG\x2dataLV.service: Job systemd-fsck@dev-mapper-dataVG\x2dataLV.service/start failed with resu
systemd[1]: dev-mapper-dataVG\x2dataLV.device: Job dev-mapper-dataVG\x2dataLV.device/start failed with result 'timeout'.

It works only when I remove cached drive from the VG:

lvconvert --uncache dataVG/dataLV

Not sure how to approach this issue...

LVM version:

LVM version:     2.02.176(2) (2017-11-03)
Library version: 1.02.145 (2017-11-03)

I think you need cache kernel module (dm-cache) and /usr/sbin/cache_* tools in your init ramdisk. In fedora it is handled by dracut, in debian (and ubuntu) initramfs-tools package.

  • unfortunately adding dm-cache (modprobe dm-cache) and installing the required package didn't help. Also it looks like my folder /usr/sbin/ is missing cache_* tools. – Timka Mar 13 '18 at 3:50
  • Do you have thin-provisioning-tools installed? – Martian Mar 14 '18 at 7:13
  • looks like it is installed. I've tried to re-install it and add the cache drive to my existing LVM configuration. Unfortunately, this failed with the same error – Timka Mar 19 '18 at 15:18

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.