Discussion:
Cancelling not pausing array check
Patrik Horník
2014-10-06 13:29:13 UTC
Permalink
Hello,

is it possible to cancel RAID 6 array check? echo check >
/sys/block/mdX/md/sync_action apparently only pauses it and next check
continuing from saved position. (I guess /sys/block/mdX/md/sync_min)

I want to achieve two things:

- Start check from the start of the array.

- Be sure I can shutdown array without any ill effect because check
was interrupted.

I guess that position will be cleared when array is stopped and
started again, but I dont want to guess and experiment... :)

Thanks.

Best regards,

Patrik
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Robin Hill
2014-10-06 13:36:42 UTC
Permalink
Post by Patrik Horník
Hello,
is it possible to cancel RAID 6 array check? echo check >
/sys/block/mdX/md/sync_action apparently only pauses it and next check
continuing from saved position. (I guess /sys/block/mdX/md/sync_min)
- Start check from the start of the array.
- Be sure I can shutdown array without any ill effect because check
was interrupted.
I guess that position will be cleared when array is stopped and
started again, but I dont want to guess and experiment... :)
Thanks.
Best regards,
Patrik
You'd echo idle to the sync_action to pause/stop the check. If you want
to restart from the beginning next time, just echo 0 to sync_min
(similarly, if you just want to check/repair a specific range then set
sync_min and sync_max before the check/repair).

Cheers,
Robin
position.
--
___
( ' } | Robin Hill <***@robinhill.me.uk> |
/ / ) | Little Jim says .... |
// !! | "He fallen in de water !!" |
Patrik Horník
2014-10-06 13:39:12 UTC
Permalink
OK, thanks. So that should be fully working and correct way to do it
and I cant harm my array by this in any way?
Post by Patrik Horník
Hello,
is it possible to cancel RAID 6 array check? echo check >
/sys/block/mdX/md/sync_action apparently only pauses it and next che=
ck
Post by Patrik Horník
continuing from saved position. (I guess /sys/block/mdX/md/sync_min)
- Start check from the start of the array.
- Be sure I can shutdown array without any ill effect because check
was interrupted.
I guess that position will be cleared when array is stopped and
started again, but I dont want to guess and experiment... :)
Thanks.
Best regards,
Patrik
You'd echo idle to the sync_action to pause/stop the check. If you wa=
nt
to restart from the beginning next time, just echo 0 to sync_min
(similarly, if you just want to check/repair a specific range then se=
t
sync_min and sync_max before the check/repair).
Cheers,
Robin
position.
--
___
/ / ) | Little Jim says .... |
// !! | "He fallen in de water !!" |
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" i=
n
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Robin Hill
2014-10-06 13:53:14 UTC
Permalink
Post by Patrik Horník
Post by Robin Hill
Post by Patrik Horník
Hello,
is it possible to cancel RAID 6 array check? echo check >
/sys/block/mdX/md/sync_action apparently only pauses it and next check
continuing from saved position. (I guess /sys/block/mdX/md/sync_min)
- Start check from the start of the array.
- Be sure I can shutdown array without any ill effect because check
was interrupted.
I guess that position will be cleared when array is stopped and
started again, but I dont want to guess and experiment... :)
You'd echo idle to the sync_action to pause/stop the check. If you want
to restart from the beginning next time, just echo 0 to sync_min
(similarly, if you just want to check/repair a specific range then set
sync_min and sync_max before the check/repair).
OK, thanks. So that should be fully working and correct way to do it
and I cant harm my array by this in any way?
A check is always safe (well, excepting physical disk issues or issues
with overloading the I/O subsystem, but those are issues not limited to
check) as it's read-only.

The sync_min and sync_max values need to be multiples of the chunk size
(it throws an error otherwise), which ensures a whole stripe is being
checked/repaired (otherwise you could have issues).

The kernel documentation describes setting sync_min/sync_max, so it's an
expected operation. Whether there's another way of doing the same thing
I don't know - I've not heard of one though.

Cheers,
Robin
--
___
( ' } | Robin Hill <***@robinhill.me.uk> |
/ / ) | Little Jim says .... |
// !! | "He fallen in de water !!" |
Patrik Horník
2014-10-06 17:41:06 UTC
Permalink
Post by Patrik Horník
Post by Patrik Horník
Hello,
is it possible to cancel RAID 6 array check? echo check >
/sys/block/mdX/md/sync_action apparently only pauses it and next =
check
Post by Patrik Horník
Post by Patrik Horník
continuing from saved position. (I guess /sys/block/mdX/md/sync_m=
in)
Post by Patrik Horník
Post by Patrik Horník
- Start check from the start of the array.
- Be sure I can shutdown array without any ill effect because che=
ck
Post by Patrik Horník
Post by Patrik Horník
was interrupted.
I guess that position will be cleared when array is stopped and
started again, but I dont want to guess and experiment... :)
You'd echo idle to the sync_action to pause/stop the check. If you=
want
Post by Patrik Horník
to restart from the beginning next time, just echo 0 to sync_min
(similarly, if you just want to check/repair a specific range then=
set
Post by Patrik Horník
sync_min and sync_max before the check/repair).
OK, thanks. So that should be fully working and correct way to do it
and I cant harm my array by this in any way?
A check is always safe (well, excepting physical disk issues or issue=
s
with overloading the I/O subsystem, but those are issues not limited =
to
check) as it's read-only.
The sync_min and sync_max values need to be multiples of the chunk si=
ze
(it throws an error otherwise), which ensures a whole stripe is being
checked/repaired (otherwise you could have issues).
The kernel documentation describes setting sync_min/sync_max, so it's=
an
expected operation. Whether there's another way of doing the same thi=
ng
I don't know - I've not heard of one though.
If that is recommended way in kernel documentation, that is of course
all I wanted :)

BTW sync_min is reset to 0 also when you stop and start the array as I
found out...
Cheers,
Robin
--
___
/ / ) | Little Jim says .... |
// !! | "He fallen in de water !!" |
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" i=
n
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
NeilBrown
2014-10-06 20:59:44 UTC
Permalink
Post by Patrik Horník
Hello,
is it possible to cancel RAID 6 array check? echo check >
/sys/block/mdX/md/sync_action apparently only pauses it and next check
continuing from saved position. (I guess /sys/block/mdX/md/sync_min)
- Start check from the start of the array.
- Be sure I can shutdown array without any ill effect because check
was interrupted.
I guess that position will be cleared when array is stopped and
started again, but I dont want to guess and experiment... :)
Why ever not? Guessing and experimenting is AWESOME. We call it "Science".
I can understand that you might not want to experiment we real data, but
creating a few loop-back devices with "losetup", forming them into an array,
and experimenting on that can be very worthwhile.

NeilBrown
Post by Patrik Horník
Thanks.
Best regards,
Patrik
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
More majordomo info at http://vger.kernel.org/majordomo-info.html
Patrik Horník
2014-10-06 22:57:40 UTC
Permalink
Post by Patrik Horník
Hello,
is it possible to cancel RAID 6 array check? echo check >
/sys/block/mdX/md/sync_action apparently only pauses it and next che=
ck
Post by Patrik Horník
continuing from saved position. (I guess /sys/block/mdX/md/sync_min)
- Start check from the start of the array.
- Be sure I can shutdown array without any ill effect because check
was interrupted.
I guess that position will be cleared when array is stopped and
started again, but I dont want to guess and experiment... :)
Why ever not? Guessing and experimenting is AWESOME. We call it "Sc=
ience".
I can understand that you might not want to experiment we real data, =
but
creating a few loop-back devices with "losetup", forming them into an=
array,
and experimenting on that can be very worthwhile.
Yeah, I fully agree. I love guessing and experimenting. In this case I
will be guessing if you write it as it should be written and we will
then test it on your production data :) Do we have a deal?

Regarding loopback devices, I of course sometimes test it. If I am in
some potential trouble I usually go further and testing it on cow dm
snapshots over drives, because you never know if it will work on
devices in your state exactly same as on just created small loopback
devices. But maybe I cannot think about all the factors and the most
effective way to know is to ask.

Patrik
NeilBrown
Post by Patrik Horník
Thanks.
Best regards,
Patrik
--
To unsubscribe from this list: send the line "unsubscribe linux-raid=
" in
Post by Patrik Horník
More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" i=
n
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Loading...