- Joined
- May 26, 2011
- Messages
- 654
RESOLVED - See posts #10 and #14
Hi,
Either i am stupid or there is something wrong with the scrub schedule mechanism because i am not able to schedule it at the day/time i want. I have two pools and originally i had scrubs scheduled bi-weekly on Monday and Thursday at 3AM. It was working flawlessly until i had some maintenance to do and i had the box shut down during few days. Sadly these days were the planned days for scrubs so neither one ran as per schedule. Since then i have scrubs running automatically at the same time (not cool!) every second week. Whatever schedule i use it is simply ignoring the day/time.
The main "issue" is with the "threshold" value. Docs says:
"Threshold days - number of days since the last scrub completed before the next scrub can occur, regardless of the calendar schedule; the default is a multiple of 7 which should ensure that the scrub always occurs on the same day of the week."
Sadly the description is not very detailed about how exactly it is connected to the calendar schedule ...
Imagine it is Monday and first scrub was finished today:
- If i set the scrub to "21" and the calendar schedule is set to run in 7 days will it run next Monday or the next-next Monday (after three weeks, basically ignoring the calendar)?
- If i set the scrub to "3" and the calendar schedule is set to run in 7 days will it run in next week or in three days (again ignoring the schedule)?
It seems like the calendar schedule is ignored in both cases and the threshold is the main value which is used. If so then why do we have the calendar at the first place? It looks like only the hour/minute but not days/months are used. And second and more important question ... how (the hell) i fix/move the scheduled time to the one i want?
This is my current setup:
Threshold was originally set to 14, current 12 is just to test and understand how it actually works. Last scrub was done today. Previous one was done 7.5. for whatever reason.
I am basically out of ideas how to make it run at the day i want. Last thing i could try is to set one threshold to "16" (20.5. + 16 days => Monday 5.6.) and second one ti 17 (again 20.5. + 17 => Tuesday 6.6.). Problem is that i don't think that it will work. I *guess* that the threshold is passed as a parameter at the time when the cron job is executed so next-next scrub will actually work with that number (again messing with the schedule).
So if someone could put some light in it and explain how it actually works and how to force it to run at the specified time.
I am running FreeNAS-9.10.2-U1 (86c7ef5)
Thank you in advance
Hi,
Either i am stupid or there is something wrong with the scrub schedule mechanism because i am not able to schedule it at the day/time i want. I have two pools and originally i had scrubs scheduled bi-weekly on Monday and Thursday at 3AM. It was working flawlessly until i had some maintenance to do and i had the box shut down during few days. Sadly these days were the planned days for scrubs so neither one ran as per schedule. Since then i have scrubs running automatically at the same time (not cool!) every second week. Whatever schedule i use it is simply ignoring the day/time.
The main "issue" is with the "threshold" value. Docs says:
"Threshold days - number of days since the last scrub completed before the next scrub can occur, regardless of the calendar schedule; the default is a multiple of 7 which should ensure that the scrub always occurs on the same day of the week."
Sadly the description is not very detailed about how exactly it is connected to the calendar schedule ...
Imagine it is Monday and first scrub was finished today:
- If i set the scrub to "21" and the calendar schedule is set to run in 7 days will it run next Monday or the next-next Monday (after three weeks, basically ignoring the calendar)?
- If i set the scrub to "3" and the calendar schedule is set to run in 7 days will it run in next week or in three days (again ignoring the schedule)?
It seems like the calendar schedule is ignored in both cases and the threshold is the main value which is used. If so then why do we have the calendar at the first place? It looks like only the hour/minute but not days/months are used. And second and more important question ... how (the hell) i fix/move the scheduled time to the one i want?
This is my current setup:
Threshold was originally set to 14, current 12 is just to test and understand how it actually works. Last scrub was done today. Previous one was done 7.5. for whatever reason.
Code:
~# zpool status st0rage pool: st0rage state: ONLINE scan: scrub repaired 0 in 3h29m with 0 errors on Sat May 20 05:29:47 2017 ~# zpool status redmirror pool: redmirror state: ONLINE scan: scrub repaired 0 in 3h0m with 0 errors on Sat May 20 05:00:50 2017
I am basically out of ideas how to make it run at the day i want. Last thing i could try is to set one threshold to "16" (20.5. + 16 days => Monday 5.6.) and second one ti 17 (again 20.5. + 17 => Tuesday 6.6.). Problem is that i don't think that it will work. I *guess* that the threshold is passed as a parameter at the time when the cron job is executed so next-next scrub will actually work with that number (again messing with the schedule).
Code:
#minute hour mday month wday who command 00 02 01,02,03,04,05,06,07,15,16,17,18,19,20,21 * 2 root PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/root/bin" /usr/local/libexec/nas/scrub -t 12 redmirror 00 02 01,02,03,04,05,06,07,15,16,17,18,19,20,21 * 1 root PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/root/bin" /usr/local/libexec/nas/scrub -t 12 st0rage
So if someone could put some light in it and explain how it actually works and how to force it to run at the specified time.
I am running FreeNAS-9.10.2-U1 (86c7ef5)
Thank you in advance
Last edited by a moderator: