Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Safety Features

Featured Replies

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.
  • 2 months later...
  • Replies 83
  • Views 36.7k
  • Created
  • Last Reply

Can i run monthly parity check when my NAS server is 'busy' , for example downloading torrents? Or should i stop them?

 

Thanks

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.
  • 1 year later...

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-

  • 4 weeks later...

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
  • 9 months later...

For schedule parity check I use the setting in Dynamix:

Settings -> (User Preferences) Scheduler

  • 4 months later...

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

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.

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.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.