Linux - Newbie This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
|
02-15-2012, 07:56 PM
|
#1
|
LQ Newbie
Registered: Feb 2012
Location: Western Australia
Distribution: Ubuntu Server
Posts: 18
Rep:
|
mdadm: raid1 mirror's spare won't activate
g'day Guys and girls!
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
cat /proc/mdstat shows...
Code:
root@LoM:~# cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md0 : active raid1 sdb1[2](S) sda1[1]
976758841 blocks super 1.2 [2/1] [U_]
unused devices: <none>
fdisk -l shows...
Code:
root@LoM:~# fdisk -l
Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0008e75b
Device Boot Start End Blocks Id System
/dev/sda1 63 1953520064 976760001 fd Linux RAID autodetect
Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdb1 63 1953520064 976760001 fd Linux RAID autodetect
Disk /dev/md0: 1000.2 GB, 1000201053184 bytes
2 heads, 4 sectors/track, 244189710 cylinders, total 1953517682 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/md0 doesn't contain a valid partition table
Disk /dev/sdc: 3997 MB, 3997171712 bytes
213 heads, 47 sectors/track, 779 cylinders, total 7806976 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000d3836
Device Boot Start End Blocks Id System
/dev/sdc1 * 2048 7804927 3901440 83 Linux
Last edited by hallucinative; 02-16-2012 at 07:43 AM.
Reason: Added fdisk information..
|
|
|
02-16-2012, 07:59 AM
|
#2
|
LQ Newbie
Registered: Feb 2012
Location: Western Australia
Distribution: Ubuntu Server
Posts: 18
Original Poster
Rep:
|
Shameless bump..
|
|
|
02-16-2012, 08:11 AM
|
#3
|
Member
Registered: Jul 2009
Location: Montaletto
Distribution: Debian GNU/Linux
Posts: 107
Rep:
|
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
|
|
|
02-16-2012, 09:19 AM
|
#4
|
LQ Newbie
Registered: Feb 2012
Location: Western Australia
Distribution: Ubuntu Server
Posts: 18
Original Poster
Rep:
|
Quote:
Originally Posted by romagnolo
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'
Have I missed something?
|
|
|
02-17-2012, 10:38 AM
|
#5
|
LQ Newbie
Registered: Feb 2012
Location: Western Australia
Distribution: Ubuntu Server
Posts: 18
Original Poster
Rep:
|
A more desperate bump...
|
|
|
02-17-2012, 04:13 PM
|
#6
|
Senior Member
Registered: Sep 2009
Location: Raleigh, NC
Distribution: Ubuntu, PopOS, Raspbian
Posts: 1,899
|
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.
Code:
mdadm /dev/md0 -r /dev/sdb1
mdadm --zero-superblock /dev/sdb1
mdadm /dev/md0 -a /dev/sdb1
|
|
|
06-14-2012, 04:34 PM
|
#7
|
LQ Newbie
Registered: Jun 2012
Posts: 1
Rep:
|
So? any responses?
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?
|
|
|
06-15-2012, 06:32 AM
|
#8
|
LQ Newbie
Registered: Feb 2012
Location: Western Australia
Distribution: Ubuntu Server
Posts: 18
Original Poster
Rep:
|
g'day rleibman
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.
Good luck, Hall
|
|
1 members found this post helpful.
|
All times are GMT -5. The time now is 08:23 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|