On Thu 22 Oct 2009 16:00:39 NZDT +1300, Roger Searle wrote:

> confirmation of being on the right track to resolve this.  Seems from the 
> failure of more than 1 partition I will be needing to buy a new disk

Absolutely. If the number of badbocks suddenly goes up, it's a
paperweight. You should get a warranty replacement if there are any bad
blocks during the wty period. Support your claim with evidence, aka
smartctl -a.

> The failed disk is 320GB, and contain (mirrored) /, home, and swap.  
> Presumably I could buy much larger disks, and need to repartition prior to 
> adding it back into the array? 
> The partitions should be at least the same size but could be much larger 
> without any problem?

If you were to replace a failed disk in a raid1, remove the failed disk
physically, install the new disk physically, boot, and partition the new
disk the same way as the one you removed was partitioned. You do NOT
have to raid the whole disk. You DO HAVE to make the raided partitions
of equal size. No they do not have to be at exactly the same location at
each disk with Linux kernel raid, but there are advantages in doing so
when it comes to boot loader installation. When you have created
partitions matching the existing raid partitions in size, use mdadm to
add them into the raid. They'll be synced automatically. See
/proc/mdstat I've done this a couple of times with zero trouble when a
disk blew up. I'll never have a Linux desktop without 2 disks in raid1
again.

You should not need to run mdadm for anything else.

In your case, as Steve pointed out, if both your raid1 disks are from
the same batch, they'll both fail at the same time. One's already
history. You're living on borrowed time. Mind you, I had fun once
testing out how long a disk would keep on going which by all means was
dead ten times. Years, if I remember. No I did not have anything
important on it. Just don't bother complaining when the smoke goes up.

Conclusion: when making a raid, never buy all disks from the same
manufacturer. (This rule may not be valid for high performance SCSI
server disks; it definitely is for consumer junk models. Note disks come
in two flavours: high performance server, and consumer junk. You easily
tell them apart by price.)

You can not enlarge existing raids. You can buy bigger disks and add
another raid partition set. As Steve says, you probably want to just buy
two bigger disks (no, not from the same make), stick them in, copy the
old onto the new, and pull the old.

Oh, and set up smartd. Only idiots don't, IMHO. No guarantees it'll save
your bacon, but much better than nothing. If you want to improve
matters, lod smartctl -a twice daily and write a script to tell you if
the bad blocks, pending, or uncorrectable numbers go up.

Volker

-- 
Volker Kuhlmann                 is list0570 with the domain in header
http://volker.dnsalias.net/     Please do not CC list postings to me.

Reply via email to