Thread (3 messages) 3 messages, 2 authors, 2013-12-10

Re: adding a missing drive(s), which drives get written to?

From: Robin Hill <hidden>
Date: 2013-12-10 08:59:20

On Mon Dec 09, 2013 at 02:09:11PM +0000, Wilson Jonathan wrote:
After recovering from a failed raid6, now running with 2 missing drives
and soon to be finally backed up (is still backing up), I have 2 related
questions...

The first is, can I add in both drives at the same time, or do I need to
add them in singly, just checking for clarity?
You can add both together. Older versions of mdadm would kick off the
rebuild before the addition of both disks had been completed though, so
you might want to freeze the array first:

 echo freeze > /sys/block/md0/md/sync_action                                    
 mdadm /dev/md0 --add /dev/foo /dev/bar                                         
 echo idle > /sys/block/md0/md/sync_action                                      
The second question is far more important... during the re-creation of
data on the newly added missing disk/partition(s) does mdadm just read
the data from the original array and write to the new disk(s) or does it
potentially write new/update existing data (excluding bitmap/superblock)
to the existing disks.
The rebuild process will only write data to the new disks. The only
cases where data will be written to the old disks during a rebuild is if
a read error is triggered and the data has to be reconstructed (not
applicable in your case as you have no redundancy to rebuild the data
from in the case of a read error), or if new data is written to the
array.

Cheers,
    Robin
-- 
     ___        
    ( ' }     |       Robin Hill        [off-list ref] |
   / / )      | Little Jim says ....                            |
  // !!       |      "He fallen in de water !!"                 |

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help