# "Wearing-in" hard disks for RAID5 array?

## Havin_it

Hi all,

I just bought an HP N40L Microserver and three extra HDDs with the intention of using them in software RAID5 for a data store. I bought all the drives from the same supplier and they are all the same model (WD Caviar Blue 500GB SATA2), so it's likely they'll be from the same manufactured batch.  I've heard it said that this significantly increases the odds that two (or all three!) will fail in quick succession.

How big a concern is this? If major, it occurs that I could mitigate the risk by "wearing-in" two of the drives by writing to them (one twice as much as the other, natch) so that in theory the most-written-to drive would be likely fail first.

Do you think this is worth doing? If so, how much writing would it probably take to make a difference? Any particular strategy for what type of writing to perform (plain ol' dd, random writes around the disk, etc)?

Thanks in advance, storage gurus  :Very Happy: 

----------

## John R. Graham

With RAID 5, there isn't any "most written" drive as data and parity are striped across all drives. It's also worth noting that RAID is not backup: you still need a good backup strategy if you're going to be storing mission critical data. In the event of a bad drive, RAID will probably protect you long enough to update your incremental backup before you take the array down for repair (or rebuild to a hot spare).

Considering all of that, I'd vote "no" on the burn-in.

Edit: I think I misunderstood you at first. You're saying, wear out one drive some, the second a little, and the third not at all to create some gradient in the possible infant mortality failure of the drives. I'd still vote "no". The reason is that, even if you've received drives from a batch that's going to experience severe infant mortality, there will still be variation in the batch. You never know whether you're wearing the weakest or the most robust drive of the set.

- John

----------

## Havin_it

Hi John, thanks for the reply. Indeed, I've had the speech about RAID vs backups: the really valuable content will be live-replicated to other machines, the rest will be ripped media which, while losing it would be a pain, wouldn't be the end of the world. Anyway, my last RAID5 set of SCSI drives outlasted their host machine (>7 years), so the point may be a bit moot anyway...

----------

## krinn

but you could be sure you won't make 7 years with it, sata class disk vs scsi is not the same when speaking about mtbf (but the cheap prize for sata disk should balance that)

----------

## frostschutz

 *Havin_it wrote:*   

> I've heard it said that this significantly increases the odds that two (or all three!) will fail in quick succession.

 

There are so many variables in a drive's life (different access patterns, different temperature, and other outer influences) that it's virtually impossible to make two drives fail at the same time. If it actually happens it's either due to someone drumming the Radetzky march on your computer case or, more likely, pure random chance.

However, most cases of "simultaneous" failure is actually an old failure that went undiscovered for a LONG time until a full resync became necessary due to another drive failure - or you being lazy and waiting 8 weeks for a replacement drive from the manufacturer instead of replacing the drive within the hour.

Don't just blindly trust your RAID; configure smartmontools to monitor and test your drives regularly, check data integrity. Anything to detect drive failures, even if it's just a single bad block, as early as possible.

----------

## alextz

When i built my RAID 6 i just did a badblocks sweep of all the harddrives.

Now from time to time I just scrub the data on them to ensure that there is no badblock.

----------

## Havin_it

 *alextz wrote:*   

> When i built my RAID 6 i just did a badblocks sweep of all the harddrives.
> 
> Now from time to time I just scrub the data on them to ensure that there is no badblock.

 

You mean I ought to run badblocks on the drives, even though they're brand new? What options would be recommended?

Can you expand on what you mean by "scrub the data"? Is this something that can be done with the data in-place? I won't have the space anywhere else to back up all the contents. Also, I'll be making the array a LUKS partition (about to post a separate question about this): will this present additional problems?

----------

## alextz

You can try:

```
badblocks -wvsb 4096 /dev/sdX
```

To scrub the data on the raid array just do : 

```
echo check >> /sys/block/md0/sync_action
```

----------

