Linux RAID subsystem development
 help / color / mirror / Atom feed
* What does --replace actually do?
@ 2016-04-15 11:26 Eyal Lebedinsky
  2016-04-15 12:11 ` Mikael Abrahamsson
  2016-04-15 12:18 ` Robin Hill
  0 siblings, 2 replies; 3+ messages in thread
From: Eyal Lebedinsky @ 2016-04-15 11:26 UTC (permalink / raw)
  To: list linux-raid

When I request to replace sda with sdj (RAID6 in my case), does it create sdj from the
other members (NOT using sda) or does it make a copy of (by reading) sda?

I hope it is the former, assuming sda is having issues and the action is precautionary.

I see on stackexchange is mentioned that it actually does the latter:
	http://unix.stackexchange.com/questions/74924/how-to-safely-replace-a-not-yet-failed-disk-in-a-linux-raid5-array

And while I am here, can I replace two members at the same time? This should save time
as it takes about 10 hours to reconstruct a 4TB member.

TIA

-- 
Eyal Lebedinsky (eyal@eyal.emu.id.au)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: What does --replace actually do?
  2016-04-15 11:26 What does --replace actually do? Eyal Lebedinsky
@ 2016-04-15 12:11 ` Mikael Abrahamsson
  2016-04-15 12:18 ` Robin Hill
  1 sibling, 0 replies; 3+ messages in thread
From: Mikael Abrahamsson @ 2016-04-15 12:11 UTC (permalink / raw)
  To: Eyal Lebedinsky; +Cc: list linux-raid

On Fri, 15 Apr 2016, Eyal Lebedinsky wrote:

> When I request to replace sda with sdj (RAID6 in my case), does it 
> create sdj from the other members (NOT using sda) or does it make a copy 
> of (by reading) sda?

It reads sda and copies it to sdj. When it's done it'll fail sda. If it 
has problems reading from sda, it'll use the rest of the drives to 
recreate/recalculate the block and write that to sdj.

-- 
Mikael Abrahamsson    email: swmike@swm.pp.se

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: What does --replace actually do?
  2016-04-15 11:26 What does --replace actually do? Eyal Lebedinsky
  2016-04-15 12:11 ` Mikael Abrahamsson
@ 2016-04-15 12:18 ` Robin Hill
  1 sibling, 0 replies; 3+ messages in thread
From: Robin Hill @ 2016-04-15 12:18 UTC (permalink / raw)
  To: Eyal Lebedinsky; +Cc: list linux-raid

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

On Fri Apr 15, 2016 at 09:26:48PM +1000, Eyal Lebedinsky wrote:

> When I request to replace sda with sdj (RAID6 in my case), does it
> create sdj from the other members (NOT using sda) or does it make a
> copy of (by reading) sda?
> 
> I hope it is the former, assuming sda is having issues and the action
> is precautionary.
> 
It's the latter. The data is copied from the existing disk, unless a
read-error occurs, in which case it'll be reconstructed from the other
members. This will be faster and have a far lower impact on performance
than using the other members for everything. If you cannot trust the
disk you're replacing then it should be failed and a normal rebuild
carried out instead.

> And while I am here, can I replace two members at the same time? This
> should save time as it takes about 10 hours to reconstruct a 4TB member.
> 
I've no idea on this one I'm afraid. I can't think of any immediate
reason why this wouldn't be possible, but whether the current
implementation supports it or not is another matter. You could test with
loopback devices.

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: 181 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-04-15 12:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-15 11:26 What does --replace actually do? Eyal Lebedinsky
2016-04-15 12:11 ` Mikael Abrahamsson
2016-04-15 12:18 ` Robin Hill

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox