September 9, 201213 yr I put the following commands in a file named monthly_parity_check.sh I'll invoke it via the "go" script every time I reboot. It will perform a scheduled parity check once a month on the 1st at midnight. My server already has a script that monitors status, so that script will e-mail me hourly status reports when the parity check progresses. (It checks the array status once an hour) Joe L. #!/bin/sh crontab -l >/tmp/crontab grep -q "/root/mdcmd check" /tmp/crontab 1>/dev/null 2>&1 if [ "$?" = "1" ] then echo "# check parity on the first of every month at midnight:" >>/tmp/crontab echo "0 0 1 * * /root/mdcmd check NOCORRECT 1>/dev/null 2>&1" >>/tmp/crontab cp /tmp/crontab /var/spool/cron/crontabs/root- crontab /tmp/crontab fi Edit: added line to copy new /tmp/crontab to file in /var/spool/cron/crontabs read by unraid management interface. That way, changes made using it will not overwrite this entry for the monthly parity check. Edit: Added NOCORRECT key-word, so that the monthly check will not correct parity, but check it. This will prevent a bad data disk drive from overwriting parity with bad parity calculations because the data read from it is inconsistent. I want to set up a monthly parity check and want to make sure I do it right. Do I just add the above commands to the go script? You can. I'm guessing not as you say you've added it to monthly_parity_check.sh Or, you can create a new file,put the commands in it, and invoke it. Either works. Can you tell me what to add to the go file and how I add to the monthly_parity_check.sh file. Where can this be found? It does not exist. You would have to create it on the flash drive, in the /boot directory and with an editor that DOES NOT put MS-DOS style carriage returns on the ends of lines. (Do not use "notepad") Also if the server is off on the first of the month does the check take place when it's next turned on e.g. the 5th of the month? No, it will not be invoked if the server is not powered on at midnight on the 1st of the month.
November 10, 201213 yr Can i run monthly parity check when my NAS server is 'busy' , for example downloading torrents? Or should i stop them? Thanks
November 10, 201213 yr Can i run monthly parity check when my NAS server is 'busy' , for example downloading torrents? Or should i stop them? Thanks does not matter. it will just take a bit longer if the disk heads have to seek a bit more when dealing with the other I/O.
January 22, 201412 yr Just checking in on this - is this script still valid in 5.0.4 when removing the following line? cp /tmp/crontab /var/spool/cron/crontabs/root-
February 13, 201412 yr Just checking in on this - is this script still valid in 5.0.4 when removing the following line? cp /tmp/crontab /var/spool/cron/crontabs/root- yes
November 20, 201411 yr For schedule parity check I use the setting in Dynamix: Settings -> (User Preferences) Scheduler
March 25, 201511 yr Hi everybody. I'm very interested on automating my Parity check (indeed I think this should come by default included with unRAID, as it is quite important). I just wonder if this same script would work with unRAID 6 beta too. Any experience? Thank you in advance
March 25, 201511 yr Hi everybody. I'm very interested on automating my Parity check (indeed I think this should come by default included with unRAID, as it is quite important). I just wonder if this same script would work with unRAID 6 beta too. Any experience? Thank you in advance You do not need the script in unRAID 6 Beta. There is an automatic scheduler in the gui that does what this script does.
March 26, 201511 yr Hi everybody. I'm very interested on automating my Parity check (indeed I think this should come by default included with unRAID, as it is quite important). I just wonder if this same script would work with unRAID 6 beta too. Any experience? Thank you in advance You do not need the script in unRAID 6 Beta. There is an automatic scheduler in the gui that does what this script does. OH!!! I FOUND IT!!! Thank you very very much!! That's perfect!!! I'm even more glad now with unRAID!!
Archived
This topic is now archived and is closed to further replies.