× NETGEAR will be terminating ReadyCLOUD service by July 1st, 2023. For more details click here.
Orbi WiFi 7 RBE973
Reply

Re: Balance/Defrag/Scrub/Snapshot Pruning: Your experience & observations, please.

btwixt
Guide

Balance/Defrag/Scrub/Snapshot Pruning: Your experience & observations, please.

I know this is not necessarily a NetGear NAS specific question but probably

more a Btrfs question, but here goes:

 

Has anyone any advice / observations about performing file operations such as

rename, move, create file/directory, delete file/directory, etc.

while these maintenance operations are running?

Any known limitations?

 

Message 1 of 3
StephenB
Guru

Re: Balance/Defrag/Scrub/Snapshot Pruning: Your experience & observations, please.

First, I'll give some info on how I use these features.

 

Snapshots:

I do find snapshots to be a great btrfs feature, but I do not recommend using Netgear's "Smart" snapshots mode.  The reason is that the monthly snapshots are never pruned out - which given enough time will fill the data volume.  So I have switched to Custom snapshots.  They are set to fixed time retention, and to only make snapshots with changes.  I use daily snapshots on all NAS (though I have thought about increasing that for the main NAS, I've never gotten around to it).

 

Most shares are set to 3 months retention - one share that has image backups is set for 2 weeks.  Those settings are enough for what I need, and keep the total snapshot space under good control.  Obviously, the retention can be adjusted to fit what you need.

 

Another aspect on snapshots - if you set "Allow Windows Access", then Windows has read/write access to the snapshots.  Since I use snapshots to recover old (and perhaps malware-corrupted) files, write access is not acceptable for me.  So I leave that off, and "Allow access to Windows Previous versions" on.

 

FWIW, some content isn't well suited to snapshots.  Live databases and torrents are two examples.  Both require a lot of file updates, and if snapshots are enabled the share becomes heavily fragmented very quickly.  So if you have content like that on the NAS, you should put them in their own shares, and disable snapshots on those shares.

 

Maintenance Functions:

There are four of these - scrub, balance, disk test, and defrag.  I schedule one each month, cycling through all four 3x a year.  FWIW, I don't see that much value in defrag, but on my systems it does no harm, so I continue to run it.  I also have chosen to stagger the schedules, so only one maintenance task is running at a time over all my NAS.

 

Though mileage here varies, when I run these tasks every 4 months, the balance and the defrag complete very quickly.  The last balance on my main NAS took 42 minutes, the last defrag took 36 minutes.  My experience with these tasks is that if they take a long time, you need to run them more frequently (so they have less work to do).

 

Scrub includes a RAID resync, which requires accessing every sector in the data volume.  So in my opinion, it also functions as a disk diagnostic.  I schedule the scrub and disk test two months apart.  Since both the scrub and the disk test require accessing every sector of all disks in the data volume, they will take a lot longer.  My primary NAS has a 4x10 TB RAID-5 data volume.  The last disk test took about 21 hours, the last scrub took about 63. 

 

Operationally I haven't noticed a big performance drop-off during the disk test, but the NAS will be somewhat slower during a scrub.

 


@btwixt wrote:

I know this is not necessarily a NetGear NAS specific question but probably

more a Btrfs question, but here goes:

 

Has anyone any advice / observations about performing file operations such as

rename, move, create file/directory, delete file/directory, etc.

while these maintenance operations are running?

Any known limitations?

 


I haven't run into any issues with simply using the NAS normally during these operations, though as I noted above the NAS is less responsive during scrubs.

 

That said, one factor is the timing.  The snapshot pruning on all my NAS happens at 11 PM, then the NAS are not in heavy use.  Backups are scheduled to start at midnight, and are almost always completed before 1 am, when the maintenance functions are scheduled to start.  As noted above, balance and defrag take less than an hour, so they are completed by 2 am. 

 

So the only two functions that regularly run when my NAS is in normal use are the disk test and the scrub.  And with my schedule, they only run for about 12 days a year.

Message 2 of 3
btwixt
Guide

Re: Balance/Defrag/Scrub/Snapshot Pruning: Your experience & observations, please.

Wow, StephenB.  That was the info I was looking for but had slight hope of receiving such detail.

Thank you so much.

 

My concern:

There are many systems on my net.

All run some sort of backup operations and all are supposed to follow a schedule.

What I find is an occasional inconsistent-with-the-schedule-I-had-planned creation date/time

on a given backup that overlaps a maintenance operation.  Seems there is always something

that delays or causes backups to be much larger, and take much longer, than expected and

consequently overlap maintenance ops.  I have probably had nearly every combination of

maintenance-operation-during-file-operations case occur over the years and have never

NOTICED any data corruption.  But then I never check every file and seldom need the backups.

 

I guess I was wondering if anyone has been able to conclusively pin any data corruption

on concurrent operations with NetGear NAS.

 

 

Message 3 of 3
Top Contributors
Discussion stats
  • 2 replies
  • 686 views
  • 2 kudos
  • 2 in conversation
Announcements