Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
So... I'm stumped... Basicly I had a faulty sata cable, ran the server degraded while getting a new cable, shut it down, installed the cable and booted it up and for some reason I can't get it to become active again..
Through numerous google searches on this problem I've come up with null, I've zeroed the super block, re-formatted, removed 512 KB of the beginning of the drive and still, she doesn't want to activate.. she syncs up with "Spare synchronizing" finishes and drops back in to the spare group..
I would recreate the array but this is my root drive..
Some one point me in the right direction -.-"
-Donny
Running Ubuntu Server, latest updates..
mdadm -D /dev/md0 shows...
Code:
root@LoM:~# mdadm -D /dev/md0
/dev/md0:
Version : 1.2
Creation Time : Sat Feb 11 14:56:56 2012
Raid Level : raid1
Array Size : 976758841 (931.51 GiB 1000.20 GB)
Used Dev Size : 976758841 (931.51 GiB 1000.20 GB)
Raid Devices : 2
Total Devices : 2
Persistence : Superblock is persistent
Update Time : Thu Feb 16 08:46:56 2012
State : clean, degraded
Active Devices : 1
Working Devices : 2
Failed Devices : 0
Spare Devices : 1
Name : LoM:0 (local to host LoM)
UUID : 45a552f7:5e854deb:26a64954:01f3aaec
Events : 116263
Number Major Minor RaidDevice State
1 8 1 0 active sync /dev/sda1
1 0 0 1 removed
2 8 17 - spare /dev/sdb1
Have you tried to remove and re-add the the drive from the array? like:
Code:
mdadm /dev/md0 -r /dev/sdb1
mdadm /dev/md0 -a /dev/sdb1
Thanks romagnolo for your reply
I've tried re-adding many time, with a combination of zeroing the super block, reformatting, dding away the first 512 KB of the hard drive and rebooting in case of some unknown cache
Recently I forced the array in to a 1 device mirror with
Code:
mdadm -G /dev/md0 --force -n 1
Rebooted and grew the array back to 2 with
Code:
mdadm -G /dev/md0 -n 2
Re-added the device with
Code:
mdadm --add /dev/md0 /dev/sdb1
waited the 2 hours for it to resync, the whole time showing
Code:
root@LoM:~# mdadm -D /dev/md0
/dev/md0:
Version : 1.2
Creation Time : Sat Feb 11 14:56:56 2012
Raid Level : raid1
Array Size : 976758841 (931.51 GiB 1000.20 GB)
Used Dev Size : 976758841 (931.51 GiB 1000.20 GB)
Raid Devices : 2
Total Devices : 2
Persistence : Superblock is persistent
Update Time : Thu Feb 16 22:15:55 2012
State : active, degraded, recovering
Active Devices : 1
Working Devices : 2
Failed Devices : 0
Spare Devices : 1
Rebuild Status : 0% complete
Name : LoM:0 (local to host LoM)
UUID : 45a552f7:5e854deb:26a64954:01f3aaec
Events : 153215
Number Major Minor RaidDevice State
1 8 1 0 active sync /dev/sda1
2 8 17 1 spare rebuilding /dev/sdb1
and when its finished it drops in to spare and the original slot becomes 'Removed'
I would recommend removing sdb1, zeroing the super block on sdb1 and then re-adding it. I've encountered re-adding problems in the past with a bad, but still readable, superblock.
I ended up in the same situation, an active drive, a spare and a degraded array.... it's been a few months, were you able to figure out how to activate the spare?
It turns out in my situation the hard drive was failing but not reporting it back to SmartMon or mdadm, so mdadm failed silently giving no indication of why. Try with another hard drive if you have one and see if that activates, I gave the faulty 1 TB hard drive to a mate who partitioned it avoiding the faulty sector (Through trial and error) and to this day is running fine.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.