* adding a missing drive(s), which drives get written to?
@ 2013-12-09 14:09 Wilson Jonathan
2013-12-10 8:59 ` Robin Hill
0 siblings, 1 reply; 3+ messages in thread
From: Wilson Jonathan @ 2013-12-09 14:09 UTC (permalink / raw)
To: linux-raid
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?
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.
My reason for asking about what gets written where is because I
re-purposed the pulled (2) disks along with another that I had laying
around to use as a temporary backup medium... one of the pulled disks
suddenly re-mapped over a thousand sectors (i'm fairly sure it was in
the thousand, but the disk is now reporting immediate fail imminent in
smart and and in reality when it was taring to it, it totally locked up)
but then again the disk was over 5 years of "powered up" time... I'm
suprised it had not failed sooner so I am now rather worried that
although periodic scrubs (first sun/month) have reported no problems
that if one of the existing 4 disks gets heavy writes it will fail but
"might" just last long enough in a heavy read situation (and in fact no
problems are reported so far in the backup process) to get at least 1
disk redundancy back into the array.
Thanks in advance.
Jon
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: adding a missing drive(s), which drives get written to?
2013-12-09 14:09 adding a missing drive(s), which drives get written to? Wilson Jonathan
@ 2013-12-10 8:59 ` Robin Hill
2013-12-10 22:16 ` adding a missing drive(s), which drives get written to? a thank you Wilson Jonathan
0 siblings, 1 reply; 3+ messages in thread
From: Robin Hill @ 2013-12-10 8:59 UTC (permalink / raw)
To: Wilson Jonathan; +Cc: linux-raid
[-- 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 --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: adding a missing drive(s), which drives get written to? a thank you.
2013-12-10 8:59 ` Robin Hill
@ 2013-12-10 22:16 ` Wilson Jonathan
0 siblings, 0 replies; 3+ messages in thread
From: Wilson Jonathan @ 2013-12-10 22:16 UTC (permalink / raw)
To: Robin Hill; +Cc: linux-raid, bernd.schubert
On Tue, 2013-12-10 at 08:59 +0000, Robin Hill wrote:
> 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
Wow that was a bum tightening 7 hours (I set the recovery to be
slow[er], so I didn't tax the existing 4 drives, probably would have
made no difference had I maxed it out but I do occasionally get a sata
reset if doing things like DD and other things on disks that are under
heavy load)
The echo > freeze didn't work and came up with an error, so I tried >
idle which it accepted... then did some googling and found that doing an
idle to an array with multiple drive adds should stop and re-start it so
even if the mdadm only tried to add 1 drive, it would then re-start and
then add the 2 drives (was in a post on here by Niel Brown in 2012.)
Thank you for your help, and Bernd Schubert who posted to my initial
thread when I had problems, it was much appreciated.
Jon.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-12-10 22:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-09 14:09 adding a missing drive(s), which drives get written to? Wilson Jonathan
2013-12-10 8:59 ` Robin Hill
2013-12-10 22:16 ` adding a missing drive(s), which drives get written to? a thank you Wilson Jonathan
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).