Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have a four disk RAID 5 array that is in the process of failing hard. One disk is completely dead and smartctl is telling me that a second disk is failing. All the data on the RAID is backed up, however about 1 TB is non trivial to restore since it is ripped CDs and DVDs and I would have to rip them again. I have a spare disk that I can swap out for the dead drive and attempt to rebuild, if that is the right term, the RAID and then backup the difficult data to a different fully healthy new RAID 6 setup. I could also backup the data from the now non-redundant RAID directly to the new RAID.

Is is gentler on a disk from a non-redundant four disk RAID to "restore" the RAID or copy the data directly.

If it matters the disks are 2 TB each giving a total RAID size of 6 TB. There is about 5 TB of data on the RAID and I would want to get 1 TB off of it.

share|improve this question

3 Answers 3

up vote 2 down vote accepted

"Rebuilding" a newly added disk to a RAID array or accessing a degraded ARRAY are signicantly close in term of stress on the disks. The difference here is more about the size of the data to read: 6 GB against just 1 GB.

I would advise you to copy all you can while you can on that spare disk.

The worst case scenario being that the dying disk dies before you are finishing the copy or during the RAID rebuilding attempt.

  1. While trying to save files: you would end with some of your "non trivial" data saved
  2. While rebuilding the array: you would lose everything

(the choice in then obvious)

share|improve this answer
    
But wouldn't the rebuild be sequential reads while the data copy would be more like random, although hopefully not fully random, reads? –  StrongBad Apr 9 at 10:53
    
It really depend on the RAID driver/card, but sequentially is not a simple concept for multi-head/platter disks. So sure, you would gain some time vs randomly, but that would not be x6, nor x6 less stress. –  Ouki Apr 9 at 10:57
    
This is a risk assessment here: if the dying disk failed during any operation, what you prefer: having some data saved or not ? –  Ouki Apr 9 at 10:59

Copy the data from the array first. Rebuilding a full RAID 5 set will involve reading all the data anyway, as new parity data has to be calculated. If you only copy the data you need, you'll be putting less strain on the failing disk.

share|improve this answer

If one disk is already gone entirely, you're left with no redundancy.

If another disk is failing then, you could duplicate that disk using ddrescue and then see what's left using the duplicate.

At this point you have silent data corruption; with some effort you could locate the affected files, by means of having ddrescue record which areas could not be read, and using filefrag to determine which files had extents in those areas.

It may be simpler to copy the files off the damaged array, provided it is still up and running at all. It's a bit dangerous though as such random access copy is more stressful to a disk than a linear ddrescue, and if the disk dies completely, everything is gone.

Good luck.

PS: You should never let things get so far. Test your disks regularly for read errors, replace disks at the first sign of trouble. Without monitoring, even a RAID6 won't help you much, if you let read errors go undetected for months...

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.