Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 03-27-2006, 03:32 PM   #1
Registered: Mar 2003
Location: Greenville, NC
Distribution: Fedora core 4
Posts: 31

Rep: Reputation: 15
Logical Volume recovery

I have a hard drive that was duel booted with windows and fedora. On the fedora I had a rootVG with several logical volumes. While trying something I screwed up the disk and neither partition will boot. I slaved the drive into another computer to get the data I needed off the windows and fedora partitions but I can't figure out how to mount the volume group in fedora without destroying the data.

I can see the partition with "fdisk /dev/sdb" and printing the partition info.

I tried to just mount it.

mount -t ext3 /media/usbdrive /dev/sdb5

but this says I am using the wrong filesystem type. I also tried the following.

fedora logical volume manager to see if it would see the slaved in volume group but since I couldn't mount the partition I couldn't see anything.

lvscan. I see the 4 logical volumes but they are all displayed as "inactive".

vgscan. I see the rootvg as well.

This is slaved into a machine that I don't use logical volumes on so there is not any conflicts with existing volumes.

Does anyone know how to mount the root volume group and the logical volumes to get the data off?
Old 03-27-2006, 03:59 PM   #2
Senior Member
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian
Posts: 2,210

Rep: Reputation: 341Reputation: 341Reputation: 341Reputation: 341
It would be nice to see what your "fdisk -l" output shows. Otherwise I'm just guessing here. I don't know what /dev/sdb5 is. I'm assuming that's your LVM physical volume. You don't mount this directly if this is indeed the case. You mount the logical volumes contained within /dev/sdb5 (which is a physical volume, part of a volume group, which contains logical volumes - or so I'm assuming).

It sounds like you removed the disk from it's original machine and now have it installed on a second machine. Correct? That second machine will need to have the LVM software installed, if it doesn't already. Now, on that second machine, run "vgscan" and then "vgchange -a y". Then run "ls /dev/mapper" and see what shows up. Hopefully your logical volumes will. You should then be able to mount them. Something like the example below:
$ su
# vgscan
# vgchange -a y
# ls /dev/mapper
( this should should list things like /dev/mapper/XXX-YYY )
# mkdir /mnt/tmp
# mount /dev/XXX/YYY /mnt/tmp
# ls /mnt/tmp
From your description, it sounds like you're probably only missing the "vgchange -a y" part. The rest I included only for completeness.
Old 03-27-2006, 07:44 PM   #3
Registered: Mar 2003
Location: Greenville, NC
Distribution: Fedora core 4
Posts: 31

Original Poster
Rep: Reputation: 15
Thanks haertig. After entering the vgchange -a y and rescanning for logical volumes they all said active. I created directories in the /tmp and mounted them. I got all the data off with no problems. Thanks again.


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
Logical Volume Management 2 XaViaR Linux - General 5 08-20-2005 08:48 AM
cloning logical volume with dd astrowill Linux - General 3 07-13-2005 10:59 AM
swapping on a logical volume garba Linux - General 1 06-28-2005 07:36 PM
resizing a logical volume nicentral AIX 2 06-11-2005 05:03 PM
Logical Volume Manager sidmark-2850 Linux - General 3 01-02-2004 02:25 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:00 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