Trace: • KVM Setup • snapraid

snapraid

← Prev  
 Next →

snapraid

I have been using snapraid since circa 2015 for my main first past redundancy. I have a second home server used as a backup server that weekly backs up using restic.

The main snapraid commands I use are: sudo snapraid sync to sync the files that have changes since last sync. I usually do this weekly, manually. sudo snapraid scrub to check the parity of the array, usually the oldest files first. I usually do this weekly, manually. sudo snapraid status to check the status of the array. I usually do this weekly, manually. sudo snapraid touch to add sub-second time granularity to the files that improves snapraid usage. I usually do this weekly, if reported as requried by status, manually. sudo snapraid smart to check the smart status of the array drives (does not report on nvme drives). I usually do this weekly, manually. Really for information only.

Snapraid allows files and directories that have been deleted since the last sync to be recovered.

  • snapraid diff –test-fmt path
  • snapraid diff –test-fmt disk This will let you know the data disk from snapraids array perspective

Snapraid does not expect you to provide the absolute file system path when fixing files.

  • snapraid fix -m This will recreate any deleted file in the entire array
  • snapraid fix -m -d d1 This will recreate any deleted file on data disk d1
  • snapraid fix -m -f Example/ This will recreate the contents of any folder named Example anywhere in the array
  • snapraid check -m -f Example/ -v If you are unsure what will happen you can replace fix with check above and add -v with this. Snapraid will then tell you that there is a problem with each of the files matching the filter or that they are ok.

The main snapraid configuration file /etc/snapraid.conf

Install Snapraid on Linux

My main server configuration files, /etc/snapraid.conf

Snapraid recover a failed disk

The Snapraid manual recover instruction explain the process. A point to remember is to be careful through the entire process to allows reference the correct device, both for the system HDD and Snapraid HDD.

My drives in my backup server were old, small in capacity and starting to report failures in 2025. Some of these drives were 9 years old with 60000+ operating hours. So I purchased 2 new WDC Red Pro 16TB drives to replace the drive in my main server and moved the older drives into the backup server. The backup server runs weekly using Restic to back-up the main server. Once set up the back-up server runs for an hour or so. In early November 2026 I was getting strange messages on one of my main server data drives and it was very slow and locking up the server. Using GSmartControl, a graphical tool to interrogate HDD smart parameters and sure enough the data disk was showing major problems, enough to merit immediate replacement. Back checking my log files showed the backup server script using Restic reported errors on the failed disk on Nov 2, but OK on 26 Oct. When I ran snapraid sync and scrub 31 Oct I did not see any errors. I notice the problems on 2 Nov, about 20 hours after the errors reported on the back-up server. The drive failed badly some time between 31 Oct and 2 Nov. I did not check the smart drive parameters since installing the new drives in Dec 2025, so I do not know if there were earlier warning of failure.

I have purchased a new WDC Red Pro 18TB drive to replace the failed 16TB unit. I purchased the 18TB drive as the 16TB drive cost more and was not readily available, also the prices have almost doubled in the past 10 - 11 months! I have started the RMA process with WDC to warranty claim on the old failed drive. I need to organise to send it back. My first time ever going through this process. I had a failed on arrival 4TB WDC Blue about 6 years ago, I forget whether I returned to WDC or the retail company now, it was a cheap unit for extra desktop gaming capacity on a old computer.

So now I am using Snapraid to rebuild the failed drive, it will be interesting to see how this goes. Fortunately the weather is not too hot so I should not be cooking the drive. That being said the current snapraid is set to stop at 50 ºC and allow the HDDs to cool down.

I need to fully check my other drives smart drive parameters to see if there are any concerns. I not that my main server NVMe drive is showing 49 media and integrity errors with Available spare down to 82% and usage at 17%.

/storage/data/pages/home_server/home_server_setup/other_services/snapraid.txt · Last modified: 2026-11-07 Sat wk45 14:27
CC Attribution-Share Alike 4.0 International Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International