linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Robin Hill <robin@robinhill.me.uk>
To: Wilson Jonathan <piercing_male@hotmail.com>
Cc: linux-raid@vger.kernel.org
Subject: Re: adding a missing drive(s), which drives get written to?
Date: Tue, 10 Dec 2013 08:59:20 +0000	[thread overview]
Message-ID: <20131210085920.GB441@cthulhu.home.robinhill.me.uk> (raw)
In-Reply-To: <BLU0-SMTP144CE5F6040BC17EDAE8A9E98D30@phx.gbl>

[-- Attachment #1: Type: text/plain, Size: 1741 bytes --]

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        <robin@robinhill.me.uk> |
   / / )      | Little Jim says ....                            |
  // !!       |      "He fallen in de water !!"                 |

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

  reply	other threads:[~2013-12-10  8:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-09 14:09 adding a missing drive(s), which drives get written to? Wilson Jonathan
2013-12-10  8:59 ` Robin Hill [this message]
2013-12-10 22:16   ` adding a missing drive(s), which drives get written to? a thank you Wilson Jonathan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131210085920.GB441@cthulhu.home.robinhill.me.uk \
    --to=robin@robinhill.me.uk \
    --cc=linux-raid@vger.kernel.org \
    --cc=piercing_male@hotmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).