linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* two questions re. proactive recovery and forced assembly
@ 2008-04-10 12:01 rosenfield.albert
  2008-04-12 22:36 ` Richard Scobie
  0 siblings, 1 reply; 7+ messages in thread
From: rosenfield.albert @ 2008-04-10 12:01 UTC (permalink / raw)
  To: linux-raid

Howdy

I couldn't find these in the archives, so here goes.

Background:
I have a broken MD RAID5 array. A disk had a sector failure, and
shortly thereafter another had a failure in an unrelated sector.  The
current situation is that MD will not assemble the array.  Since
everything's broken anyway, and I'll be spending a lot of time in this
direction, I'm going to upgrade the entire system with new software
and maybe new disks.

Question 1.
In order to get to my data, is it still the old clunky procedure of
creating a new array on top of the old one, and crossing your fingers
hoping that the superblocks land in the right places and nothing gets
reinitialized?

Or has mdadm at this point grown a feature to forcibly assemble an
array with two kicked devices?

Question 2.
A background scan feature has been discussed a few times, my English
is limited but I find this explanation to be a good one:
http://thread.gmane.org/gmane.linux.raid/2206

According to a wishlist found here:
http://arctic.org/~dean/raid-wishlist.html, Neil Brown has been
gratuitous enough to spend time implementing said feature.  Reading
the details though, it seems like we only have error correction when
MD accidentally stumbles on a failed sector.

At first I thought I could add a cron job a la "dd if=/dev/mdX of=- |
throttle -M1 >/dev/null" to scan the entire MD array, but this would
be no better - a good RAID implementation such as MD would of course
load balance and read from all disks in a RAID1 at the same time, so
for a two-disk array that means that this command will only catch half
of all the sector errors that pop up.  Probabilities worsen for arrays
containing more devices, of course.

Does a proper solution for this exist in MD yet?

(If not, I'll probably buy hardware RAID instead, recently having had
good experience with resizing a pretty weird array using the CLI for
the SmartArray line of controllers.)

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

* Re: two questions re. proactive recovery and forced assembly
  2008-04-10 12:01 two questions re. proactive recovery and forced assembly rosenfield.albert
@ 2008-04-12 22:36 ` Richard Scobie
  2008-05-07 11:22   ` rosenfield.albert
  2008-05-07 12:52   ` rosenfield.albert
  0 siblings, 2 replies; 7+ messages in thread
From: Richard Scobie @ 2008-04-12 22:36 UTC (permalink / raw)
  To: linux-raid

rosenfield.albert@gmail.com wrote:

> Question 2.
> A background scan feature has been discussed a few times, my English
> is limited but I find this explanation to be a good one:
> http://thread.gmane.org/gmane.linux.raid/2206

There is a md RAID feature called "repair", which can be regularly 
scheduled via a cron job and will do a full check and repair of the 
entire array.

This can be initiated with the command:

echo repair > /sys/block/mdX/md/sync_action

where mdX is your array.

More information on md RAID options can be found in the file md.txt, in 
the Documentation directory of the kernel source.

Regards,

Richard

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

* Re: two questions re. proactive recovery and forced assembly
  2008-04-12 22:36 ` Richard Scobie
@ 2008-05-07 11:22   ` rosenfield.albert
  2008-05-08  1:13     ` Richard Scobie
  2008-05-07 12:52   ` rosenfield.albert
  1 sibling, 1 reply; 7+ messages in thread
From: rosenfield.albert @ 2008-05-07 11:22 UTC (permalink / raw)
  To: Richard Scobie; +Cc: linux-raid

Richard Scobie wrote:
>  There is a md RAID feature called "repair", which can be regularly
> scheduled via a cron job and will do a full check and repair of the entire
> array.
>
>  This can be initiated with the command:
>
>  echo repair > /sys/block/mdX/md/sync_action
>
>  where mdX is your array.
>
>  More information on md RAID options can be found in the file md.txt, in the
> Documentation directory of the kernel source.

Beautiful, just what I was looking for.

Thanks!

(How about forcibly assembling an array where one too many disks has
been kicked?  Is that still, uhm, contorted to say the least? Or is
there a proper feature for that too?)

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

* Re: two questions re. proactive recovery and forced assembly
  2008-04-12 22:36 ` Richard Scobie
  2008-05-07 11:22   ` rosenfield.albert
@ 2008-05-07 12:52   ` rosenfield.albert
  1 sibling, 0 replies; 7+ messages in thread
From: rosenfield.albert @ 2008-05-07 12:52 UTC (permalink / raw)
  To: Richard Scobie; +Cc: linux-raid

> More information on md RAID options can be found in the file md.txt, in the
> Documentation directory of the kernel source.

Looking over md.txt, there is also a less introsive 'check' option,
which it seems does not assume that the array is dirty to begin with.

The documentation says that 'check' "may repair the disk".  What does
that mean?  Will it or won't it?  (does it suffice to use 'check' in a
cron job?)

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

* Re: two questions re. proactive recovery and forced assembly
  2008-05-07 11:22   ` rosenfield.albert
@ 2008-05-08  1:13     ` Richard Scobie
  2008-05-08 11:01       ` rosenfield.albert
  0 siblings, 1 reply; 7+ messages in thread
From: Richard Scobie @ 2008-05-08  1:13 UTC (permalink / raw)
  To: linux-raid

rosenfield.albert@gmail.com wrote:

> 
> (How about forcibly assembling an array where one too many disks has
> been kicked?  Is that still, uhm, contorted to say the least? Or is
> there a proper feature for that too?)

Depends what you mean by contorted. Have a look at the "For assemble" 
section of the mdadm man page.

mdadm -A --force /dev/mdX /dev/sda1 /dev/sdb1 /dev/sdc1

does not seem contorted to me.

Regards,

Richard

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

* Re: two questions re. proactive recovery and forced assembly
  2008-05-08  1:13     ` Richard Scobie
@ 2008-05-08 11:01       ` rosenfield.albert
  2008-05-08 20:23         ` Richard Scobie
  0 siblings, 1 reply; 7+ messages in thread
From: rosenfield.albert @ 2008-05-08 11:01 UTC (permalink / raw)
  To: Richard Scobie; +Cc: linux-raid

> Have a look at the "For assemble"
> section of the mdadm man page.
>
>  mdadm -A --force /dev/mdX /dev/sda1 /dev/sdb1 /dev/sdc1
>
>  does not seem contorted to me.

You're absolutely right.

But will this assemble a RAID5 array where the event counters are out
of sync on not one, but two disks?

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

* Re: two questions re. proactive recovery and forced assembly
  2008-05-08 11:01       ` rosenfield.albert
@ 2008-05-08 20:23         ` Richard Scobie
  0 siblings, 0 replies; 7+ messages in thread
From: Richard Scobie @ 2008-05-08 20:23 UTC (permalink / raw)
  To: linux-raid

rosenfield.albert@gmail.com wrote:

> But will this assemble a RAID5 array where the event counters are out
> of sync on not one, but two disks?

I cannot read code unfortunately, but the man page states:

" --force

Insist that mdadm accept the geometry and layout specified without 
question."

I would therefore expect it to.

Regards,

Richard

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

end of thread, other threads:[~2008-05-08 20:23 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-10 12:01 two questions re. proactive recovery and forced assembly rosenfield.albert
2008-04-12 22:36 ` Richard Scobie
2008-05-07 11:22   ` rosenfield.albert
2008-05-08  1:13     ` Richard Scobie
2008-05-08 11:01       ` rosenfield.albert
2008-05-08 20:23         ` Richard Scobie
2008-05-07 12:52   ` rosenfield.albert

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).