LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 07-04-2005, 10:25 PM   #1
FinalFantasy
Member
 
Registered: Sep 2003
Distribution: Debian
Posts: 49

Rep: Reputation: Disabled
can I reconstruct partitions according to raid information.


My hard drive got some bad sectors several days ago and my partition table was lost in the meantime. But I got some information from Linux RAID log.
I wonder whether I can reconstruct the partition table from it.

Here are some details of my system.

Two harddrives are Samsung SP1404N.
hda is the first drive and the hdc is the second drive

Soft raid level 0:
md0 : hda2 + hdc1
md1 : hda3 + hdc2

Partition table:
hdc: LOST
start end blocks ID System
hdc1: 1 83 Linux
hdc2: 3649 83 Linux
hdc3: 3650 19457 126977760 f W95 Ext'd
hda:
Disk /dev/hda: 160.0 GB 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units: cylinders of 16065 * 512 = 8225380 bytes
start end blocks Id System
hda1: 1 9 72261 83 Linux
hda2: 10 1833 14651280 fd raid auto
hda3: 1834 3657 144651280 fd raid auto
hda4: 3658 19457 126913500 f W95 Ext'd
......

some RAID log:

raid0: looking at hdc2
raid0: comparing hdc2(14651136) with hdc2(14651136)
raid0: END
raid0: ==> UNIQUE
raid0: 1 zones
raid0: looking at hda3
raid0: comparing hda3(14651136) with hdc2(14651136)
raid0: EQUAL
raid0: Final 1 zones
raid0: md_size is 29302272 blocks
raid0: conf->hashing_spacing is 29302272 blocks

raid0: looking at hdc1
raid0: comparing hdc1(14659072) with hdc1(14659072)
raid0: END
raid0: ==> UNIQUE
raid0: 1 zones
raid0: looking at hda2
raid0: comparing hda2(14651136) with hdc1(14659072)
raid0: NOT EQUAL
raid0: comparing hda2(14651136) with hda2(14651136)
raid0: END
raid0: ==> UNIQUE
raid0: 2 zones
raid0: Final 2 zones

raid0: chekingg hda2 .... nope.
raid0: checking hdc1 ... contained as device 0 (14659072) is smallest!
raid0: current zone offset: 14659072
raid0: md_size is 29310208 blocks
raid0: conf->hashing_spacing is 29302272 blocks.

Last edited by FinalFantasy; 07-04-2005 at 10:41 PM.
 
Old 07-08-2005, 08:36 PM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
If you can manage to partition around the bad sectors and blocks, once you do this, you can make an exact copy of the partitions to the other drive or drives by doing a:

/sbin/sfdisk /dev/hdX -f /dev/hdX

Where X is your drive, etc..

Your probably better off replacing the drive though, less hassle in the long run..
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Partitions and RAID 1 SBFree Linux - Newbie 7 01-07-2005 06:43 PM
SCSI + RAID : Information hamish Linux - Hardware 1 05-18-2004 03:54 PM
Create software RAID partitions first, then create filesystem partitions on top of th stefanlasiewski Linux - Software 1 04-28-2004 04:12 PM
Where do I get this information about partitions? john_walsh54 Mandriva 6 10-06-2003 10:43 AM
How can I view the Raid Device and Partitions x2000koh Linux - General 1 07-12-2002 04:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:17 PM.

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