mdadm superblock mount issue
Hello, I have been looking around for answers to this issue and I think I might have found some but I wanted to confirm so here we are.
I am using mdadm. I had a raid 1 of 2 2TB drives that I converted to a raid 5 of 3 2TB drives. the raid 1 was assigned as /dev/md0 and it was mounted at /mnt/2tb. It was using /dev/sdb1 and /dev/sdd1. /dev/sdc1 is the new drive that I added. Here are the commands I used to convert: Code:
mdadm /dev/md0 --fail /dev/sdd1 When the server came back up I got warnings saying that my raid array could not be mounted and that the superblocks are bad. Here is the log output: Code:
Log of fsck -C -R -A -a Code:
nf7s:~# fdisk -l Code:
nf7s:~# cat /proc/mdstat Code:
nf7s:~# mdadm --detail /dev/md1 Code:
nf7s:~# mdadm --examine /dev/sdb1 Code:
nf7s:~# mdadm --examine /dev/sdc Code:
nf7s:~# mdadm --examine /dev/sdd1 Code:
nf7s:~# mount /dev/md1 /mnt/4tb The 2 older drives I was using in raid 1 are Western digital WD20EARS while the new one I added is WD20EARX (the advance format type) Does that make a difference and could be causing the issue? The other thing I wanted to ask was that I never zeroed the superblock of the 2 drives when I went from raid 1 to raid 5. Do you think that this is the cause of the issue? Am I safe to zero the superblocks and then recreate the array? Is this a problem with the filesystem and should I run mkfs -t ext3 /dev/md1 ? I have some backups of the data as I wasn't sure the raid 1 to raid 5 would succeed but I would prefer to recover it. Thank you so much for reading this and any information you may have. |
Don't quote me ;) a definite Linux noobie here.
( Any way if i post a wrong answer, it will probably spur someone to post a correct one). /dev/sdc instead of /dev/sdc1 I believe that will put the raid superblock in a different location causing not to save. I say this because my first dabbling into software raid I was using the whole disk and not the the whole disk partitions, the raid never worked. On reboot it was not there... I have converted many 3 RAID 1 to 5 successfully. BUT I did not do it the way you have. If your not bothered about loosing the data due to having backups. Have you tried to failing the new drive and starting the raid set degraded. Don't touch the FS yet.. this is a mdadm issue. |
I have found my notes on RAID 1 to 5 :)
I remember, as my RAID is a bit older I use metadata type 0.9 AS DO YOU... so I have to be careful to specify this as the newer type save the metadata to a different location, thus hosing the filesystem. I believe 1 and 1.1 save the super-block at the beginning where 0.9 saves it near the end. So using a later type will hose the FS super-block. So bear that in mind also. You did ask for ANY info.. :) mdadm --stop /dev/md0 mdadm --create /dev/md0 --level=5 –metadata=0.9 --raid-devices=3 /dev/sda1 /dev/sdb1 missing mdadm --grow --bitmap=internal /dev/md0 mdadm --manage /dev/md0 --add /dev/sdc1 << new drive... That's what I did for 3 RAID sets from 1 to 5 so far. Can't guarantee anything I would go for failing the /dev/sdc device. That is definitely incorrect. See if you can start the array. If not recreate with the newer device missing making sure to use the same metadata and chunk size (see my problem post) :( ENSURE you use --assume-clean We DO NOT want any rebuilding going on YET!!! Add new device - sdc1 this time ;) All could lead to data loss. :) No guarantees. |
Thanks for the reply FizzerJE.
I think I will try Code:
mdadm /dev/md1 --fail /dev/sdc |
I ran the code in my last post but before I added the drive back I went into fdisk and remade the partitions. Then I did the final line to add /dev/sdc1 back. It is now rebuilding. When it is done I will try to reboot and see if it mounts.
|
I rebooted after it finished rebuilding. It will still not mount. Same error as before:
Code:
/dev/md1: Code:
nf7s:~# fdisk -l Code:
nf7s:~# mdadm --detail /dev/md1 Does anyone know if I should try the command in the error log? Code:
e2fsck -b 8193 /dev/md1 |
I tried to use a program called testdisk but after a long time searching it could not find a fixable filesystem on /dev/md1. Does anyone have any tips on using this program? Does anyone know of a way to maybe copy the data from the raid to a spare disk? Any other way to recover the data or the fix the filesystem?
|
All times are GMT -5. The time now is 05:59 PM. |