taltamir
Lifer
Short version:
fails saying I do not have permission to perform that action. Apparently scrub is not one of the pfexec allowed actions. Any idea on how to get around it?
Long version:
I got tired of manually running scrubs and am trying to set it to happen automatically.
Seems simple enough to set up a cron job for it (once google informed me of the existance of cron 😛).
Wanting to test it out and isolate issues and such, and based on my experience I figured the best way to do so is to use a script.
Simply create a new file /usr/scripts/scrub.sh which contains:
But that doesn't work, no permissions. I verified it by trying just typing
by itself.
I could modify the script to remove pfexec instances and then I just need to schedule the script to run as an administrator. Which I don't know how to do.
Any ideas / suggestions?
Code:
pfexec zpool scrub rpool
Long version:
I got tired of manually running scrubs and am trying to set it to happen automatically.
Seems simple enough to set up a cron job for it (once google informed me of the existance of cron 😛).
Wanting to test it out and isolate issues and such, and based on my experience I figured the best way to do so is to use a script.
Simply create a new file /usr/scripts/scrub.sh which contains:
Code:
pfexec zpool scrub rpool
pfexec zpool scrub tank
But that doesn't work, no permissions. I verified it by trying just typing
Code:
pfexec zpool scrub rpool
I could modify the script to remove pfexec instances and then I just need to schedule the script to run as an administrator. Which I don't know how to do.
Any ideas / suggestions?