To run fsck
on a LUKS (dm-crypt) based LVM physical volume on a Linux system, you will need to first unlock the LUKS volume and then activate the LVM volume group.
Here's an example of how to run fsck
on a LUKS based LVM physical volume:
cryptsetup luksOpen /dev/sda1 lvmSourwww:ec.lautturi.com
This will unlock the LUKS volume on /dev/sda1
and map it to the device /dev/mapper/lvm
.
vgchange -ay
This will activate all the LVM volume groups on the system.
fsck
on the LVM logical volume:fsck /dev/mapper/vg0-lv0
This will run fsck
on the logical volume lv0
in the volume group vg0
.
cryptsetup luksClose lvm vgchange -an