Australian cloud for business software — built and run in Sydney since 2002

NetLeverage
NetLeverage

Synology checksum mismatch errors on a Btrfs volume: find the files, test the memory, restore from backup

Technical article
Troubleshooting

About this article: This article is reviewed against the cited sources. This is source research, not lab validation. Check the stated versions and your own requirements before making changes.

A Synology NAS that sends "a notification regarding checksum mismatch errors" has found data on a Btrfs volume that no longer matches the checksum stored for it. Btrfs can repair such damage by itself. The notification means that for these files it could not, and Synology's page says what that costs: the data will be inaccessible unless a backup exists.

The sections below show how to find the files, how to check the usual hardware suspects without changing anything, and how to restore from a backup with a warning before each change. Nothing before the Fix section changes anything.

What the error means

Synology's page gives the symptom as "You received a notification regarding checksum mismatch errors." Its note says "To find out which files are affected, check the logs in Log Center > Logs." The diagnosis is one line: "The Btrfs file system cannot repair the damaged data."

Synology says the file system "uses checksums to ensure data integrity" and can "automatically detect corrupted data (i.e., silent data corruption) and rely on its self-healing technology to recover corrupted data." A notification means detection worked and recovery did not.

Synology states the consequence: "If the Btrfs file system fails to restore the corrupted data, the data will be inaccessible. You can only recover the data if you have backed them up to an offsite location before data corruption occurs."

One more point from the same page matters for the restore plan: "If data are already corrupted, you might not be able to restore the data via an onsite backup solution (e.g., Snapshot Replication or Synology Drive) because the backed up or synchronized data may also be corrupted."

Likely causes

Synology's page says a checksum mismatch error "is caused by many factors, such as defective drives, faulty memory modules, or non-Synology memory module installation." Synology's page on file system errors adds that other factors, "such as faulty memory modules and improper system shutdown, may also result in file system corruption."

Cause Where to look
Defective drive Drive status and drive logs; Synology's drive-errors page says to check Log Center > Logs with the Drives log type on DSM 7.2 or above
Faulty memory module Synology's memory test
Non-Synology memory module Check what is installed; Synology says other unexpected system errors may occur when a module that is not compatible with the product model is used
Improper system shutdown "Improper shutdown" notifications; Synology lists power outages, loose power cords, a failing power supply and abnormal memory modules as causes

Prove the cause before changing anything

All of these steps only read.

  1. List the affected files. Open Log Center and go to Logs. Synology says the logs show which files have checksum mismatch errors. Write down each path and the time it was logged.

  2. Check whether the volume is a Btrfs volume with file self-healing available. Synology's self-healing page says the feature is only available for shared folders on a Btrfs volume with RAID 1, RAID 5, RAID 6, RAID TP, RAID 10, RAID F1, or Synology Hybrid RAID with more than one drive. It is not available during a repair or parity consistency check of a volume or storage pool, on a degraded volume, or for data stored on VDSM or VMM. Files on iSCSI LUNs created on a Btrfs volume are not protected by it.

  3. Check whether the shared folder was created with data checksums. Go to Control Panel > Shared Folder, select a shared folder and click Edit > Advanced. Synology says this shows whether "Enable data checksum for advanced data integrity" was ticked, and that the option can no longer be changed after the shared folder has been created. Close the window without saving.

  4. Read the drive logs. On DSM 7.2 or above, Log Center > Logs with the Drives log type; on DSM 7.1 or below, Storage Manager > HDD/SSD > Logs. Synology's drive-errors page lists "I/O errors, drive plugged in, or drive plugged out" entries without manual intervention as symptoms of an unstable connection between drive and system.

  5. Check what memory is installed. Note any module that is not from Synology.

  6. Look for "Improper shutdown" notifications in the same period.

  7. Find the backups. List which backups of the affected files exist, where they are stored, and whether any is offsite and older than the first log entry. Synology's page counts only an offsite copy made before the damage.

The first step gives the list of files to recover. The others look for the causes Synology names.

Fix

Restore the affected files from an offsite backup

Write down the path of each affected file from Log Center, the time, and which backup version you intend to restore from.

Risk: the next step writes restored files onto the NAS. Synology says "The files on your Synology NAS will be overwritten by the restored version if the two file paths conflict." An overwrite cannot be undone. Synology counts only an offsite backup made before the corruption occurred, and says onsite copies "may also be corrupted". Our own reading: the first log entry is the earliest time you can see.

The steps below are Synology's Hyper Backup restore steps. They apply only if your offsite backup is a Hyper Backup task; Synology's page does not say the offsite copy is Hyper Backup.

Synology's restore page for Hyper Backup says to go to Hyper Backup and, in the left panel, click Data. Select the backup task to restore, select the version of system configurations to restore, select the desired folders and version to restore, select the packages to restore if any, confirm the restoration summary and click Apply. The password or encryption key is required if the backup task is encrypted.

To undo it: an overwrite cannot be reversed. The damaged file is replaced by the restored version, so check the version before you click Apply.

Run a memory test

Synology's memory test page says to run a memory test to ensure the memory (onboard memory and memory modules) is working properly, and recommends running it three times. Write down the time and whether the Memory Test checkbox in Synology Assistant is already ticked, and tell everyone who uses the NAS that it will be unavailable.

Disruptive step: the next step reboots the NAS and makes it unavailable while the test runs. Synology says to reserve 1 to 1.5 hours for models with 16 GB or less memory and 1.5 to 3 hours for models with 32 GB or more. At least one built-in LAN port must be connected to a network, and Synology Assistant must stay open.

Download and install Synology Assistant from the Download Center, launch it and click the upper-right icon. Tick the Memory Test checkbox and click OK. Select the NAS, make sure its status is Ready, click the Memory Test button and follow the wizard. The status shows "Performing memory test (x%)". If the NAS passes, the status returns to Ready. If it fails, the screen shows "One or more errors have been found by the memory diagnostic test", and Synology notes that the status will still show Ready even then. In that case Synology strongly recommends returning the NAS for repair if it is still within the warranty period.

To undo it: wait for the test to finish. If the Memory Test checkbox was not ticked before, untick it again in the same Synology Assistant settings.

Other changes Synology describes

Synology's page says to avoid using non-Synology memory modules, and that if they are already installed in the NAS they should be removed to prevent further data loss. Removing a module means powering the NAS off and changing a part; have the hardware administrator handle it. Synology recommends data scrubbing regularly to ensure data integrity and to back up the NAS periodically. Synology's file system errors page gives the example of running data scrubbing once every three months, during off-peak hours, and says the process may take from several minutes to several hours depending on the size and usage of the volume. Its volume-crash prevention page recommends twice a year. The file system errors page refers to Synology's data scrubbing help article for the steps.

Confirm the fix

  • The restored files open and match the version you meant to restore.
  • Log Center > Logs shows no new checksum mismatch entries for those files.
  • The memory test finished with the status Ready and no "One or more errors have been found by the memory diagnostic test" message.
  • No new "Improper shutdown" or drive I/O error entries appear.

What to watch afterwards

  • New checksum mismatch notifications, and the files they list in Log Center > Logs.
  • Drive logs and drive status, because a failing drive is one of the causes Synology names.
  • Scrubbing and backups. Synology recommends regular data scrubbing and periodic backups, and an offsite copy is the only one it counts for this fault.
  • Whether new shared folders are created with data checksums on. Synology's self-healing page says the option can only be set when the folder is created.

Risks and limits

Synology says that without a backup made offsite before the damage, the affected data cannot be recovered; no step here changes that. Onsite copies such as Snapshot Replication or Synology Drive may hold the same corruption. A memory test makes the NAS unavailable for hours, so schedule it. The restore step overwrites files that share a path. Self-healing covers only the shared folders and RAID types listed above, so a volume outside them has nothing to repair the data automatically.

Sources