LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 10-14-2008, 08:54 AM   #1
San-Raal
LQ Newbie
 
Registered: Apr 2008
Distribution: debian, redhat el4
Posts: 18

Rep: Reputation: 0
HDD with single LVM partition, overwritten MBR, recovery needed


Hi there.

I have a problem with our RAID server. I have probably overwritten my harddisks parition table (containing a single LVM volume) during a Debian installation. I need to recover my data from it.

Situation:
Code:
array01:/tmp# fdisk -l

Disk /dev/sda: 959.9 GB, 959966085120 bytes
255 heads, 63 sectors/track, 116709 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System

Disk /dev/sdb: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1          31      248976   83  Linux
/dev/sdb2              32       14593   116969265    5  Extended
/dev/sdb5              32       14593   116969233+  8e  Linux LVM
The /dev/sda is the former disk, that contained a single partition of type LVM2.
/dev/sdb is the system HDD, where the Debian system was installed. During installation the /dev/sda was detected as type "lvm". I installed on the /dev/sdb disk. After the question: "Write GRUB boot loader to the Master Boot Record?" I replied "yes", without knowing, that is the MBR of the first drive(/dev/sda), not the drive I was installing the system on (/dev/sdb). After rebooting the system cannot detect anything on /dev/sda.

The results of gpart:
Code:
array01:/tmp# gpart /dev/sda

Begin scan...
End scan.

Checking partitions...
Ok.

Guessed primary partition table:
Primary partition(1)
   type: 000(0x00)(unused)
   size: 0mb #s(0) s(0-0)
   chs:  (0/0/0)-(0/0/0)d (0/0/0)-(0/0/0)r

Primary partition(2)
   type: 000(0x00)(unused)
   size: 0mb #s(0) s(0-0)
   chs:  (0/0/0)-(0/0/0)d (0/0/0)-(0/0/0)r

Primary partition(3)
   type: 000(0x00)(unused)
   size: 0mb #s(0) s(0-0)
   chs:  (0/0/0)-(0/0/0)d (0/0/0)-(0/0/0)r

Primary partition(4)
   type: 000(0x00)(unused)
   size: 0mb #s(0) s(0-0)
   chs:  (0/0/0)-(0/0/0)d (0/0/0)-(0/0/0)r
Testdisk gives no results.

Any help or suggestions will be appreciated. Thanks in advance.
 
Old 10-15-2008, 12:37 AM   #2
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 59
A good back-up plan is the best way to recover data...
Seeing as you have testdisk installed, open a terminal and type: photorec to recover many common file formats. It pumps out a lot of data so you better have another terabyte drive to re-direct the output, or it can be paused to make room.
 
Old 10-15-2008, 03:58 AM   #3
San-Raal
LQ Newbie
 
Registered: Apr 2008
Distribution: debian, redhat el4
Posts: 18

Original Poster
Rep: Reputation: 0
Thank you for your answer and your suggestions, but they are not helpfull in this particular case. I cannot use photorec, because there are no documents/images stored, but mostly .vmdk/.vmx/.tar.gz files.

And about a good backup-plan, ... it is a backup array that I am trying to restore :-) Capacity upgrading does not always work as intended...
 
  


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
HDD partition recovery - HDD works but no partitions are accessible? stevod333 Linux - Software 6 10-01-2009 05:24 AM
Overwritten MBR sundar22in Linux - Newbie 1 08-30-2007 06:38 AM
HDD Partition Table Recovery nikhil Linux - Hardware 10 03-04-2005 10:08 AM
GRUB MBR overwritten by WIN98 MBR TOuseef Linux - General 7 11-14-2004 04:25 PM
?overwritten MBR? sharon63 Linux - Newbie 2 08-21-2003 06:46 PM


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