Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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:

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

Three: Mount LVM:

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

Four: Mount all system file systems:

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
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

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
@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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .