LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   raid1 mount:/dev/md0: can't read superblock (https://www.linuxquestions.org/questions/debian-26/raid1-mount-dev-md0-cant-read-superblock-820732/)

rblampain 07-19-2010 11:29 AM

raid1 mount:/dev/md0: can't read superblock
 
I have an AMD64 motherboard with one pata drive that contains the whole installation including data and two identical 500G sata drive that were set up as raid1 for experimentation, then I had to reinstall for some reason.

If my recollection is correct, the first raid1 was made after the install and worked, I used it only to 'archive" /home but the second was done during the install, seemed OK but does not work.

When I try 'archive' under Debian Lenny with the GUI, I get the message mentioned above.

There are a few howto on the internet but none that I can follow from start to finish without improvising at some stage.

Can anyone suggest which howto to follow in my case and if this is the one that is part of the install, how to do that without reinstalling everything else.

Thank you for your help.

apnicservices 07-19-2010 12:59 PM

What does cat /proc/mdstat say? Is your new array formatted with an ext3 partition?

samborambo 07-19-2010 03:15 PM

If you've done a reinstall you've probably lost your /etc/mdadm.conf . Try running mdadm assemble --scan to see if it picks up the drives again.

It's highly unlikely that you've lost the superblocks on both drives, unless it was done intentionally. If the blind assemble doesn't work, try assembling with one drive. If that works, add the other drive as a hot spare and the array will automatically rebuild.

If you have lost superblocks off both drives, you can try mdadm build to bring up an array.

Sam.

rblampain 07-19-2010 10:34 PM

Thank you both, here are the results of your suggestions. Nothing was intentionally done to the superblocks and I am not good at the command line.

cat /proc/mdstat
Personalities : [raid1]
md0 : active (auto-read-only) raid1 sda1[0] sdb1[1]
488383936 blocks [2/2] [UU]
resync=PENDING
unused devices: <none>

mdadm assemble --scan
mdadm: --scan does not set the mode, and so cannot be the first option.

mdadm build
mdadm: cannot open build: No such file or directory

dmesg reports:
[ 5.790932] md: raid1 personality registered for level 1
[ 5.793029] md: md0 stopped.
[ 5.856579] md: bind<sdb1>
[ 5.856579] md: bind<sda1>
[ 5.856579] md: md0: raid array is not clean -- starting background reconstruction
[ 5.867025] raid1: raid set md0 active with 2 out of 2 mirrors

rblampain 07-22-2010 06:58 AM

After more search on the internet, I found that one of the new features of Debian 505 (I had 504) was "experimental support for software raid...", this seemed to imply that support was not present in the version I was using.
So I installed 505 with software raid1 which seemed to require a mount point for the 2 sata raid drives. Raid 1 was not working after reboot and I tried the following command:
mdadm --create /dev/md0 --metadata=1 --level=1 --raid-devices=2 /dev/sda1 /dev/sdb1
this did not work at first but it did after unmounting the 2 drives
and this gave the following result:
size=488383936K mtime=Thu Jul 22 01:21:15 2010
mdadm: /dev/sdb1 appears to contain an ext2fs file system
size=488383936K mtime=Thu Jul 22 01:21:15 2010
Continue creating array? y
mdadm: array /dev/md0 started.

Does this mean the array is now working or do I still need to test if it is?
Also, the 2 drives have ext3 filesystem, should the drives be reformated to ext2? How?
(It seems experimental support for raid.. is intended to work on ext2 filesystems only!)

cat /proc/mdstat gave the following result
Personalities : [raid1]
md0 : active (auto-read-only) raid1 sdb1[1] sda1[0]
487307508 blocks super 1.0 [2/2] [UU]
resync=PENDING
unused devices: <none>

Thank you for your help.


All times are GMT -5. The time now is 09:28 PM.