Schedule a data scrubbing ?

Questions pertaining to Power settings, Auto Block, Permissions, User Quotas and Email alerts may be posted here.
Forum rules
We've moved! Head over to Synology Community (community.synology.com) to meet up with our team and other Synology enthusiasts!
mnuser612
I'm New!
I'm New!
Posts: 8
Joined: Thu Dec 22, 2011 12:13 am

Schedule a data scrubbing ?

Unread post by mnuser612 » Tue Mar 05, 2013 5:44 am

I see that there's now the ability to schedule certain actions via the GUI.

There's also (finally, I've been bugging Synology forever about this) a way to initiate a data scrub via the GUI.

Sadly, I don't see a way to schedule the scrubbing on a regular basis.

As a workaround, suppose I can create a custom job that executes the UNIX commands that I have been running manually... but I was curious if anyone found a way to do this via our new and official methods which have been introduced with 4.2?

Thanks!

docchris
Knowledgeable
Knowledgeable
Posts: 394
Joined: Wed Aug 25, 2010 10:22 pm

Re: Schedule a data scrubbing ?

Unread post by docchris » Thu Mar 07, 2013 10:42 pm

How often do you think data scrubbing should be run on a volume?

mnuser612
I'm New!
I'm New!
Posts: 8
Joined: Thu Dec 22, 2011 12:13 am

Re: Schedule a data scrubbing ?

Unread post by mnuser612 » Thu Mar 07, 2013 10:47 pm

docchris wrote:How often do you think data scrubbing should be run on a volume?
I scrub monthly, and do the quick SMART test daily, and the deep SMART test once a week.

Also, this is the task I ended up scheduling to run once a month for automatic scrubbing:

Code: Select all

#!/bin/sh
/bin/echo check > /sys/block/md0/md/sync_action
/bin/echo check > /sys/block/md1/md/sync_action
/bin/echo check > /sys/block/md2/md/sync_action
Good luck.

ALE
I'm New!
I'm New!
Posts: 5
Joined: Tue Sep 18, 2012 3:12 pm

Re: Schedule a data scrubbing ?

Unread post by ALE » Thu Apr 04, 2013 11:44 am

Thank you for this script mnuser612!! Very much appreciated. Just a question, and I think it's a stupid one, but I don't know the answer.

Your script:
#!/bin/sh
/bin/echo check > /sys/block/md0/md/sync_action
/bin/echo check > /sys/block/md1/md/sync_action
/bin/echo check > /sys/block/md2/md/sync_action

Do I really need all these three lines with MD0, MD1 and MD2? I don't know what these lines do. I don't understand Linux.
Thank you,


ALE

mnuser612
I'm New!
I'm New!
Posts: 8
Joined: Thu Dec 22, 2011 12:13 am

Re: Schedule a data scrubbing ?

Unread post by mnuser612 » Thu Apr 04, 2013 4:31 pm

ALE wrote:Thank you for this script mnuser612!! Very much appreciated. Just a question, and I think it's a stupid one, but I don't know the answer.

Your script:
#!/bin/sh
/bin/echo check > /sys/block/md0/md/sync_action
/bin/echo check > /sys/block/md1/md/sync_action
/bin/echo check > /sys/block/md2/md/sync_action

Do I really need all these three lines with MD0, MD1 and MD2? I don't know what these lines do. I don't understand Linux.
Thank you,


ALE
From the ssh console, this is how I determine the mdX devices in use on my Synology:

Code: Select all

NAS> cat /proc/mdstat
Which returned this output:

Code: Select all

Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4] 
md2 : active raid5 sdb3[4] sde3[5] sdd3[3] sdc3[2] sda3[1]
      11702177024 blocks super 1.2 level 5, 64k chunk, algorithm 2 [5/5] [UUUUU]
      
md1 : active raid1 sda2[0] sdb2[1] sdc2[2] sdd2[4] sde2[3]
      2097088 blocks [5/5] [UUUUU]
      
md0 : active raid1 sda1[0] sdb1[1] sdc1[2] sdd1[3] sde1[4]
      2490176 blocks [5/5] [UUUUU]
In other words, md0, md1 and md2 are in use on my system, so I had a separate command for each one to initiate the 'scrub'.

I'm not sure how to determine this from the GUI, but maybe someone else can chime in on that. Good luck.

Also, as an aside, this monthly task did initiate correctly on my system on April 1 and ran across all three devices.

ALE
I'm New!
I'm New!
Posts: 5
Joined: Tue Sep 18, 2012 3:12 pm

Re: Schedule a data scrubbing ?

Unread post by ALE » Sat Apr 06, 2013 8:15 am

S U P E R, thank you very much for your swift reply mnuser612! Will check my system.
Thanks again,


ALE

cfuttrup
Virtuoso
Virtuoso
Posts: 1346
Joined: Fri May 09, 2008 8:01 pm
Location: Denmark
Contact:

Re: Schedule a data scrubbing ?

Unread post by cfuttrup » Sat Apr 06, 2013 10:47 am

Is commandline the only way you can run data scrubbing?

It's OK for me, I just would like to know if there's a GUI for this.

/Claus

docchris
Knowledgeable
Knowledgeable
Posts: 394
Joined: Wed Aug 25, 2010 10:22 pm

Re: Schedule a data scrubbing ?

Unread post by docchris » Sat Apr 06, 2013 10:59 am

under the "storage manager" interface you can select a volume to manage > data scrubbing

cfuttrup
Virtuoso
Virtuoso
Posts: 1346
Joined: Fri May 09, 2008 8:01 pm
Location: Denmark
Contact:

Re: Schedule a data scrubbing ?

Unread post by cfuttrup » Sat Apr 06, 2013 3:40 pm

Do I need to unmounts the volume first?

When I look in Storage Manager - First tab = Volume, I see the 4 buttons (Create, Remove, Manage and Beep Off) ... but they are all greyed out (except for Remove).

I have a DS413 running latest DSM 4.2, with 2 disks (WD RED 3 TB) in RAID1 as Volume 1.

Do you have any idea why the "Manage" button would be greyed?

/Claus

docchris
Knowledgeable
Knowledgeable
Posts: 394
Joined: Wed Aug 25, 2010 10:22 pm

Re: Schedule a data scrubbing ?

Unread post by docchris » Sat Apr 06, 2013 3:44 pm

you dont have to unmount - since you cant do that from the gui

no idea why its greyed out

i have dsm 4.2-3202 - is that the same as yours?

im also running SHR not RAID 1

cfuttrup
Virtuoso
Virtuoso
Posts: 1346
Joined: Fri May 09, 2008 8:01 pm
Location: Denmark
Contact:

Re: Schedule a data scrubbing ?

Unread post by cfuttrup » Sun Apr 07, 2013 9:32 am

Hi docchris

Thanks for your help. I decided to write a support ticket to Synology.

BTw, yes, I'm running the latest DSM = 3202.

/Claus

docchris
Knowledgeable
Knowledgeable
Posts: 394
Joined: Wed Aug 25, 2010 10:22 pm

Re: Schedule a data scrubbing ?

Unread post by docchris » Sun Apr 07, 2013 9:35 am

i can only imagine it must be related to the raid level

jinie
Trainee
Trainee
Posts: 13
Joined: Fri Apr 12, 2013 10:34 am
Location: Viborg, Denmark

Re: Schedule a data scrubbing ?

Unread post by jinie » Fri Apr 12, 2013 10:38 am

docchris wrote:i can only imagine it must be related to the raid level
On my DS210, running SHR, i don't get the option to scrub the raid.
On my DS1511, running RAID6, the option is there.

So yeah, related to raid level.

However, using the commands mentioned here will still initiate a check on any md device.
DS1511+, DS209+, DS415Play, DS415+, 2 x DS115j, DS716+

docchris
Knowledgeable
Knowledgeable
Posts: 394
Joined: Wed Aug 25, 2010 10:22 pm

Re: Schedule a data scrubbing ?

Unread post by docchris » Fri Apr 12, 2013 12:06 pm

well since i am also running SHR and do have the option, it doesn't look like it is related to the RAID level at all?

it looks more like x86 boxes can do it, and boxes running ARM style chips, cant.

cfuttrup
Virtuoso
Virtuoso
Posts: 1346
Joined: Fri May 09, 2008 8:01 pm
Location: Denmark
Contact:

Re: Schedule a data scrubbing ?

Unread post by cfuttrup » Fri Apr 12, 2013 2:03 pm

You need RAID5 or higher. Here is what Synology answered to my support ticket:
From your screenshot, I found your volume is SHR (with data protection) with 2 disk only. Actually the datascrubbing feature is doing parity check for RAID5 (or SHR with 3+ disks).
So it's no need to do parity check for your SHR volume with 2 disk since it's like RAID1 (mirror).
Data Scrubbing

Data scrubbing is a data maintenance function that inspects volumes or Disk Groups and repairs any detected data inconsistencies. This function can be used with volumes or Disk Groups that implement SHR (comprised of three or more disks), RAID 5, or RAID 6.

We recommend regularly performing data scrubbing in order to maintain data consistency and avoid losing any critical data in the event of disk failure.
To perform data scrubbing:

Select the volume or Disk Group on which to perform data scrubbing.
Click Manage
Select Data scrubbing.

Note:

Data scrubbing can only be performed when the status of the volume or Disk Group is Normal.
Please do not shut down the system before data scrubbing is completed. If the system is shut down before completion, data scrubbing must be restarted from the beginning.
/Claus

Locked

Return to “System Management”