Dracut Emerg Shell: Mount LVM2 volume

0

How can I mount a (LUKS encrypted) LVM volume in the dracut emergency shell?

I made fatal changes to /etc/fstab that needs to be undone.

I did cryptsetup luksOpen /dev/mmcblk0p2 crypthome and entered the passphrase.

Then tried to mount: mount /dev/mapper/crypthome /mnt/crypthome

but got this error message:

mount: unknown filesystem type 'LVM2_member'

Isn't it possible to mount a LVM partition in dracut?

John Fiddle

Posted 2017-08-26T07:38:22.020

Reputation: 1

Answers

0

You do not mount "LVM Partition" as you call it - that's a physical volume (PV). LVM is all about using "logical volumes" (LVs) backed by PVs.

  1. You should see if LV is present and active (lvs). 1.1 If it is not present, you should run pvscan --cache /dev/mapper/crypthome. And go to one. 1.2 If it is not active, run lvchange -ay $VG/$LV
  2. Mount the LV: mount /dev/$VG/$LV

Martian

Posted 2017-08-26T07:38:22.020

Reputation: 749