View previous topic :: View next topic |
Author |
Message |
richis n00b
Joined: 10 Feb 2004 Posts: 20
|
Posted: Tue Aug 08, 2006 2:07 pm Post subject: how to restore superblock for raid? |
|
|
Hi,
I have messed up with my software raid. After trying to fix some problems I entered such commands:
mdadm --zero-superblock /dev/hdc1
mdadm --zero-superblock /dev/hdb1
Is there any way to restore superblocks? (badly need data from raid)
before problem I used raid-tools and here is config:
/etc/raidtab
Code: |
raiddev /dev/md0
raid-level 0
nr-raid-disks 2
chunk-size 256
persistent-superblock 1
device /dev/hdb1
raid-disk 0
device /dev/hdc1
raid-disk 1
|
btw the problem I tried to fix was after mounting md0 I can only read data but cant write (df show 0 bytes free)
thanks |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54817 Location: 56N 3W
|
Posted: Tue Aug 08, 2006 2:31 pm Post subject: |
|
|
richis.
A persistant superblock is not required to read the raid.
Since you used raidtools, sitch with it, don't mix and match.
Does work to get your raid up? _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
richis n00b
Joined: 10 Feb 2004 Posts: 20
|
Posted: Tue Aug 08, 2006 4:24 pm Post subject: |
|
|
raidstart /dev/md0
/dev/md0: Invalid argument
here is log from dmesg:
Code: |
Aug 8 22:24:58 stone md: invalid raid superblock magic on hdb1
Aug 8 22:24:58 stone md: hdb1 has invalid sb, not importing!
Aug 8 22:24:58 stone md: autostart failed!
|
|
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54817 Location: 56N 3W
|
Posted: Tue Aug 08, 2006 4:39 pm Post subject: |
|
|
richis,
Edit your raidtab, change persistent-superblock 1 to persistent-superblock 0 and try again. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
richis n00b
Joined: 10 Feb 2004 Posts: 20
|
Posted: Tue Aug 08, 2006 4:50 pm Post subject: |
|
|
already did, still the same |
|
Back to top |
|
|
BlinkEye Veteran
Joined: 21 Oct 2003 Posts: 1046 Location: Gentoo Forums
|
Posted: Fri Aug 11, 2006 12:12 am Post subject: |
|
|
does
list some raid devices?
if not, recreate them with
Code: | cd /dev && MAKEDEV md |
and try again. _________________ Easily backup up your system? klick
Get rid of SSH Brute Force Attempts / Script Kiddies klick |
|
Back to top |
|
|
richis n00b
Joined: 10 Feb 2004 Posts: 20
|
Posted: Sun Aug 13, 2006 8:32 am Post subject: |
|
|
/dev/md0 is still there =)
I think I have done some bigger mistake. In smoe forums I found that I have to recreate partition table on disks.
And I have done fdisk on both disks (removed partitions and created them).
Is this end of my data on disk? =( |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54817 Location: 56N 3W
|
Posted: Sun Aug 13, 2006 8:50 am Post subject: |
|
|
richis,
Provided you only changed the partition table for primary partitions, you can change it as much as you like, as long as you put it back the way it was, you data is still there.
Its more complex with the extended and logical partitions, since every time they are created or destroyed, one sector is written to the disk.
Overwriting what is there, with the same partition information is harmless. Changes will begin to destroy your data.
Get testdisk and scan for partitions - you may be lucky. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
richis n00b
Joined: 10 Feb 2004 Posts: 20
|
Posted: Sun Aug 13, 2006 5:23 pm Post subject: |
|
|
thanks for tool name, but still problem with testdisk.
here is report. Any other way to recover this "big" partition?
Code: |
TestDisk 5.9-WIP, Data Recovery Utility, August 2005
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org
Disk /dev/hdb - CHS 238216 16 63 - 117246 MB
Check the harddisk size: HD jumpers settings, BIOS detection, OS limitation...
The following partition can't be recovered. The harddisk seems too small!
Partition Start End Size in sectors
D Linux 0 1 1 397002 3 34 400178176
|
|
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54817 Location: 56N 3W
|
Posted: Sun Aug 13, 2006 5:32 pm Post subject: |
|
|
richis,
If the disk was given over to a single primary partition, using all the space, simply recreate it with fdisk and everything comes back. Even if it wasn't, you can always get the first primary partition back that way, which looks good for /dev/hdc1 etc.
If you do that and there were further partitions, make sure any mounts you attempt are read only. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
|