LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
LinkBack Search this Thread
Old 03-05-2005, 09:08 AM   #1
DigitalVixen
LQ Newbie
 
Registered: Mar 2004
Location: Sweden
Distribution: My own :)
Posts: 14

Rep: Reputation: 0
Raid5, wont use spare..


Hi!

I have this little problem with a system with Raid5 which holds four drives.
All drives have two partitions, one for kernel/grub and one for the raid.
So I install a system on the last drive, hdd2, then make the raid using "mdadm --create /dev/md0 --level 5 --raid-devices /dev/hda2 /dev/hdb2 /dev/hdc2 missing", format the raid, copy over the system from hdd2, reboot so that I run from the raid, re-partition hdd2 to a raid partition, add it to the raid and figured all is well.
Nope.

This is what comes up on reboot (only taking out the important parts):
raid5: spare disk hdd2
--
raid5: md0, not all disks are operational -- trying to recover array
--
md: hdd2 [events: 00000017]<6>(write) hdd2's sb offset: 199117568
--
md0: no spare disk to reconstruct array! -- continuing in degraded mode

Once in the system, "mdadm --detail /dev/md0" tells me this :
"
--
Active Devices : 3
Working Devices : 4
Failed Devices : 1
Spare Devices : 0
--
Number Major Minor RaidDevice State
0 3 2 0 active sync /dev/hda2
1 3 66 1 active sync /dev/hda2
2 22 2 2 active sync /dev/hda2
3 0 0 0 sync

4 22 66 4 spare /dev/hda2
"

So what is the deal here, the hdd2 partition was formatted before hotadded to the array, but it put it first as spare and then say it's not usable? I was under the impression that hdd2 would immediately take the "missing" drives place in the array and start reconstructing, but I might be wrong about this?

There's no error on the drive, I've checked it in another machine.

Please help :P
 
Old 03-05-2005, 09:13 AM   #2
DigitalVixen
LQ Newbie
 
Registered: Mar 2004
Location: Sweden
Distribution: My own :)
Posts: 14

Original Poster
Rep: Reputation: 0
Okay, obviously this has to be a bug in 2.4.26.
When I made a 2.6.11 kernel and booted into it, it immediately added hdd2 and started to reconstruct it. So all is well now, it appears.
 
Old 03-05-2005, 12:28 PM   #3
ironwalker
Member
 
Registered: Feb 2003
Location: Jersey shore,north
Distribution: Siduction the only way to do Debian Sid!
Posts: 500

Rep: Reputation: 30
mdadm -D /dev/md0
provides plenty of info to make sure ....it will show the 3 drives and 1 spare as active.

In creating my raid 5 I used;

mdadm -C /dev/md0 -c32 -l5 -n3 -x1 /dev/sd{a,b,c,d}3
left-symetric is default if you wanted to change that I believe its the -p option
-l is raid level
-n is amount of disks
-x is spare disks
-c chunksize
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Anyone got a spare initrd-2.4.20-8 jamie_barrow Linux - Software 4 01-27-2004 11:45 AM
What to do with a spare HD? KungFuHamster General 11 12-27-2003 12:47 PM
What can I do with a spare box? downinthemine Linux - Networking 6 12-06-2003 10:46 AM
I've got just over 1GB spare. Is that really enough? Bert Linux From Scratch 4 10-29-2002 04:39 AM
A spare comp, what should i do with it Goatdemon General 12 08-11-2002 01:13 AM


All times are GMT -5. The time now is 11:59 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration