All of lore.kernel.org
 help / color / mirror / Atom feed
* Requesting replace mode for changing a disk
@ 2009-05-08 22:15 Goswin von Brederlow
  2009-05-09 11:41 ` John Robinson
  2009-05-09 23:07 ` Bill Davidsen
  0 siblings, 2 replies; 24+ messages in thread
From: Goswin von Brederlow @ 2009-05-08 22:15 UTC (permalink / raw)
  To: linux-raid

Hi,

consider the following situation: You have a software raid that runs
fine but one disk is suspect (e.g. SMART says failure imminent or
something). How do you replace that disk?

Currently you have do fail/remove the disk from the raid, add a
fresh disk and resync. That leaves a large window in which redundancy
is compromised. With current disk sizes that can be days.

It would be nice if one could tell the kernel to replace a disk in a
raid set with a spare without the need to degrade the raid.

Thoughts?

MfG
        Goswin

^ permalink raw reply	[flat|nested] 24+ messages in thread
* Re: Requesting replace mode for changing a disk
@ 2009-05-13  4:08 Sandeep K Sinha
  0 siblings, 0 replies; 24+ messages in thread
From: Sandeep K Sinha @ 2009-05-13  4:08 UTC (permalink / raw)
  To: linux-raid

>"Leslie Rhorer" <lrhorer@satx.rr.com> writes:

>> This is one of many things proposed occasionally here, no real
>> objection, sometimes loud support, but no one actually *does* the code.
>
> 	At the risk of being a metoo, I would really love this feature.
>
>> You have described the problem exactly, and the solution is still to do
>> it manually. But you don't need to fail the drive long term, if you can
>> stop the array for a few moments. You stop the array, remove the suspect
>> drive,
>
> Um, how, exactly?  That is to say, after stopping the array, how does one
> remove the drive?  From the next step in your suggestion, it doesn't seem
> tome you are talking about physically removing the drive, so how does one
> remove a drive from a stopped array for this purpose?  I didn't think that
> either
>
> 	mdadm -r <drive> <array>
> or
>
> 	mdadm -f <drive> <array>
>
> could be used on a stopped array.  Am I mistaken?
>
>> create a raid1 of the suspect drive marked write-mostly and the
>> new spare,
>
> But doesn't creating the array with the drive wipe the contents?  If so, it
> doesn't seem to me this provides much redundancy.
>
>> then add the raid1 in place of the suspect drive.
>
> Before starting the array?  If so, how?  Or should one do an assemble
> including the newly minted RAID1?  I thought mdadm would take the newly
> added drive to be blank, even if it isn't.
>
>> For any
>> chunks present on the new drive the reads will go there, reducing
>
> Huh?  Are you saying any read which finds one chunk missing will
> automatically write back the missing data (doing a spot rebuild), or
> something else?
>

Yes, this is one of concepts that used while using a mirrored configuration.
I am not sure though, that even md has it. Even a read fails on one of
the part of the mirror
then it is served from the mirror. Also, a write is sent back to keep
the mirror in sync.
This should ideally happen, as if a read fails on the device which is
being mirrored, you are
aware that there is something wrong and you should try to recover from
it silently.


>> access, while data is copied from the old to the new in resync, and
>
> See my query above.  It seems to me you are saying the RAID1 can be created
> without wiping the drive.
>
>> writes still go to the old suspect drive so if the new drive fails you
>> are no worse off.
>
> I think I would expect the old drive to be more likely to fail than the new.
>
>> When the raid1 is clean you stop the main array and
>> back the suspect drive out.
>
> OK, basically the same question.  How does one disassemble the RAID1 array
> without wiping the data on the new drive?

> I think he ment this:
>
> mdadm --stop /dev/md0
> mdadm --build /dev/md9 --chunk=64k --level=1 --raid-devices=2 /dev/suspect /dev/new
> mdadm --assemble /dev/md0 /dev/md9 /dev/other ...

> MfG
>        Goswin

Now the point here is that is it so simple to offline an array and
just assimilate it back with a different raid level.
IMO, may be on desktop environment it is acceptable but not when
deployed on a larger scale.

What I believe here is that there should be an option to fail to a
disk gradually. This can be invoked the moment you start getting to
know that your disk is faulty and is soon going to be blown away.
The first approach is to start copying the contents of that disk to a
spare disk. And once completed, the faulty disk should be replaced
with the newly constructed disk.

In the course of construction, write must go on both the devices and
read must be served from the original faulty disk.
I am not sure whether we have a similar mechanism implemented in md or
not, but this will sound better for a long term goal.

If not I believe failing should be provided with this extra
functionality of "immediate" or "gradual" failure. As both should
ideally start reconstruction.

Comments please.


--
Regards,
Sandeep.






“To learn is to change. Education is a process that changes the learner.”
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2009-05-14 12:00 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-08 22:15 Requesting replace mode for changing a disk Goswin von Brederlow
2009-05-09 11:41 ` John Robinson
2009-05-09 23:07 ` Bill Davidsen
2009-05-10  1:22   ` Goswin von Brederlow
2009-05-10  2:20   ` Guy Watkins
2009-05-10  7:02     ` Goswin von Brederlow
2009-05-10 14:33     ` Bill Davidsen
2009-05-10 15:55       ` Guy Watkins
2009-05-13  1:21   ` Leslie Rhorer
2009-05-13  3:27     ` Goswin von Brederlow
2009-05-13  4:36       ` Neil Brown
2009-05-13  7:37         ` Goswin von Brederlow
2009-05-13 11:02           ` Neil Brown
2009-05-14 10:44         ` David Greaves
2009-05-14 12:00           ` Neil Brown
2009-05-13  4:31     ` Neil Brown
2009-05-13  4:37       ` SandeepKsinha
2009-05-13  4:54         ` Neil Brown
2009-05-13  5:07           ` SandeepKsinha
2009-05-13  5:21             ` NeilBrown
2009-05-13  5:31               ` SandeepKsinha
2009-05-13 10:51                 ` Neil Brown
2009-05-13  7:28       ` Goswin von Brederlow
2009-05-13  4:08 Sandeep K Sinha

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.