linux raid question
Hi guys, I was wondering, if I have a machine running two discs in a kernel based raid-1, and one of the discs go south, what are the steps involved in removing the one disc and getting the other one up and running again? Just change the fstab entries? Then, if I have an identical disc as a replacement (say I was smart enough to buy three discs and keep one for incase ;-) how do I go about adding the second disc and creating a new raid without putting the installation and data on the good disc in any danger? Thanks -- Kind Regards Hans du Plooy SagacIT (Pty) Ltd hansdp at sagacit dot com
On Thursday 09 June 2005 21:54, Hans du Plooy wrote:
Hi guys,
I was wondering, if I have a machine running two discs in a kernel based raid-1, and one of the discs go south, what are the steps involved in removing the one disc and getting the other one up and running again? Just change the fstab entries?
Then, if I have an identical disc as a replacement (say I was smart enough to buy three discs and keep one for incase ;-) how do I go about adding the second disc and creating a new raid without putting the installation and data on the good disc in any danger?
Thanks -- Kind Regards Hans du Plooy SagacIT (Pty) Ltd hansdp at sagacit dot com
I've had to do this several times... - Stop Machine - Remove broken disc. - Insert replacement disk - boot from DVD - partition new disk as old - reboot machine - use raid tools to add partion back into raid array. (Raid copies data to the new partition as you continue to work!) You probably don't need to boot from DVD to partition but that is the way I did it... Jerry Westrick P.S. If you didn't have the spare, as I usually don't, you buy 2 new disk, setup a new raid on it, and copy everything over. I've even loaded the last good disk via USB disk box once... that is the way I did it.
On Thursday 09 June 2005 23:36, Jerry Westrick wrote:
- Stop Machine - Remove broken disc. - Insert replacement disk - boot from DVD - partition new disk as old - reboot machine - use raid tools to add partion back into raid array. (Raid copies data to the new partition as you continue to work!)
Hmm, I was under the impression that it's just - remove broken disk - insert good disk Obviously this is only for RAID with hardware controller. So, with software RAID it's not so automagic as I thought.
On Friday 10 June 2005 14:47, Silviu Marin-Caea wrote:
On Thursday 09 June 2005 23:36, Jerry Westrick wrote:
- Stop Machine - Remove broken disc. - Insert replacement disk - boot from DVD - partition new disk as old - reboot machine - use raid tools to add partion back into raid array. (Raid copies data to the new partition as you continue to work!)
Hmm, I was under the impression that it's just - remove broken disk - insert good disk
Obviously this is only for RAID with hardware controller. So, with software RAID it's not so automagic as I thought.
Difference 1: I don't have controllers that allow hot swapping (Connecting and disconnecting of disks while the system is running). Difference 2: Soft Raid is on partitions (not full disks), so you have to create partions before making/joining the raid. Advantages and disadvantages to both designs.... Jerry
At 07:47 AM 6/10/2005, Silviu Marin-Caea wrote:
Hmm, I was under the impression that it's just - remove broken disk - insert good disk
Obviously this is only for RAID with hardware controller. So, with software RAID it's not so automagic as I thought. Thats been the way it has been for me tooo Silviu with my hardware raid cards, just insert new hard drive an it rebuilds itself. works like a charm. I have never even considered using software raid so can not comment on it.
jack
Hi guys,
I was wondering, if I have a machine running two discs in a kernel based raid-1, and one of the discs go south, what are the steps involved in removing the one disc and getting the other one up and running again? Just change the fstab entries?
Then, if I have an identical disc as a replacement (say I was smart enough to buy three discs and keep one for incase ;-) how do I go about adding the second disc and creating a new raid without putting the installation and data on the good disc in any danger? well if you were using a raid card you would just stick in the new driver an tell it to rebuild the array. I have had to do that here at work a few times an it works with no hitches . but never messed around with kernnal
At 02:54 PM 6/9/2005, Hans du Plooy wrote: based raid setup always used raid cards from adaptec or 3ware. jack
On 6/9/05 4:36 PM, "Jack Malone"
Hi guys,
I was wondering, if I have a machine running two discs in a kernel based raid-1, and one of the discs go south, what are the steps involved in removing the one disc and getting the other one up and running again? Just change the fstab entries?
Then, if I have an identical disc as a replacement (say I was smart enough to buy three discs and keep one for incase ;-) how do I go about adding the second disc and creating a new raid without putting the installation and data on the good disc in any danger? well if you were using a raid card you would just stick in the new driver an tell it to rebuild the array. I have had to do that here at work a few times an it works with no hitches . but never messed around with kernnal
At 02:54 PM 6/9/2005, Hans du Plooy wrote: based raid setup always used raid cards from adaptec or 3ware.
jack
Anyone- Do you notice any real speed differences? I'm running a duel P3 866 box and have been toying with the idea of going software raid for our main share. (four scsi 9.1GB on SCSI 160) We also have two OSX servers, one with software raid (we tried the built OS raid then went with softraid.com - nice!) and one box with "kind of" sonnet hardware raid (four IDE 250GB). For file serving we don't notice any speed differences. We didn't do any official testing...just gut feeling. I know the software will use the processor for cycles...but file serving isn't processor intensive anyway. I also thought about going raid on a box we backup to via ftp...just for the speed. Hardware or software...worth it? -- Thanks, George "The only secure Microsoft software is what's still shrink-wrapped in their warehouse..." (Forno)
A
Anyone-
Do you notice any real speed differences? I'm running a duel P3 866 box and have been toying with the idea of going software raid for our main share. (four scsi 9.1GB on SCSI 160) I have not had any dealings with software raid so i can not answer that question really.
It's really a question of what you are trying to accomplish and what RAID level you use. Do you need fast writes, fast reads equal performance for both? Are you looking for redundancy or data protection? Is capacity a concern? - Herman Jack Malone wrote:
A
Anyone-
Do you notice any real speed differences? I'm running a duel P3 866 box and have been toying with the idea of going software raid for our main share. (four scsi 9.1GB on SCSI 160)
I have not had any dealings with software raid so i can not answer that question really.
On Thu, 2005-06-09 at 17:34 -0400, suse_gasjr4wd@mac.com wrote:
Do you notice any real speed differences? I'm running a duel P3 866 box and have been toying with the idea of going software raid for our main share. (four scsi 9.1GB on SCSI 160) Yes. Even on a fairly old P4 with two 7200rpm 2mb cache IDE discs, doing a software raid-1 speeds up reading significantly, although it slows down writing a little bit.
I saw this on a server that used to run a raid one using the onboard promise controller (junk, if you ask me) with the drivers provided by promise, running SUSE 8.0 Pro. I upgraded this box to 9.2, only to find that promise doesn't have 2.6 based drivers, and the drivers in the 2.6 kernel doesn't support the controller's raid functions (it's a software based controller, see?). The two discs were one the primary and secondary conrtollers respectively, so I just set up a kernel based raid-1 instead. Problem was I couldn't get it to boot. So I disabled the promise controller, stuck the two discs on the normal IDE controllers (Intel ICH3/4 I think) and did the raid-1 there - performs better than it ever has! The only problem with kernel based raid-1 (this I read, haven't any experience of it) is if you have both discs one a single controller (say you have two on each, with two raid-1 sets) you could run out of PCI bandwidth, where a dedicated raid controller would only push the data through the PCI bus once. Like I said, this is what I read - yet to be tired out :-) -- Kind Regards Hans du Plooy SagacIT (Pty) Ltd hansdp at sagacit dot com
On Fri, 10 Jun 2005 05:54 am, Hans du Plooy wrote:
I have a machine running two discs in a kernel based raid-1, and one of the discs go south, what are the steps involved in removing the one disc and getting the other one up and running again? Just change the fstab entries?
It should still be running. The mdadmd meta-disk monitor that you wisely set up should have emailed you to tell you the raid has lost a mirror and you can verify this by running root> cat /proc/mdstat
Then, if I have an identical disc as a replacement (say I was smart enough to buy three discs and keep one for incase ;-) how do I go about adding the second disc and creating a new raid without putting the installation and data on the good disc in any danger?
Power off, swap the new disk in, boot up. Dump the partition table with root> fdisk -d /dev/<good-disk> | sfdisk /dev/<new-disk> DO NOT STUFF UP playing with either of those commands, check what I've said first, I'm in a hurry and big guns make big holes. then man mdadmin should tell you the exact command to hot-add the new partitions. cat /proc/mdstat will tell you that one partition is rebuilding, the rest deferred. Some time (hours) later all should be well. YMMV michaelj -- Michael James michael.james@csiro.au System Administrator voice: 02 6246 5040 CSIRO Bioinformatics Facility fax: 02 6246 5166 Internet Explorer is fine for downloading Firefox, but after that....
I agree with Micheal.
That is exactly what I had to do twice so far on a 200GB Raid-1 mirror
and it worked just fine. The only part that I got annoyed with was having
to wait for hours until the new drive was synched.... Bummer!
Other than that, there is no magic into replacing a faulty drive when a
Raid crashes. Just follow the steps that Micheal presents and you
should be just fine.
Just in case you are wondering what happens if your new drive is bigger
than the exisiting old-good drive currently operating, no need to worry.
You raid will still work but will occupy only the smaller drive's capacity.
Hope that helps!
Chris
----- Original Message -----
From: "Michael James"
On Fri, 10 Jun 2005 05:54 am, Hans du Plooy wrote:
I have a machine running two discs in a kernel based raid-1, and one of the discs go south, what are the steps involved in removing the one disc and getting the other one up and running again? Just change the fstab entries?
It should still be running. The mdadmd meta-disk monitor that you wisely set up should have emailed you to tell you the raid has lost a mirror and you can verify this by running root> cat /proc/mdstat
Then, if I have an identical disc as a replacement (say I was smart enough to buy three discs and keep one for incase ;-) how do I go about adding the second disc and creating a new raid without putting the installation and data on the good disc in any danger?
Power off, swap the new disk in, boot up. Dump the partition table with root> fdisk -d /dev/<good-disk> | sfdisk /dev/<new-disk>
DO NOT STUFF UP playing with either of those commands, check what I've said first, I'm in a hurry and big guns make big holes.
then man mdadmin should tell you the exact command to hot-add the new partitions.
cat /proc/mdstat will tell you that one partition is rebuilding, the rest deferred. Some time (hours) later all should be well. YMMV
michaelj
-- Michael James michael.james@csiro.au System Administrator voice: 02 6246 5040 CSIRO Bioinformatics Facility fax: 02 6246 5166
Internet Explorer is fine for downloading Firefox, but after that....
-- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
Op vrijdag 10 juni 2005 07:52, schreef Michael James:
On Fri, 10 Jun 2005 05:54 am, Hans du Plooy wrote:
I have a machine running two discs in a kernel based raid-1, and one of the discs go south, what are the steps involved in removing the one disc and getting the other one up and running again? Just change the fstab entries?
It should still be running. The mdadmd meta-disk monitor that you wisely set up should have emailed you to tell you the raid has lost a mirror and you can verify this by running root> cat /proc/mdstat
Added to the wiki: http://www.susewiki.org/index.php?title=Raid_disk_replacement -- Richard Bos Without a home the journey is endless
participants (9)
-
Chris Roubekas
-
Hans du Plooy
-
Herman Knief
-
Jack Malone
-
Jerry Westrick
-
Michael James
-
Richard Bos
-
Silviu Marin-Caea
-
suse_gasjr4wd@mac.com