Synology Data & RAID Scrubbing

  • Post author:WunderTech
  • Post published:April 30, 2024
  • Post last modified:May 10, 2024
  • Post category:Synology
  • Reading time:5 mins read

Share what you're reading!

When you purchase a Synology NAS and configure it using best practices, a few of the options generally suggested are Btrfs volumes and some sort of RAID type (SHR, RAID 5, 6, etc). These are extremely important options and there’s a lot of confusion over them, so I wanted to take some time to explain them in this post. This video also goes over the entire process.

How Data and RAID Scrubbing Works on a Synology NAS

When you configure a Synology NAS using Btrfs, there’s a shared folder setting that determines if a checksum is stored or not called Enable Data Checksum for Advanced Data Integrity.

Enable Data Checksum for Advanced Data Integrity for data scrubbing on synology nas

When this option is selected on the shared folder, a checksum is written to metadata when a file is stored. This signifies that the file is in its best state, and the checksum stored should always match this. If you don’t configure this option when the shared folder is stored, it cannot be added at a later time. A new shared folder must be created and the data must be moved in order for the checksum to be stored.

option cannot be enabled.

These checksums are used for the data scrubbing process. When data scrubbing runs, it will go one by one and validate the checksum for each file. If the checksum matches, it moves on to the next file.

checksum validation

If it doesn’t match, it will attempt to repair it using RAID Scrubbing. In order for RAID scrubbing to work, you must be using SHR (with at least 3 drives), RAID 5, RAID 6, or RAID F1. If you’re not using one of these options, the data scrubbing process can run and validate that the checksum does or does not match (assuming you’re using Btrfs), but it cannot repair the file. This is the confusing part for most, as they think that running it means that it works, and it does mean that the files will be validated, but it does not mean that the files will be repaired.

Exact Order to Configure Data Scrubbing on a Synology NAS

Now that we know how this works, this is the exact order to configure data scrubbing on a Synology NAS for it to actually work (and by that, I mean fix files if needed).

  1. Configure a storage pool using SHR with at least 3 disks, RAID 5, RAID 6, or RAID F1.
  2. Configure a volume using Btrfs.
  3. Create a shared folder and ensure the Enable Data Checksum for Advanced Data Integrity is selected.
  4. Configure data scrubbing on the storage pool by accessing the storage manager, selecting the storage pool, then Schedule Data Scrubbing. Select the storage pool you’d like this to run on, a frequency (normally quarterly or bi-annually), and then save.
data scrubbing scheduling

Assuming the exact order above was selected, when data scrubbing runs, it will validate the checksum and if it doesn’t match, it will use RAID scrubbing to repair the file.