LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 06-20-2008, 01:23 PM   #1
neel.gurjar
LQ Newbie
 
Registered: Apr 2008
Posts: 20

Rep: Reputation: 0
How to recover Data from LVM+ext3 partition ?


Hi,

I have one PC installed CentOS 5.
By mistake I partitioned & formated the working Hard Drive which had ext3 on LVM.
Is there any possibility of recovering Data from that hardDrive?

Thanks
Neel
 
Old 06-20-2008, 03:49 PM   #2
mostlyharmless
Senior Member
 
Registered: Jan 2008
Distribution: Slackware 14.1 (multilib) with kernel 3.15.5
Posts: 1,527
Blog Entries: 12

Rep: Reputation: 170Reputation: 170
I think it would be very difficult, given the LVM. I've usually just written off the data in that case; it's seemingly part of the tradeoff for the advantages of LVM. But if you were to try, I'd first copy the whole disk using dd from a boot CD. Don't mount it (no automounting), don't touch it, just make a copy first onto another drive. Experiment on the copy. If you remember the exact configuration of the old LVM partitons and volumes, it might just work to rewrite the partition in fstab and remake the LVM exactly as you did before without formatting. Or it might not. There some commercial utilities that might work to find files or directories. I've used R-Studio's tools with some success.

It may not helpful to say it, but unfortunately this is a learning experience: backup early and backup often. Don't run as root routinely and be careful what you type.
 
Old 06-20-2008, 04:17 PM   #3
mostlyharmless
Senior Member
 
Registered: Jan 2008
Distribution: Slackware 14.1 (multilib) with kernel 3.15.5
Posts: 1,527
Blog Entries: 12

Rep: Reputation: 170Reputation: 170
You might also find this helpful, if you get that far:
http://tldp.org/HOWTO/LVM-HOWTO/recovermetadata.html
 
Old 06-20-2008, 04:54 PM   #4
kenoshi
Member
 
Registered: Sep 2007
Location: SF Bay Area, CA
Distribution: CentOS, SLES 10+, RHEL 3+, Debian Sarge
Posts: 159

Rep: Reputation: 32
Try using testdisk, haven't used it with LVM but who knows...but know that since you overwritten the partition table AND formatted the disk, your chances of recovering anything is very low at this point.
 
  


Reply


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
Need to recover ext3 filesystem- MBR and LVM are gone :( IronHelix Linux - General 3 05-19-2008 03:14 AM
howto recover LVM on RAID-6 data? Tahir Saleh Linux - Newbie 0 11-19-2007 06:19 AM
Assistance using fsck to recover ext3 LVM partition fiberfarm Fedora 1 11-01-2006 08:49 PM
recover ext3 data holdrio Linux - Software 2 06-21-2006 10:10 AM
Need to recover data from a LVM volume deyv Linux - General 13 07-25-2005 05:43 PM


All times are GMT -5. The time now is 05:33 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration