Does LVM HDD fail “mount” command when booting from CDROM

fscklukslvmmount

Currently I have a superuser post asking if I can install/upgrade existing LUKS/LVM without having to erase and rebuild the partitions. This has provided instructions to mount the HDD, but there are errors. I've reprinted the steps below and indicated the error I'm experiencing. Another post on the same topic offers the same advise, but doesn't seem to have the same problems that I'm having.

My goal is to determine if I can upgrade using the existing LUKS and LVM. However, the problem is the same if I wanted to perform fsck operations on my internal HDD booting from LIVE media CD.

One: Open up the encrypted volume

 su -
 cryptsetup luksOpen /dev/sda3 cryptLVM

Two: Create all necessary directories:

2. 
mkdir /mnt/{home,proc,dev,sys}

Three: Mount LVM:

3. 
mount /dev/mapper/cryptVG-root /mnt
mount /dev/mapper/cryptVG-data /mnt/home

Four: Mount all system file systems:

4.
mount -t proc /proc /mnt/proc
mount --bind /sys /mnt/sys
mount --bind /dev /mnt/dev

The trouble occurs between 3-4.

> mount: you must specify the filesystem type

If I specify -t ext4, then I get another error.

> mount: special device /dev/mapper/cryptVG-data does not exist

UPDATE: I also have a post about the LUKS/cryptsetup name value as I try to figure out how these actions cooperate to mount HDD.

Best Answer

Depending on your setup, you may need to explicitly enable the corresponding volume group before or after using cryptsetup.

As already mentioned in this comment, try vgscan and/or vgdisplay first.

You can then enable all available logical volumes in the volume group with vgchange -ay.

Related Question