All of lore.kernel.org
 help / color / mirror / Atom feed
* Cancelling not pausing array check
@ 2014-10-06 13:29 Patrik Horník
  2014-10-06 13:36 ` Robin Hill
  2014-10-06 20:59 ` NeilBrown
  0 siblings, 2 replies; 7+ messages in thread
From: Patrik Horník @ 2014-10-06 13:29 UTC (permalink / raw)
  To: Neil Brown; +Cc: linux-raid

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

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

* Re: Cancelling not pausing array check
  2014-10-06 13:29 Cancelling not pausing array check Patrik Horník
@ 2014-10-06 13:36 ` Robin Hill
  2014-10-06 13:39   ` Patrik Horník
  2014-10-06 20:59 ` NeilBrown
  1 sibling, 1 reply; 7+ messages in thread
From: Robin Hill @ 2014-10-06 13:36 UTC (permalink / raw)
  To: Patrik Horník; +Cc: Neil Brown, linux-raid

[-- Attachment #1: Type: text/plain, Size: 1174 bytes --]

On Mon Oct 06, 2014 at 03:29:13PM +0200, Patrik Horník wrote:

> 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

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        <robin@robinhill.me.uk> |
   / / )      | Little Jim says ....                            |
  // !!       |      "He fallen in de water !!"                 |

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

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

* Re: Cancelling not pausing array check
  2014-10-06 13:36 ` Robin Hill
@ 2014-10-06 13:39   ` Patrik Horník
  2014-10-06 13:53     ` Robin Hill
  0 siblings, 1 reply; 7+ messages in thread
From: Patrik Horník @ 2014-10-06 13:39 UTC (permalink / raw)
  To: Patrik Horník, Neil Brown, linux-raid

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?


2014-10-06 15:36 GMT+02:00 Robin Hill <robin@robinhill.me.uk>:
> On Mon Oct 06, 2014 at 03:29:13PM +0200, Patrik Horník wrote:
>
>> 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
>
> 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        <robin@robinhill.me.uk> |
>    / / )      | Little Jim says ....                            |
>   // !!       |      "He fallen in de water !!"                 |
--
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] 7+ messages in thread

* Re: Cancelling not pausing array check
  2014-10-06 13:39   ` Patrik Horník
@ 2014-10-06 13:53     ` Robin Hill
  2014-10-06 17:41       ` Patrik Horník
  0 siblings, 1 reply; 7+ messages in thread
From: Robin Hill @ 2014-10-06 13:53 UTC (permalink / raw)
  To: Patrik Horník; +Cc: Neil Brown, linux-raid

[-- Attachment #1: Type: text/plain, Size: 2009 bytes --]

On Mon Oct 06, 2014 at 03:39:12PM +0200, Patrik Horník wrote:

> 2014-10-06 15:36 GMT+02:00 Robin Hill <robin@robinhill.me.uk>:
> > On Mon Oct 06, 2014 at 03:29:13PM +0200, Patrik Horník wrote:
> >
> >> 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... :)
> >>
> >
> > 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        <robin@robinhill.me.uk> |
   / / )      | Little Jim says ....                            |
  // !!       |      "He fallen in de water !!"                 |

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

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

* Re: Cancelling not pausing array check
  2014-10-06 13:53     ` Robin Hill
@ 2014-10-06 17:41       ` Patrik Horník
  0 siblings, 0 replies; 7+ messages in thread
From: Patrik Horník @ 2014-10-06 17:41 UTC (permalink / raw)
  To: Patrik Horník, Neil Brown, linux-raid

2014-10-06 15:53 GMT+02:00 Robin Hill <robin@robinhill.me.uk>:
> On Mon Oct 06, 2014 at 03:39:12PM +0200, Patrik Horník wrote:
>
>> 2014-10-06 15:36 GMT+02:00 Robin Hill <robin@robinhill.me.uk>:
>> > On Mon Oct 06, 2014 at 03:29:13PM +0200, Patrik Horník wrote:
>> >
>> >> 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... :)
>> >>
>> >
>> > 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.

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
> --
>      ___
>     ( ' }     |       Robin Hill        <robin@robinhill.me.uk> |
>    / / )      | Little Jim says ....                            |
>   // !!       |      "He fallen in de water !!"                 |
--
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] 7+ messages in thread

* Re: Cancelling not pausing array check
  2014-10-06 13:29 Cancelling not pausing array check Patrik Horník
  2014-10-06 13:36 ` Robin Hill
@ 2014-10-06 20:59 ` NeilBrown
  2014-10-06 22:57   ` Patrik Horník
  1 sibling, 1 reply; 7+ messages in thread
From: NeilBrown @ 2014-10-06 20:59 UTC (permalink / raw)
  To: Patrik Horník; +Cc: linux-raid

[-- Attachment #1: Type: text/plain, Size: 1171 bytes --]

On Mon, 6 Oct 2014 15:29:13 +0200 Patrik Horník <patrik@dsl.sk> wrote:

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

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


> 
> Thanks.
> 
> Best regards,
> 
> Patrik
> --
> 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


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

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

* Re: Cancelling not pausing array check
  2014-10-06 20:59 ` NeilBrown
@ 2014-10-06 22:57   ` Patrik Horník
  0 siblings, 0 replies; 7+ messages in thread
From: Patrik Horník @ 2014-10-06 22:57 UTC (permalink / raw)
  To: NeilBrown; +Cc: linux-raid

2014-10-06 22:59 GMT+02:00 NeilBrown <neilb@suse.de>:
> On Mon, 6 Oct 2014 15:29:13 +0200 Patrik Horník <patrik@dsl.sk> wrote:
>
>> 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... :)
>
> 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.

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
>
>
>>
>> Thanks.
>>
>> Best regards,
>>
>> Patrik
>> --
>> 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
>
--
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] 7+ messages in thread

end of thread, other threads:[~2014-10-06 22:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-06 13:29 Cancelling not pausing array check Patrik Horník
2014-10-06 13:36 ` Robin Hill
2014-10-06 13:39   ` Patrik Horník
2014-10-06 13:53     ` Robin Hill
2014-10-06 17:41       ` Patrik Horník
2014-10-06 20:59 ` NeilBrown
2014-10-06 22:57   ` Patrik Horník

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.