LVM problem: Unable to mount encrypted Luks HDs after reinstalling Ubuntu

Asked by ateneto

Hallo,

I am using Ubuntu 14.04 on a Thinkpad E145 Edge.
Recently I deleted old kernels following a guide online.
The next day I could not start Ubuntu anymore and was unable to repair my Ubuntu installation.

I have now reinstalled Ubuntu on another HD.

The problem is when I try to mount my old encrypted HDs in the new installation I get the following error:
The unlocked device does not have a recognizable file system on it.

I can enter the password and it is accepted.
The partition is unlocked but is not mounted with the GUI.

http://postimg.org/image/y3gw4x0xb/
http://postimg.org/image/8owl8wlff/

Strangely after the installation I can also no longer automatically mount my other fat32 1000gb HD.
A 16 gb USB with fat32 mounts without problems.

I would really appreciate to access my data again and so far all my online researches have not turned up anyting useful.

So far I have not used any terminal commands as I am not familiar with those.

Help is highly appreciated!

Best,
Sebastian

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Manfred Hampl
Solved:
Last query:
Last reply:
Revision history for this message
ateneto (st-3) said :
#1

When I mount the drive in the terminal
it is mounted and no error is given. But I can not access any data.
The drive appears to be empty.

$ sudo mkdir /media/newhd
$ sudo mount /dev/sdb1 /media/newhd

http://postimg.org/image/o1nhf9iln/

Revision history for this message
ateneto (st-3) said :
#2

After reading up on mounting a Luks volume in the terminal I managed to do it following this guide:
http://askubuntu.com/questions/63594/mount-encrypted-volumes-from-command-line

Now the error I get is mount: you must specify the filesystem type

http://postimg.org/image/4fyc71o9f/

Revision history for this message
Manfred Hampl (m-hampl) said :
#3

If it is a luks encrypted lvm partition, then the steps under the heading "Setup ~ Desktop (Live) CD, Adding the tools to manage encrypted partitions" in http://ubuntuforums.org/showthread.php?t=726724 should allow mounting (stop before the heading "resizing").

What is the output of
sudo vgscan --mknodes
sudo vgchange -ay

Revision history for this message
ateneto (st-3) said :
#4

First of all thank you very MUCH for your quick response!

Here the output from
sudo vgscan --mknodes
sudo vgchange -ay
http://postimg.org/image/j786r9qnl/

The required packages were already installed:
http://postimg.org/image/f4p718la5/

Revision history for this message
ateneto (st-3) said :
#5

After following the guide:
http://ubuntuforums.org/showthread.php?t=726724

I still get the same error

mount: you must specify the filesystem type

http://postimg.org/image/4fyc71o9f/

Revision history for this message
ateneto (st-3) said :
#6

When I specify a file system I get the following result:

sog@sog-workstation:~$ sudo mount /dev/mapper/encrypted /media/my_device -t vfat
mount: wrong fs type, bad option, bad superblock on /dev/mapper/encrypted,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail or so

sog@sog-workstation:~$ dmesg | tail
[ 1013.554052] FAT-fs (dm-3): Can't find a valid FAT filesystem
[ 1561.027806] EXT4-fs (dm-3): VFS: Can't find ext4 filesystem
[ 1561.028472] EXT4-fs (dm-3): VFS: Can't find ext4 filesystem
[ 1561.029084] EXT4-fs (dm-3): VFS: Can't find ext4 filesystem
[ 1561.029752] FAT-fs (dm-3): invalid media value (0x4b)
[ 1561.029761] FAT-fs (dm-3): Can't find a valid FAT filesystem
[ 1996.300041] FAT-fs (dm-3): invalid media value (0x4b)
[ 1996.300053] FAT-fs (dm-3): Can't find a valid FAT filesystem
[ 2105.277265] FAT-fs (dm-3): invalid media value (0x4b)
[ 2105.277277] FAT-fs (dm-3): Can't find a valid FAT filesystem
sog@sog-workstation:~$

Revision history for this message
Manfred Hampl (m-hampl) said :
#7

What is the output of

sudo lvscan -a
sudo ls -l /dev/mapper /dev/it-vg
df -h
mount

Revision history for this message
ateneto (st-3) said :
#8

sog@sog-workstation:~$ sudo lvscan -a
  ACTIVE '/dev/it-vg/root' [47.68 GiB] inherit
  ACTIVE '/dev/it-vg/swap_1' [7.98 GiB] inherit
sog@sog-workstation:~$ sudo ls -l /dev/mapper /dev/it-vg
/dev/it-vg:
total 0
lrwxrwxrwx 1 root root 7 5月 29 17:28 root -> ../dm-1
lrwxrwxrwx 1 root root 7 5月 29 17:28 swap_1 -> ../dm-2

/dev/mapper:
total 0
crw------- 1 root root 10, 236 5月 29 17:28 control
lrwxrwxrwx 1 root root 7 5月 29 17:28 it--vg-root -> ../dm-1
lrwxrwxrwx 1 root root 7 5月 29 17:28 it--vg-swap_1 -> ../dm-2
lrwxrwxrwx 1 root root 7 5月 29 17:29 luks-cbd79597-7093-45e5-8ef4-13a500d3ed97 -> ../dm-3
lrwxrwxrwx 1 root root 7 5月 29 17:28 sda5_crypt -> ../dm-0
sog@sog-workstation:~$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/it--vg-root 47G 4.6G 40G 11% /
none 4.0K 0 4.0K 0% /sys/fs/cgroup
udev 1.6G 4.0K 1.6G 1% /dev
tmpfs 316M 1.3M 315M 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 1.6G 17M 1.6G 2% /run/shm
none 100M 52K 100M 1% /run/user
/dev/sda1 236M 83M 141M 38% /boot
sog@sog-workstation:~$ sudo cryptsetup luksOpen /dev/sdb2 encryptedEnter passphrase for /dev/sdb2:
Enter passphrase for /dev/sdb2:
Cannot use device /dev/sdb2 which is in use (already mapped or mounted).
sog@sog-workstation:~$ sudo mount /dev/mapper/sda5_crypt /media/my_device
mount: unknown filesystem type 'LVM2_member'
sog@sog-workstation:~$

Revision history for this message
ateneto (st-3) said :
#9

I just did that again after rebooting and doing everything in the terminal again.
I think I made a mistake before.
Here is the result:

sog@sog-workstation:~$ sudo cryptsetup luksOpen /dev/sdb2 encrypted
[sudo] password for sog:
Sorry, try again.
[sudo] password for sog:
Enter passphrase for /dev/sdb2:
sog@sog-workstation:~$ sudo mount /dev/mapper/encrypted /media/my_device
mount: you must specify the filesystem type
sog@sog-workstation:~$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/it--vg-root 47G 4.6G 40G 11% /
none 4.0K 0 4.0K 0% /sys/fs/cgroup
udev 1.6G 4.0K 1.6G 1% /dev
tmpfs 316M 1.3M 315M 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 1.6G 152K 1.6G 1% /run/shm
none 100M 48K 100M 1% /run/user
/dev/sda1 236M 83M 141M 38% /boot
sog@sog-workstation:~$ sudo lvscan -a
  ACTIVE '/dev/it-vg/root' [47.68 GiB] inherit
  ACTIVE '/dev/it-vg/swap_1' [7.98 GiB] inherit
sog@sog-workstation:~$ sudo ls -l /dev/mapper /dev/it-vg
/dev/it-vg:
total 0
lrwxrwxrwx 1 root root 7 5月 29 17:51 root -> ../dm-1
lrwxrwxrwx 1 root root 7 5月 29 17:51 swap_1 -> ../dm-2

/dev/mapper:
total 0
crw------- 1 root root 10, 236 5月 29 17:51 control
lrwxrwxrwx 1 root root 7 5月 29 17:52 encrypted -> ../dm-3
lrwxrwxrwx 1 root root 7 5月 29 17:51 it--vg-root -> ../dm-1
lrwxrwxrwx 1 root root 7 5月 29 17:51 it--vg-swap_1 -> ../dm-2
lrwxrwxrwx 1 root root 7 5月 29 17:51 sda5_crypt -> ../dm-0
sog@sog-workstation:~$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/it--vg-root 47G 4.6G 40G 11% /
none 4.0K 0 4.0K 0% /sys/fs/cgroup
udev 1.6G 4.0K 1.6G 1% /dev
tmpfs 316M 1.3M 315M 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 1.6G 152K 1.6G 1% /run/shm
none 100M 48K 100M 1% /run/user
/dev/sda1 236M 83M 141M 38% /boot
sog@sog-workstation:~$ sudo mount /dev/mapper/encrypted /media/my_device
mount: you must specify the filesystem type
sog@sog-workstation:~$

Revision history for this message
ateneto (st-3) said :
#10

side note:
Now that I have learned how to mount a drive using the terminal I am able to mount my other fat32 unencrypted 1000 gb HD using the terminal. Strangely it does not mount automatically when I plug it in.

Otherwise the situation is unchanged mounting the encrypted disk after unlocking it returns:
sog@sog-workstation:~$ sudo mount /dev/mapper/encrypted /media/my_device
mount: you must specify the filesystem type

Revision history for this message
ateneto (st-3) said :
#11

Here again what nautilus shows:
http://postimg.org/image/izyimcnkt/
http://postimg.org/image/mvkg6r4ob/

There is a 60 gb SSD in the notebook. The current installation is on that drive.
This SSD is also encrypted and is obviously mounted correctly.
The other HD is connected through USB and is a 1000 gb drive.

Revision history for this message
ateneto (st-3) said :
#12

This is the situation in the terminal:

sog@sog-workstation:~$ sudo mount /dev/sdb2 /media/newhd
[sudo] password for sog:
mount: unknown filesystem type 'crypto_LUKS'
sog@sog-workstation:~$ sudo cryptsetup luksOpen /dev/sdb2 encrypted
Enter passphrase for /dev/sdb2:
sog@sog-workstation:~$ sudo mount /dev/mapper/encrypted /media/my_device
mount: you must specify the filesystem type
sog@sog-workstation:~$ df -H
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/it--vg-root 51G 5.0G 43G 11% /
none 4.1k 0 4.1k 0% /sys/fs/cgroup
udev 1.7G 4.1k 1.7G 1% /dev
tmpfs 332M 1.3M 330M 1% /run
none 5.3M 0 5.3M 0% /run/lock
none 1.7G 164k 1.7G 1% /run/shm
none 105M 50k 105M 1% /run/user
/dev/sda1 247M 87M 148M 38% /boot
sog@sog-workstation:~$ mount
/dev/mapper/it--vg-root on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/cgroup type tmpfs (rw)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755)
none on /sys/fs/pstore type pstore (rw)
/dev/sda1 on /boot type ext2 (rw)
systemd on /sys/fs/cgroup/systemd type cgroup (rw,noexec,nosuid,nodev,none,name=systemd)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,user=sog)
sog@sog-workstation:~$

Revision history for this message
ateneto (st-3) said :
#13

Here finally the answer to
Manfred Hampl (m-hampl) said 2 hours ago: #7

What is the output of

sudo lvscan -a
sudo ls -l /dev/mapper /dev/it-vg
df -h
mount

sog@sog-workstation:~$ sudo lvscan -a
  ACTIVE '/dev/it-vg/root' [47.68 GiB] inherit
  ACTIVE '/dev/it-vg/swap_1' [7.98 GiB] inherit
sog@sog-workstation:~$ sudo ls -l /dev/mapper /dev/it-vg
/dev/it-vg:
total 0
lrwxrwxrwx 1 root root 7 5月 29 18:26 root -> ../dm-1
lrwxrwxrwx 1 root root 7 5月 29 18:26 swap_1 -> ../dm-2

/dev/mapper:
total 0
crw------- 1 root root 10, 236 5月 29 18:26 control
lrwxrwxrwx 1 root root 7 5月 29 19:50 encrypted -> ../dm-3
lrwxrwxrwx 1 root root 7 5月 29 18:26 it--vg-root -> ../dm-1
lrwxrwxrwx 1 root root 7 5月 29 18:26 it--vg-swap_1 -> ../dm-2
lrwxrwxrwx 1 root root 7 5月 29 18:26 sda5_crypt -> ../dm-0
sog@sog-workstation:~$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/it--vg-root 47G 4.7G 40G 11% /
none 4.0K 0 4.0K 0% /sys/fs/cgroup
udev 1.6G 4.0K 1.6G 1% /dev
tmpfs 316M 1.3M 315M 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 1.6G 160K 1.6G 1% /run/shm
none 100M 48K 100M 1% /run/user
/dev/sda1 236M 83M 141M 38% /boot
sog@sog-workstation:~$ mount
/dev/mapper/it--vg-root on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/cgroup type tmpfs (rw)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755)
none on /sys/fs/pstore type pstore (rw)
/dev/sda1 on /boot type ext2 (rw)
systemd on /sys/fs/cgroup/systemd type cgroup (rw,noexec,nosuid,nodev,none,name=systemd)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,user=sog)
sog@sog-workstation:~$

Revision history for this message
ateneto (st-3) said :
#14

I just performed a file system consistency check on the decrypted drive.
That is producing interesting results.
After the first round finished and many errors were detected the second round now looks like this:
http://postimg.org/image/bdwbxh17v/

# fsck -vy /dev/mapper/encrypted

Revision history for this message
ateneto (st-3) said :
#15

Success...!
The first drive was fixed with fsck and I can use it again.

Now fixing the second drive...

Revision history for this message
ateneto (st-3) said :
#16

Unfortunately the other drive is not so easily fixed.
That drive is my former main notebook drive.

Here the result of everything I did on the first disk to make it work again:

sog@sog-workstation:~$ sudo modprobe dm-crypt
[sudo] password for sog:
sog@sog-workstation:~$ sudo cryptsetup luksOpen /dev/sda5 encrypted
Device encrypted already exists.
sog@sog-workstation:~$ sudo vgscan --mknodes
  Reading all physical volumes. This may take a while...
  Found volume group "it-vg" using metadata type lvm2
  Found volume group "it-vg" using metadata type lvm2
sog@sog-workstation:~$ sudo vgchange -ay
  device-mapper: create ioctl on it--vg-root failed: Device or resource busy
  device-mapper: create ioctl on it--vg-swap_1 failed: Device or resource busy
  0 logical volume(s) in volume group "it-vg" now active
  2 logical volume(s) in volume group "it-vg" now active
sog@sog-workstation:~$ sudo lvscan -a
  inactive '/dev/it-vg/root' [462.20 GiB] inherit
  inactive '/dev/it-vg/swap_1' [3.27 GiB] inherit
sog@sog-workstation:~$ sudo ls -l /dev/mapper /dev/it-vg
/dev/it-vg:
total 0
lrwxrwxrwx 1 root root 7 5月 29 18:26 root -> ../dm-1
lrwxrwxrwx 1 root root 7 5月 29 18:26 swap_1 -> ../dm-2

/dev/mapper:
total 0
crw------- 1 root root 10, 236 5月 29 18:26 control
lrwxrwxrwx 1 root root 7 5月 29 20:55 encrypted -> ../dm-3
lrwxrwxrwx 1 root root 7 5月 29 18:26 it--vg-root -> ../dm-1
lrwxrwxrwx 1 root root 7 5月 29 18:26 it--vg-swap_1 -> ../dm-2
lrwxrwxrwx 1 root root 7 5月 29 18:26 sda5_crypt -> ../dm-0
sog@sog-workstation:~$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/it--vg-root 47G 4.7G 40G 11% /
none 4.0K 0 4.0K 0% /sys/fs/cgroup
udev 1.6G 4.0K 1.6G 1% /dev
tmpfs 316M 1.3M 315M 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 1.6G 156K 1.6G 1% /run/shm
none 100M 48K 100M 1% /run/user
/dev/sda1 236M 83M 141M 38% /boot
/dev/sdb1 236M 48M 176M 22% /media/sog/4e1bce6a-3555-4b0e-a7e2-4dfc81831bfc
sog@sog-workstation:~$ mount
/dev/mapper/it--vg-root on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/cgroup type tmpfs (rw)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755)
none on /sys/fs/pstore type pstore (rw)
/dev/sda1 on /boot type ext2 (rw)
systemd on /sys/fs/cgroup/systemd type cgroup (rw,noexec,nosuid,nodev,none,name=systemd)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,user=sog)
/dev/sdb1 on /media/sog/4e1bce6a-3555-4b0e-a7e2-4dfc81831bfc type ext2 (rw,nosuid,nodev,uhelper=udisks2)
sog@sog-workstation:~$ sudo fsck -vy /dev/mapper/encrypted
fsck from util-linux 2.20.1
fsck: fsck.LVM2_member: not found
fsck: error 2 while executing fsck.LVM2_member for /dev/mapper/encrypted
sog@sog-workstation:~$

Revision history for this message
Manfred Hampl (m-hampl) said :
#17

If you go back to http://postimg.org/image/mvkg6r4ob/

How does that picture look like if you click in the right hand side on the rectangle "Partition 2..." and on "1000 GB unknown"?

Revision history for this message
ateneto (st-3) said :
#18
Revision history for this message
Manfred Hampl (m-hampl) said :
#19

In http://postimg.org/image/54s8c3cjp/ the device name seems to be /dev/mapper/my_encrypted_volume and not /dev/mapper/encrypted ?

What do you see if you click on the cog wheels?

Revision history for this message
ateneto (st-3) said :
#20

I opened again as encrypted.

http://postimg.org/image/4cq099iej/

For some reason I can not make screen shots of the cog wheels.
Bottom left:
Format
Create Disk image
Restore Disk image
Benchmark

Top right:
Create Disk image
Restore Disk image
Benchmark
Power Off

Revision history for this message
ateneto (st-3) said :
#21

http://postimg.org/image/6shypz5th/

Here I have the additional options to:
Edit partition
Change pass phrase
Edit Encryption options

Revision history for this message
ateneto (st-3) said :
#22

Here the complete terminal situation after a cold restart:

sog@sog-workstation:~$ sudo cryptsetup luksOpen /dev/sdb5 encrypted
Enter passphrase for /dev/sdb5:
sog@sog-workstation:~$ sudo mkdir /media/encrypted
sog@sog-workstation:~$ sudo mount /dev/mapper/encrypted /media/encrypted
mount: unknown filesystem type 'LVM2_member'

sog@sog-workstation:~$ sudo vgscan --mknodes
  Reading all physical volumes. This may take a while...
  Found volume group "it-vg" using metadata type lvm2
  Found volume group "it-vg" using metadata type lvm2
sog@sog-workstation:~$ sudo vgchange -ay
  device-mapper: create ioctl on it--vg-root failed: Device or resource busy
  device-mapper: create ioctl on it--vg-swap_1 failed: Device or resource busy
  0 logical volume(s) in volume group "it-vg" now active
  2 logical volume(s) in volume group "it-vg" now active
sog@sog-workstation:~$ sudo lvscan -a
  inactive '/dev/it-vg/root' [462.20 GiB] inherit
  inactive '/dev/it-vg/swap_1' [3.27 GiB] inherit
sog@sog-workstation:~$ sudo ls -l /dev/mapper /dev/it-vg
/dev/it-vg:
total 0
lrwxrwxrwx 1 root root 7 5月 30 07:52 root -> ../dm-1
lrwxrwxrwx 1 root root 7 5月 30 07:52 swap_1 -> ../dm-2

/dev/mapper:
total 0
crw------- 1 root root 10, 236 5月 30 07:52 control
lrwxrwxrwx 1 root root 7 5月 30 07:57 encrypted -> ../dm-3
lrwxrwxrwx 1 root root 7 5月 30 07:52 it--vg-root -> ../dm-1
lrwxrwxrwx 1 root root 7 5月 30 07:52 it--vg-swap_1 -> ../dm-2
lrwxrwxrwx 1 root root 7 5月 30 07:52 sda5_crypt -> ../dm-0
sog@sog-workstation:~$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/it--vg-root 47G 4.7G 40G 11% /
none 4.0K 0 4.0K 0% /sys/fs/cgroup
udev 1.6G 4.0K 1.6G 1% /dev
tmpfs 316M 1.3M 315M 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 1.6G 156K 1.6G 1% /run/shm
none 100M 44K 100M 1% /run/user
/dev/sda1 236M 83M 141M 38% /boot
/dev/sdb1 236M 48M 176M 22% /media/sog/4e1bce6a-3555-4b0e-a7e2-4dfc81831bfc
sog@sog-workstation:~$ mount
/dev/mapper/it--vg-root on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/cgroup type tmpfs (rw)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755)
none on /sys/fs/pstore type pstore (rw)
/dev/sda1 on /boot type ext2 (rw)
systemd on /sys/fs/cgroup/systemd type cgroup (rw,noexec,nosuid,nodev,none,name=systemd)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,user=sog)
/dev/sdb1 on /media/sog/4e1bce6a-3555-4b0e-a7e2-4dfc81831bfc type ext2 (rw,nosuid,nodev,uhelper=udisks2)
sog@sog-workstation:~$ sudo fsck -vy /dev/mapper/encrypted
fsck from util-linux 2.20.1
fsck: fsck.LVM2_member: not found
fsck: error 2 while executing fsck.LVM2_member for /dev/mapper/encrypted

sog@sog-workstation:~$ sudo mount /dev/mapper/encrypted /media/encryptedmount: unknown filesystem type 'LVM2_member'
sog@sog-workstation:~$

I have the following errors:
fschk: fsck: fsck.LVM2_member: not found fsck: error 2 while executing fsck.LVM2_member for /dev/mapper/encrypted
mount: unknown filesystem type 'LVM2_member'

Assistance how to access is drive is highly appreciated!
Thanks for the help so far!

Revision history for this message
ateneto (st-3) said :
#23

sog@sog-workstation:~$ dmesg |tail
[ 88.902238] sdb: sdb1 sdb2 < sdb5 >
[ 88.903698] sd 1:0:0:0: [sdb] No Caching mode page found
[ 88.903705] sd 1:0:0:0: [sdb] Assuming drive cache: write through
[ 88.903712] sd 1:0:0:0: [sdb] Attached SCSI disk
[ 89.191373] EXT4-fs (sdb1): mounting ext2 file system using the ext4 subsystem
[ 89.193619] EXT4-fs (sdb1): mounted filesystem without journal. Opts: (null)
[ 89.388516] systemd-hostnamed[2596]: Warning: nss-myhostname is not installed. Changing the local hostname might make it unresolveable. Please install nss-myhostname!
[ 1221.970200] type=1400 audit(1432944760.112:65): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/lib/cups/backend/cups-pdf" pid=3270 comm="apparmor_parser"
[ 1221.970220] type=1400 audit(1432944760.112:66): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/sbin/cupsd" pid=3270 comm="apparmor_parser"
[ 1221.971263] type=1400 audit(1432944760.112:67): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/sbin/cupsd" pid=3270 comm="apparmor_parser"
sog@sog-workstation:~$

The nautilus screenshots I sent yesterday are still up to date and look the same now.

Revision history for this message
Manfred Hampl (m-hampl) said :
#24

What was the name of the volume group of the old hard disk? If is was the same as the one of the main disk of the new system ("it-vg"), you might run into problems.

Revision history for this message
ateneto (st-3) said :
#25

One problem i ran into, was duplicate volume groups: Both my recovery system and the drive to be recovered were ubuntu systems with LVM. This is, why I had two ubuntu-vg volume groups (vgdisplay would display both, each with their own UUID, but i couldn't get to their logical volumes).

Yes the volume group names are the same.
I guess the below solution should work for me then.
I will implement that with a Debian live USB and then report back.

My solution builds on the answer of Georg:

Boot off a live-linux (so that you don't run into the duplicate volume group name)
sudo cryptsetup luksOpen /dev/sdaX my_encrypted_volume
enter your passphrase when prompted
sudo vgscan should now pick up the contained volumes/groups.

DRAGONS AHEAD: WE'RE NOW CHANGING THE VOLUME GROUP NAME. YOU WILL NOT BE ABLE TO BOOT THAT DRIVE AFTERWARDS!

use sudo vgrename ubuntu-vg ubuntu-vg2 to rename the volume group.

If you need to boot off that drive, you can do these steps again, but rename your volume group back to ubuntu-vg. A different possibility is to alter your boot configuration to the new vg-name.

Now that the duplicate vg-name is resolved, i can boot back into my regular system, redo the cryptsetup..., vgscan and then mount /dev/mapper/ubuntu--vg2-root anywhere you like.

Revision history for this message
ateneto (st-3) said :
#26

I have renamed the volume group names by starting with a live USB.
But it did not resolve the situation.

Here the terminal situation:

sog@sog-workstation:~$ sudo cryptsetup luksOpen /dev/sdb5 encrypted
[sudo] password for sog:
Enter passphrase for /dev/sdb5:
sog@sog-workstation:~$ sudo fsck -vy /dev/mapper/encrypted
fsck from util-linux 2.20.1
fsck: fsck.LVM2_member: not found
fsck: error 2 while executing fsck.LVM2_member for /dev/mapper/encrypted
sog@sog-workstation:~$ sudo mount /dev/mapper/encrypted /media/encrypted
mount: unknown filesystem type 'LVM2_member'
sog@sog-workstation:~$ sudo modprobe dm-crypt
sog@sog-workstation:~$ sudo vgscan --mknodes
  Reading all physical volumes. This may take a while...
  Found volume group "it-vg2" using metadata type lvm2
  Found volume group "it-vg" using metadata type lvm2
sog@sog-workstation:~$ sudo vgchange -ay
  2 logical volume(s) in volume group "it-vg2" now active
  2 logical volume(s) in volume group "it-vg" now active
sog@sog-workstation:~$ sudo lvscan -a
  ACTIVE '/dev/it-vg2/root' [462.20 GiB] inherit
  ACTIVE '/dev/it-vg2/swap_1' [3.27 GiB] inherit
  ACTIVE '/dev/it-vg/root' [47.68 GiB] inherit
  ACTIVE '/dev/it-vg/swap_1' [7.98 GiB] inherit
sog@sog-workstation:~$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/it--vg-root 47G 6.0G 39G 14% /
none 4.0K 0 4.0K 0% /sys/fs/cgroup
udev 1.6G 4.0K 1.6G 1% /dev
tmpfs 316M 1.3M 315M 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 1.6G 336K 1.6G 1% /run/shm
none 100M 40K 100M 1% /run/user
/dev/sda1 236M 83M 141M 38% /boot
/dev/sdb1 236M 48M 176M 22% /media/sog/4e1bce6a-3555-4b0e-a7e2-4dfc81831bfc
sog@sog-workstation:~$ mount
/dev/mapper/it--vg-root on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/cgroup type tmpfs (rw)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755)
none on /sys/fs/pstore type pstore (rw)
/dev/sda1 on /boot type ext2 (rw)
systemd on /sys/fs/cgroup/systemd type cgroup (rw,noexec,nosuid,nodev,none,name=systemd)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,user=sog)
/dev/sdb1 on /media/sog/4e1bce6a-3555-4b0e-a7e2-4dfc81831bfc type ext2 (rw,nosuid,nodev,uhelper=udisks2)
sog@sog-workstation:~$ sudo fsck -vy /dev/mapper/encrypted
fsck from util-linux 2.20.1
fsck: fsck.LVM2_member: not found
fsck: error 2 while executing fsck.LVM2_member for /dev/mapper/encrypted
sog@sog-workstation:~$ sudo mount /dev/mapper/encrypted /media/encrypted
mount: unknown filesystem type 'LVM2_member'
sog@sog-workstation:~$

Revision history for this message
Manfred Hampl (m-hampl) said :
#27

What is now the output of

sudo ls -l /dev/mapper /dev/it-vg /dev/it-vg2

Revision history for this message
ateneto (st-3) said :
#28

sog@sog-workstation:~$ sudo cryptsetup luksOpen /dev/sdb5 encrypted
[sudo] password for sog:
Enter passphrase for /dev/sdb5:
sog@sog-workstation:~$ sudo ls -l /dev/mapper /dev/it-vg /dev/it-vg2
/dev/it-vg:
total 0
lrwxrwxrwx 1 root root 7 5月 31 11:15 root -> ../dm-1
lrwxrwxrwx 1 root root 7 5月 31 11:15 swap_1 -> ../dm-2

/dev/it-vg2:
total 0
lrwxrwxrwx 1 root root 7 5月 31 18:15 root -> ../dm-4
lrwxrwxrwx 1 root root 7 5月 31 18:15 swap_1 -> ../dm-5

/dev/mapper:
total 0
crw------- 1 root root 10, 236 5月 31 11:15 control
lrwxrwxrwx 1 root root 7 5月 31 18:15 encrypted -> ../dm-3
lrwxrwxrwx 1 root root 7 5月 31 18:15 it--vg2-root -> ../dm-4
lrwxrwxrwx 1 root root 7 5月 31 18:15 it--vg2-swap_1 -> ../dm-5
lrwxrwxrwx 1 root root 7 5月 31 11:15 it--vg-root -> ../dm-1
lrwxrwxrwx 1 root root 7 5月 31 11:15 it--vg-swap_1 -> ../dm-2
lrwxrwxrwx 1 root root 7 5月 31 11:15 sda5_crypt -> ../dm-0
sog@sog-workstation:~$

Revision history for this message
ateneto (st-3) said :
#29

sog@sog-workstation:~$ dmesg | tail
[12447.891131] EXT4-fs (sdb1): mounting ext2 file system using the ext4 subsystem
[12447.896716] EXT4-fs (sdb1): warning: mounting unchecked fs, running e2fsck is recommended
[12447.897009] EXT4-fs (sdb1): mounted filesystem without journal. Opts: (null)
[12448.117283] systemd-hostnamed[6313]: Warning: nss-myhostname is not installed. Changing the local hostname might make it unresolveable. Please install nss-myhostname!
[13622.386472] systemd-hostnamed[6483]: Warning: nss-myhostname is not installed. Changing the local hostname might make it unresolveable. Please install nss-myhostname!
[13631.832589] EXT4-fs (sdb1): mounting ext2 file system using the ext4 subsystem
[13631.878885] EXT4-fs (sdb1): warning: mounting unchecked fs, running e2fsck is recommended
[13631.879305] EXT4-fs (sdb1): mounted filesystem without journal. Opts: (null)
[13632.630107] EXT4-fs (dm-4): ext4_check_descriptors: Block bitmap for group 384 not in group (block 1835757423)!
[13632.630116] EXT4-fs (dm-4): group descriptors corrupted!

Revision history for this message
Best Manfred Hampl (m-hampl) said :
#30

Try running fsck on /dev/dm-4

Revision history for this message
ateneto (st-3) said :
#31

/dev/mapper/it--vg2-root: ***** FILE SYSTEM WAS MODIFIED *****

      233930 inodes used (0.77%, out of 30294016)
        1184 non-contiguous files (0.5%)
         333 non-contiguous directories (0.1%)
             # of inodes with ind/dind/tind blocks: 0/0/0
             Extent depth histogram: 187174/250
    35354267 blocks used (29.18%, out of 121162752)
           0 bad blocks
           1 large file

      151874 regular files
       19102 directories
          57 character device files
          25 block device files
           1 fifo
          13 links
       62861 symbolic links (46414 fast symbolic links)
           1 socket
------------
      233934 files
sog@sog-workstation:~$ sudo mount /dev/mapper/encrypted /media/encrypted
[sudo] password for sog:
mount: unknown filesystem type 'LVM2_member'
sog@sog-workstation:~$ sudo fsck -vy /dev/mapper/encrypted
fsck from util-linux 2.20.1
fsck: fsck.LVM2_member: not found
fsck: error 2 while executing fsck.LVM2_member for /dev/mapper/encrypted
sog@sog-workstation:~$ sudo ls -l /dev/mapper dev/it-vg dev/it-vg2
ls: cannot access dev/it-vg: No such file or directory
ls: cannot access dev/it-vg2: No such file or directory
/dev/mapper:
total 0
crw------- 1 root root 10, 236 5月 31 21:12 control
lrwxrwxrwx 1 root root 7 5月 31 21:13 encrypted -> ../dm-3
lrwxrwxrwx 1 root root 7 5月 31 21:43 it--vg2-root -> ../dm-4
lrwxrwxrwx 1 root root 7 5月 31 21:13 it--vg2-swap_1 -> ../dm-5
lrwxrwxrwx 1 root root 7 5月 31 21:12 it--vg-root -> ../dm-1
lrwxrwxrwx 1 root root 7 5月 31 21:12 it--vg-swap_1 -> ../dm-2
lrwxrwxrwx 1 root root 7 5月 31 21:12 sda5_crypt -> ../dm-0
sog@sog-workstation:~$ dmesg |tail
[ 81.783863] sd 1:0:0:0: [sdb] No Caching mode page found
[ 81.783878] sd 1:0:0:0: [sdb] Assuming drive cache: write through
[ 81.810071] sdb: sdb1 sdb2 < sdb5 >
[ 81.849566] sd 1:0:0:0: [sdb] No Caching mode page found
[ 81.849579] sd 1:0:0:0: [sdb] Assuming drive cache: write through
[ 81.849587] sd 1:0:0:0: [sdb] Attached SCSI disk
[ 82.109891] EXT4-fs (sdb1): mounting ext2 file system using the ext4 subsystem
[ 82.112649] EXT4-fs (sdb1): warning: mounting unchecked fs, running e2fsck is recommended
[ 82.113067] EXT4-fs (sdb1): mounted filesystem without journal. Opts: (null)
[ 82.328492] systemd-hostnamed[2411]: Warning: nss-myhostname is not installed. Changing the local hostname might make it unresolveable. Please install nss-myhostname!
sog@sog-workstation:~$

Revision history for this message
ateneto (st-3) said :
#32

Hallo Manfred,
after rebooting I was now able to mount the HDD.
Thank you very much for your help!
This was a very good experience here.
All the best!
Sebastian

Herzlichen Dank!

Revision history for this message
ateneto (st-3) said :
#33

Thanks Manfred Hampl, that solved my question.