Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question
1  
Don't you need to tell LVM to rescan for volumes after unlocking the encrypted volume? I don't know anything about LVM, admittedly, but vgscan/pvscan look relevant. –  grawity Jun 13 '12 at 21:15

1 Answer 1

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.

share|improve this answer
    
I just tried the vgscan and vgdisplay commands. They only seem to report info (unless the Man page is incomplete). I'm guessing the suggestion is to use them to learn the vg_name for vgchange command? –  xtian Jun 14 '12 at 14:42
1  
@xtian Correct. But you can just use vgchange -ay without any other parameters. This will enable all available logical volumes of all available volume groups. –  speakr Jun 14 '12 at 14:49

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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