Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 10-30-2008, 08:36 PM   #1
Registered: Aug 2006
Location: London
Distribution: Debian, Kubuntu
Posts: 572

Rep: Reputation: 75
Mounting LUKS encrypted drive from a failed pc: LVM2 error

Hello guys,

Here's a problem:

I have a hard drive from a failed laptop. This hard drive is fully encrypted (LUKS) (apart from /boot of course). Now I need to recover some data from it so I put it into a USB caddy. Former /boot (dev/sdb2) mounts automatically without any problem.

However when it comes to the main thing (/dev/sdb5) that's actually encrypted I run into LVM issue.

When I try to do this:

sudo cryptsetup luksOpen /dev/sdb5 /mnt
and successfully enter the passphrase, I get this error:

Command failed: dm_task_set_name: Device /mnt not found
(GDecrypt reports this error like this: Detecting filesystem...done. Result: LVM2_member)

LVM indeed was used on the old system.

How do I work around it?

Old 10-31-2008, 03:34 AM   #2
Registered: Aug 2006
Location: London
Distribution: Debian, Kubuntu
Posts: 572

Original Poster
Rep: Reputation: 75
Never mind, I figured it out - thanks mainly to this post:

Basically with the problem like mine the first thing needed is to install lvm2:

sudo apt-get install lvm2

Then I plug in USB drive and in desktop environment I'm prompted for a passphrase for the just attached encrypted volume. So I type in a passphrase. Nothing happens as this is LVM volume and it needs to be mounted differently.

So I do:

sudo pvs

Under VG column I find a name of the volume group I need.


sudo lvdisplay <volume_group_name>

Result gives me to volumes - one named 'swap' and the other - 'root'. Clearly it's the 'root' that I need to recover my data.

So the last thing I do:

sudo mount /dev/<volume_group_name>/<volume(in my case 'root')> /mnt

And there you go - I have my data back!


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
LUKS + RAID + LVM2 and suspend to ram vehn Slackware 3 12-14-2011 07:54 AM
Removing a drive from LVM2 ... tomazN Linux - Software 5 10-14-2009 08:55 AM
LXer: Automatically Unlock LUKS Encrypted Drives With A Keyfile LXer Syndicated Linux News 0 07-09-2008 03:40 PM
mount luks encrypted partition with kdm mattydee Slackware 2 01-28-2008 12:32 AM
cryptsetup-luks error flying-tuxman Linux - Security 2 11-20-2006 11:08 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:12 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration