From: NeilBrown <neilb@suse.de>
To: CoolCold <coolthecold@gmail.com>
Cc: Martin Cracauer <cracauer@cons.org>, linux-raid@vger.kernel.org
Subject: Re: Periodic RebuildStarted event
Date: Tue, 15 Mar 2011 14:41:40 +1100 [thread overview]
Message-ID: <20110315144140.42f9c2c7@notabene.brown> (raw)
In-Reply-To: <AANLkTi=xz=2RG2Ob_BsCffFDki_wYcUOohB5k4YQhZ-6@mail.gmail.com>
On Tue, 15 Mar 2011 06:16:22 +0300 CoolCold <coolthecold@gmail.com> wrote:
> Hello!
>
> On Tue, Feb 8, 2011 at 3:25 AM, NeilBrown <neilb@suse.de> wrote:
> [snip]
> > Then start either the
> > 'next' array at the beginning, or the 'current' array at the current point
> > (write to sync_min).
> I couldn't find documentation for sync_min/sync_max sysfs params at
> least for repo cloned from
> git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.37.y.git
> coolcold@coolcold:~/gits/linux-2.6.37.y$ grep -qi sync_min
> Documentation/md.txt || echo failed find docs
> failed find docs
Yes, sorry about that.
>
> As I could understand from sources - resync_min & resync_max are
> expressed in sectors (512bytes?) and are set to 0 & total sectors on
> device accordingly. resync_max value should be divisible by array
> chunk size (in sectors) . After setting this values, one can trugger
> "check" / "repair" into sync_action.
Yes - sectors (multiples of 512 bytes)
Yes - 0 and a big number. sync_max is actually set to MAX_LONG rather than
the actual total number of sectors.
Yes - one can trigger 'check' or 'repair' and it will obey these limits.
When it reaches 'sync_max' it will pause rather than complete. You can
use 'select' or 'poll' on "sync_completed" to wait for that number to
reach sync_max. Then you can either increase sync_max, or can write
"idle" to "sync_action".
>
> My basic idea is to use this method to clear pending sectors from
> SMART checks and looks like this gonna work, am i right?
>
I don't know exactly what "pending sectors" are, but if they are sectors
which return an error to READ and can be fixed by writing data to them, then
you are right, this should 'clear' any pending sectors.
Of course you will need to be careful about mapping the sector number
from smart to the second number given to 'sync_min'. Not only must you
adjust for any partition table, but also the 'data offset' of the
md array must be allowed for.
NeilBrown
> > Then wait for however long you want, abort the check (write 'idle' to
> > 'sync_action') and find out where it got up to (read sync_min) and record
> > that for next time.
> >
> > NeilBrown
> >
>
>
next prev parent reply other threads:[~2011-03-15 3:41 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-06 16:19 raid1 sector size Roberto Spadim
2011-02-06 16:49 ` Roberto Spadim
2011-02-06 18:03 ` Jérôme Poulin
2011-02-06 22:30 ` Stan Hoeppner
2011-02-07 1:21 ` Roberto Spadim
2011-02-07 23:44 ` Periodic RebuildStarted event Martin Cracauer
2011-02-07 23:52 ` Roberto Spadim
2011-02-07 23:59 ` Martin Cracauer
2011-02-08 0:28 ` Roberto Spadim
2011-02-08 0:25 ` NeilBrown
2011-03-15 3:16 ` CoolCold
2011-03-15 3:28 ` Roberto Spadim
2011-03-15 3:51 ` CoolCold
2011-03-15 4:16 ` Roberto Spadim
2011-03-15 3:41 ` NeilBrown [this message]
2011-03-15 4:21 ` CoolCold
2011-03-15 6:17 ` NeilBrown
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=20110315144140.42f9c2c7@notabene.brown \
--to=neilb@suse.de \
--cc=coolthecold@gmail.com \
--cc=cracauer@cons.org \
--cc=linux-raid@vger.kernel.org \
/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).