You are not logged in.

#1 2013-06-23 20:07:47

douglasr
Member
Registered: 2012-12-21
Posts: 19

Mounting an LVM on Luks Partition [SOLVED]

Hello Arch Linux Community:

This likely sounds like a very stupid question, but I have honestly hit a wall and need some advice. To make a long story short I was messing around in some configuration files and forgot to undo a change that I made before rebooting, which has rendered my system mostly inoperable. (I mistakenly changed the address for Bash in /etc/shells, so I can't log in as either my user or root). Now ordinarily this would be a very simple fix, but for whatever reason it is proving to be far more difficult that I anticipated. My root partition is stored as Logical Volume on a Physical Volume on /dev/sda3 and the entire Volume Group (containing my root, home, swap and var partitions) is locked up with Luks.

I booted my computer to an Arch live CD and attempted to mount the root filesystem, though wasn't exactly sure how to go about doing it (I tried several methods). First I tried just opening the root logical volume and mounting that.

# cryptsetup luksOpen /dev/sda3 rootvol
# mount /dev/mapper/rootvol /mnt

This resulted in the system alerting me that the device I was trying to mount was an LVM2 member and that the system could not do it. So next I tried opening the entire Volume Group.

# cryptsetup luksOpen /dev/sda3 VolGroup00
# mount /dev/mapper/VolGroup00 /mnt

Which, as I expected did not work. However, when I tried to mount the root volume again (having opened the entire Volume Group)

# mount /dev/mapper/VolGroup00-rootvol /mnt

and

# mount /dev/VolGroup00/rootvol /mnt

the system alerted me that the device I was trying to mount did not exist, which is odd considering that running

# lvdisplay /dev/VolGroup00

showed all of my logical volumes to exist at the locations /dev/VolGroup00/foo.

I could really use some guidance here. I know that I'm probably missing something very stupid and obvious, but I cannot for the life of me see it. Thank you for your time.

Douglas Bahr Rumbaugh, Jr.

Last edited by douglasr (2013-06-23 23:14:56)

Offline

#2 2013-06-23 20:17:17

vacant
Member
From: downstairs
Registered: 2004-11-05
Posts: 816

Re: Mounting an LVM on Luks Partition [SOLVED]

After the luksOpen I believe you need

vgchange -a y

Offline

#3 2013-06-23 23:14:29

douglasr
Member
Registered: 2012-12-21
Posts: 19

Re: Mounting an LVM on Luks Partition [SOLVED]

That did it, thank you.

Offline

#4 2013-06-23 23:16:26

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Mounting an LVM on Luks Partition [SOLVED]

Moving to NC...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB