Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
software raid 5 drive failure and rebuild
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
slaterson
Guru
Guru


Joined: 26 Feb 2003
Posts: 313

PostPosted: Mon Aug 14, 2006 5:14 pm    Post subject: software raid 5 drive failure and rebuild Reply with quote

i have a large raid 5 array (software, not hardware). it consists of 8 drives. this morning i heard a funny noise coming from the box and decided to check mdadm to see the status of my raid. turns out /dev/hdb1 has been removed from the array.

i have a spare ready to replace the failed drive, but want to get the procedure outlined before i power down and replace the drive. i have tried searching the forums for a howto or for any info on replacing failed raid 5 drives, but haven't seen any good results. someone that has done this, what are the steps? i absolutely need to retain all information on the raid, losing the data would be painful at this point.

thanks for any help, it's greatly appreciated.

slate
Back to top
View user's profile Send private message
EmmEff
Apprentice
Apprentice


Joined: 17 Apr 2004
Posts: 197

PostPosted: Mon Aug 14, 2006 5:24 pm    Post subject: Reply with quote

Thankfully, it's been a few months since I've last had to do this but I think this is the syntax I use:

mdadm /dev/md0 --add /dev/hdb1

It's up to you to partition the drive first using fdisk.

The rebuild should start to occur automatically.

FWIW, I am running software RAID5 with 5 x 160GB Maxtor drives all on separate EIDE channels. Been running this configuration for almost 18 months now. I've experienced 2 drive failures during this time.

Also, refer to the The Software-RAID HOWTO for more info.
Back to top
View user's profile Send private message
slaterson
Guru
Guru


Joined: 26 Feb 2003
Posts: 313

PostPosted: Mon Aug 14, 2006 5:52 pm    Post subject: Reply with quote

thanks for this, it definitely helps and will save me some time.

to review the process... i power down, take out hdb, put a new hdb in (it is already fdisk'ed properly). power up the system and run the mdadm -add command to add the /dev/hdb1? or will the rebuild happen automatically and all i have to do is check the status to be sure it is running and completes properly?

my system has 8 ide drives. 7 of them are 300 gb, the last drive is 400 gb. i have a partition on the 400gb drive that matches the size of the complete 300 gb disk. i used seagate drives for my raid, i have been running it for a couple years now and this is the first failure i have had. regarding the maxtor drives, i bought a single 160 gb disk a few years back and it failed within the first few months of usage. maxtor replaced it for free, however i have sworn off maxtor drives since that experience.

thanks!
slate
Back to top
View user's profile Send private message
EmmEff
Apprentice
Apprentice


Joined: 17 Apr 2004
Posts: 197

PostPosted: Mon Aug 14, 2006 6:00 pm    Post subject: Reply with quote

slaterson wrote:
to review the process... i power down, take out hdb, put a new hdb in (it is already fdisk'ed properly). power up the system and run the mdadm -add command to add the /dev/hdb1?


Correct.

Quote:
or will the rebuild happen automatically and all i have to do is check the status to be sure it is running and completes properly?


Once you have replaced the drive and run the "mdadm --add" command, the rebuild happens automatically.

Quote:
my system has 8 ide drives. 7 of them are 300 gb, the last drive is 400 gb. i have a partition on the 400gb drive that matches the size of the complete 300 gb disk. i used seagate drives for my raid, i have been running it for a couple years now and this is the first failure i have had.


I have enough heat problems with 5 drives, I couldn't imagine what it'd be like with more :)

Quote:
regarding the maxtor drives, i bought a single 160 gb disk a few years back and it failed within the first few months of usage. maxtor replaced it for free, however i have sworn off maxtor drives since that experience.


I like Seagate as well, but at the time, the Maxtor drives were cheaper. This is a home server so cost is a concern.
Back to top
View user's profile Send private message
slaterson
Guru
Guru


Joined: 26 Feb 2003
Posts: 313

PostPosted: Mon Aug 14, 2006 6:22 pm    Post subject: Reply with quote

ok, so when i do the '--add' it will not create a new, empty arrary. instead, it will rebuild the existing array and all my data will be intact, as it was before the drive failed? is this your experience?

it's a big volume and it's roughly 75% full. it would really suck to lose it all.
Back to top
View user's profile Send private message
EmmEff
Apprentice
Apprentice


Joined: 17 Apr 2004
Posts: 197

PostPosted: Mon Aug 14, 2006 7:03 pm    Post subject: Reply with quote

slaterson wrote:
ok, so when i do the '--add' it will not create a new, empty arrary. instead, it will rebuild the existing array and all my data will be intact, as it was before the drive failed? is this your experience?


Yes, that's is what is meant when I say "rebuild". It's rebuilding the new drive based on the parity information stored in the array. You can confirm this is the proper procedure via the HOWTO I quoted above.
Back to top
View user's profile Send private message
slaterson
Guru
Guru


Joined: 26 Feb 2003
Posts: 313

PostPosted: Mon Aug 14, 2006 7:09 pm    Post subject: Reply with quote

thanks for the help, emmeff! i shut down the system and put the new drive in. it's rebuilding the spare as i type this, so far so good.

thanks for the info, it helped out!

slate
Back to top
View user's profile Send private message
EmmEff
Apprentice
Apprentice


Joined: 17 Apr 2004
Posts: 197

PostPosted: Tue Aug 15, 2006 1:59 pm    Post subject: Reply with quote

Glad to hear it worked :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum