LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 01-01-2006, 01:40 PM   #1
carlfacer
LQ Newbie
 
Registered: Jan 2006
Location: Rochester, NY
Distribution: Fedora Core 4
Posts: 1

Rep: Reputation: 0
Mounting LVM drive as a recovery effort


This may be a little weird, so try to follow me ..

About two weeks ago, I was attempting to install a voicemail server on my Fedora Core 4 box and it asked for me to uninstall mgetty, and reinstall a patched version. Well, I used YUM Extender to perform the uninstall, but it also removed every single dependency along with it. As you can guess, I pulled a Paul Bunyon and almost took out the whole system with one swipe. I am able to use CD1 in rescue mode, and view all the data on the drive, but the system gets a "kernel panic" while attempting to boot normally. Unless someone can find a fix for my n00bish error, I will just attempt to recover the data and put it onto a new install of FC4, which I've got on another drive.

I threw in a different drive, and installed FC4 on it (to have a LVM capable environment in which to work). My problem is that I can not figure out how to mount the old HD, as it uses LVM (which I'm not too familiar with) and I don't have that much time for research (Work full time and Paramedic Student).

Here is the output of fdisk -l :
Code:
[root@localhost ~]# fdisk -l

Disk /dev/hdc: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hdc1   *           1          13      104391   83  Linux
/dev/hdc2              14        9729    78043770   8e  Linux LVM

Disk /dev/hdg: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hdg1   *           1          13      104391   83  Linux
/dev/hdg2              14        4865    38973690   8e  Linux LVM
And here is the output of pvscan :
Code:
[root@localhost ~]# pvscan
  PV /dev/hdc2   VG VolGroup00   lvm2 [74.41 GB / 32.00 MB free]
  Total: 1 [74.41 GB] / in use: 1 [74.41 GB] / in no VG: 0 [0   ]


hdc is the new drive that I am running FC4 from, and hdg contains the fubar'd drive.

Also, if there is a somewhat easy way to restore the original drive (by other means than reinstalling each individual RPM as I have already tried, and decided that I don't have enough time to do) I would be eternally grateful.


Any help would be greatly appreciated and further information can be provided, if someone can give me a good place to start.

Thanks!
-Carl
 
Old 01-01-2006, 06:15 PM   #2
jcliburn
Member
 
Registered: Dec 2003
Location: Mississippi, USA
Distribution: Fedora
Posts: 435

Rep: Reputation: 33
It's for this very reason that I won't use LVM anymore. It's just too darn much trouble to rescue anything from it.

There's a recent thread over at the fedora-list. Here's something that might help.

Jim Cornette wrote:

I searched the archives for whatever I had to do in order to get the
lvm activated. Here is one posting that I made:

https://www.redhat.com/archives/fedo.../msg01943.html

From an earlier posting someone suggested to run the following commands
to activate and later deactivate LVM volumes in rescue mode. I used
these commands on an external USB drive to get at data from a previous
installation and it worked. You might be able to get at your data in
this way.
Jim

Excerpt from earlier help.
Once booted into text-mode rescue, invoke the following commands:


lvm lvscan
lvm vgchange -ay


This will scan for all LVM volumes and then will make them active and
accessible.

lvm vgchange -an

will deactivate them all.
end Excerpt:

Basically, the LVM volumes on the hard drive from an earlier install was
labeled / for the main partition and this label being the same as my
non-lvm clean install was also labeled /. When the kernel booted and the
saw the same label, it ignored the LVM which contained the / and swap
lvm content.
To access the partition, I ran the lvscan and vgchange commands. I then
had to make a mountpoint under /mnt to mount the LVM partition.
I believe I got the information as /dev-mapper/volgroup00/<whatever> ---
Sorry, I forgot what it is called, I no longer use LVM.
I took that information of where the volume was and used mount
/dev-mapper/volgroup00/<whatever> /mnt/olddrive and was able to access
all the content from the LVM after mounting it. I transferred all of my
desired information from the drive and never used it since.

There might be discussions in march of this year or close to that time
frame in the archives. The helpful person has not posted recently to my
knowledge but knew a lot about dealing with LVMs.

All of your swap partitions and other filesystem dvisions are all
contained in the LVM. The only partitions you should have are the one
for windows, the /boot partition and the third partition should be where
all of the LVM "partitions" or slices are kept. If you ran fdisk on the
/dev/sdb device, you should have three partitions. Without dev-mapper,
it does not show.

Good luck! It is possible, I just cannot remember the exact method that
I used to get at the LVM.

Jim
 
  


Reply



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
Problems mounting LVM-partition RacerDude Fedora 1 11-22-2005 11:04 AM
Mounting a JFS LVM vbtalent Fedora 4 08-29-2005 11:28 AM
LVM Recovery enabler Linux - Newbie 8 02-23-2005 02:09 PM
Oh no!! LVM broke, need help with recovery. kleptophobiac Linux - General 5 12-31-2004 11:22 PM
Hard drive recovery, LVM Fonce Linux - Hardware 3 12-30-2004 09:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 10:32 AM.

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