* Feature request, resumable raid check action
@ 2016-11-30 12:21 Patrick Dung
2016-12-02 4:54 ` NeilBrown
0 siblings, 1 reply; 6+ messages in thread
From: Patrick Dung @ 2016-11-30 12:21 UTC (permalink / raw)
To: linux-raid
Hello,
As I know if MD raid is using the newer metadata version, it support
resumable raid rebuild/sync. (that is, if a server is rebooted during
rebuild, it would resume from last position after reboot, instead of
starting from beginning).
In my recently testing (a few months ago):
I sometimes use the mdadm 'check' action for doing the disk scrubbing
of a MD raid.
After I rebooted the server, the 'check' operation is forgotten and is
not resumable.
I think resumable 'check' operation is useful as the array size would
become bigger in the future.
Thanks and regards,
Patrick
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Feature request, resumable raid check action
2016-11-30 12:21 Feature request, resumable raid check action Patrick Dung
@ 2016-12-02 4:54 ` NeilBrown
2016-12-02 5:57 ` Patrick Dung
0 siblings, 1 reply; 6+ messages in thread
From: NeilBrown @ 2016-12-02 4:54 UTC (permalink / raw)
To: Patrick Dung, linux-raid
[-- Attachment #1: Type: text/plain, Size: 930 bytes --]
On Wed, Nov 30 2016, Patrick Dung wrote:
> Hello,
>
> As I know if MD raid is using the newer metadata version, it support
> resumable raid rebuild/sync. (that is, if a server is rebooted during
> rebuild, it would resume from last position after reboot, instead of
> starting from beginning).
>
> In my recently testing (a few months ago):
> I sometimes use the mdadm 'check' action for doing the disk scrubbing
> of a MD raid.
> After I rebooted the server, the 'check' operation is forgotten and is
> not resumable.
>
> I think resumable 'check' operation is useful as the array size would
> become bigger in the future.
"check" is resumable. md doesn't record where it is up to though, you
need to do that yourself.
The "misc/mdcheck" script in the mdadm package makes use of this to
support time-limited checking, and to resume from where it left off.
You could use the script, or read it and see how it works.
NeilBrown
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Feature request, resumable raid check action
2016-12-02 4:54 ` NeilBrown
@ 2016-12-02 5:57 ` Patrick Dung
2016-12-02 6:09 ` NeilBrown
0 siblings, 1 reply; 6+ messages in thread
From: Patrick Dung @ 2016-12-02 5:57 UTC (permalink / raw)
To: NeilBrown; +Cc: linux-raid
Thanks for reply, NeilBrown.
In my testing:
I had run the mdcheck script, then reboot.
After rebooted, then I run the mdcheck script again, it did not
resume from where it stopped before reboot.
Is there something that I may had missed?
Best regards,
Patrick
On Fri, Dec 2, 2016 at 12:54 PM, NeilBrown <neilb@suse.com> wrote:
> On Wed, Nov 30 2016, Patrick Dung wrote:
>
>> Hello,
>>
>> As I know if MD raid is using the newer metadata version, it support
>> resumable raid rebuild/sync. (that is, if a server is rebooted during
>> rebuild, it would resume from last position after reboot, instead of
>> starting from beginning).
>>
>> In my recently testing (a few months ago):
>> I sometimes use the mdadm 'check' action for doing the disk scrubbing
>> of a MD raid.
>> After I rebooted the server, the 'check' operation is forgotten and is
>> not resumable.
>>
>> I think resumable 'check' operation is useful as the array size would
>> become bigger in the future.
>
> "check" is resumable. md doesn't record where it is up to though, you
> need to do that yourself.
> The "misc/mdcheck" script in the mdadm package makes use of this to
> support time-limited checking, and to resume from where it left off.
> You could use the script, or read it and see how it works.
>
> NeilBrown
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Feature request, resumable raid check action
2016-12-02 5:57 ` Patrick Dung
@ 2016-12-02 6:09 ` NeilBrown
2016-12-04 14:26 ` Mikael Abrahamsson
[not found] ` <CAEtPA0CMi6PiU1VC+3h78Wnr=t-ufkT3fz=tAT0hW0jVrAp5tQ@mail.gmail.com>
0 siblings, 2 replies; 6+ messages in thread
From: NeilBrown @ 2016-12-02 6:09 UTC (permalink / raw)
To: Patrick Dung; +Cc: linux-raid
[-- Attachment #1: Type: text/plain, Size: 444 bytes --]
On Fri, Dec 02 2016, Patrick Dung wrote:
> Thanks for reply, NeilBrown.
>
> In my testing:
> I had run the mdcheck script, then reboot.
> After rebooted, then I run the mdcheck script again, it did not
> resume from where it stopped before reboot.
>
> Is there something that I may had missed?
Did you reboot while it was running, or after it had finished its
aloted time?
You need to let it finish and record where it got up to.
NeilBrown
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Feature request, resumable raid check action
2016-12-02 6:09 ` NeilBrown
@ 2016-12-04 14:26 ` Mikael Abrahamsson
[not found] ` <CAEtPA0CMi6PiU1VC+3h78Wnr=t-ufkT3fz=tAT0hW0jVrAp5tQ@mail.gmail.com>
1 sibling, 0 replies; 6+ messages in thread
From: Mikael Abrahamsson @ 2016-12-04 14:26 UTC (permalink / raw)
To: NeilBrown; +Cc: Patrick Dung, linux-raid
On Fri, 2 Dec 2016, NeilBrown wrote:
> Did you reboot while it was running, or after it had finished its
> aloted time?
> You need to let it finish and record where it got up to.
I think he wants this "record where it got up to" when md-volumes are
stopped when machine is rebooted, and then resumed again when machine
starts up again.
I guess next question is where a change like this should go, into
start/stop scripts, mdadm or the kernel?
--
Mikael Abrahamsson email: swmike@swm.pp.se
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Feature request, resumable raid check action
[not found] ` <CAEtPA0CMi6PiU1VC+3h78Wnr=t-ufkT3fz=tAT0hW0jVrAp5tQ@mail.gmail.com>
@ 2016-12-05 0:00 ` NeilBrown
0 siblings, 0 replies; 6+ messages in thread
From: NeilBrown @ 2016-12-05 0:00 UTC (permalink / raw)
To: Patrick Dung; +Cc: linux-raid
[-- Attachment #1: Type: text/plain, Size: 829 bytes --]
(linux-raid added back to cc:)
On Fri, Dec 02 2016, Patrick Dung wrote:
> I rebooted while it was running.
> For a new RAID, the initial sync or resync would resume after reboot.
> I thought check would have the same semantic.
>
> If I am correct, the mdcheck script is designed for a 7x24 system.
> Users can pause the 'check' action and resume later.
>
> The problem is that I could not leave my computer running on 7x24.
> A full check may take about 12 hours for a 6TB RAID1.
>
> Ok, I recheck the script and found 'sync_min'
> I can use it to manually perform resumable check action.
Correct.
You could possibly even modify mdcheck to catch SIGTERM and close down
the resync early, remembering where it is up. This might work well with
reboots.
NeilBrown
> Reference: https://www.kernel.org/doc/Documentation/md.txt
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-12-05 0:00 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-30 12:21 Feature request, resumable raid check action Patrick Dung
2016-12-02 4:54 ` NeilBrown
2016-12-02 5:57 ` Patrick Dung
2016-12-02 6:09 ` NeilBrown
2016-12-04 14:26 ` Mikael Abrahamsson
[not found] ` <CAEtPA0CMi6PiU1VC+3h78Wnr=t-ufkT3fz=tAT0hW0jVrAp5tQ@mail.gmail.com>
2016-12-05 0:00 ` NeilBrown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox