Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 06-12-2007, 08:33 AM   #1
LQ Newbie
Registered: Jun 2006
Location: Glasgow, Scotland
Distribution: Fedora Core 5
Posts: 2

Rep: Reputation: 0
Recover LVM2 with Data?

I was running RH9 with 2 x 250GB IDE HDD's and 1 x 40GB IDE HDD.

RH9 sat on the 40GB with default partition setup.

The 250GB drives were LVM2, again default setup, and mounted onto the FS of the 40GB drive. Both drives were joined to give 500GB.

By default setup i mean the recommended partition setup given by RH9 at install.

My 40GB drive died. I replaced with a new 40GB drive and looked at it as a good chance to upgrade to FC5.

I assumed FC5 would see the LVM's and allow me to simpley tell it where to mount them at install. However, FC5 only see's the two 250GB drives with no partitions.

On reading up how to remount my 250GB drives i found out i should have, but did not, back up the LVM settings for the drive.

I know very little about LVM.

How can i safely recover these drives and thier data?

There are a lot of Family Home Videos and files for my work that are all priceless to me. Any help will be very much apprecieated.
Old 06-13-2007, 02:25 AM   #2
Junior Hacker
Senior Member
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
I wonder what testdisk would do for you as it is designed to recover lost partitions, not sure what it's like with LVM. It can be found on most Live CD's, just type: "testdisk" in a terminal, if you have FC5 installed, install it from repositories. If it does not work, you can type: "photorec" which is part of testdisk that can recover many file formats, but you'll need another 500GB as it will pull allot of data out. You have to be in the directory where you want the files recovered into before issuing the command. Foremost data carver also works similar to photorec but not so good with certain formats, very good with .jpg. Supposedly, photorec can be interupted by hitting Ctrl + C, so you can sort through the data and delete what you don't want, then resume photorec from where it left off, but I only tried that once and must have done something wrong because it started from scratch on the image file again.
A trick I use when recovering data from large drives is to use dd to make manageable sized images of the drives like 6GB at a time and use foremost or photorec, this sometimes still produces near 6GB of recovered data, with foremost, it will all be in one folder and it takes a while to view what's in that folder when there is 150,000 .jpg files in it, not all will be valid ,jpg files but you will get all the valid ones using the last .jpg entry in the configuration file. Debian is my preferred distribution for these tasks as it seems to handle the memory demands better than my other distros. You would take 6GB images across the entire drives and then offset the images by 3GB or so to catch any files that fell in between the first set of 6GB images.
If you decide you need to recover data with the methods I described, let me know and I will post my notes with the exact steps and commands used when I did .jpg recovery.

Last edited by Junior Hacker; 06-13-2007 at 02:30 AM.
Old 06-22-2007, 08:03 AM   #3
LQ Newbie
Registered: Jun 2006
Location: Glasgow, Scotland
Distribution: Fedora Core 5
Posts: 2

Original Poster
Rep: Reputation: 0
Thanks for your help.

TestDisk can see the partitions but i can't mount them.
Old 06-22-2007, 09:02 AM   #4
Registered: Oct 2006
Distribution: RHEL, FC
Posts: 56

Rep: Reputation: 15
Plz post your notes and steps to learn from them

Old 06-22-2007, 10:11 AM   #5
LQ Newbie
Registered: Jun 2007
Posts: 5

Rep: Reputation: 0
I have same problem. Can I access LVM from Windows xp?
Old 09-27-2010, 12:16 PM   #6
LQ Newbie
Registered: Jan 2006
Distribution: Kubuntu 10.4
Posts: 9

Rep: Reputation: 0
Recovering logical volume

Well I did a mistake and get the same kind of problem.
With testdisk, you can recover the lvm partition on your disk which were used on your lvm set. Good.

But once it is done there are 2 possibilities as far as I understand : you have the file /etc/lvm avai˝lable and did a backup with vgcfbackup, then vgcfgrestore will be give you back the whole system.

you do not have anything, my case, and I wonder how can get back the mapping of my lv within the group and physical partition ? any idea ?



data, drives, fc5, hdd, ide, lvm, lvm2, recover, recovery, rh9

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 On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
partitions to lvm2 without losing data and reverse order fakie_flip Linux - Software 6 10-30-2006 11:36 AM
help me recover my data, please indeedio Linux - Newbie 10 03-27-2006 08:26 AM
Software to acess and recover data on Fat32 data NeoSpawn Linux - Software 2 09-04-2005 11:37 AM
How to recover your data. raxxal Linux - Software 2 07-05-2005 11:59 AM
Help me to recover data after a dd balfred Linux - General 6 12-09-2002 04:35 PM > Forums > Linux Forums > Linux - General

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