NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.

Forum Discussion

KenD90027's avatar
Apr 27, 2015

RN314 - want to limit number of daily snapshots kept

Hello from sunny Los Angeles, CA!
Ken here, working IT for a Wholesale business where I administer a ReadyNAS 314 with two mirrored 4TB drives.
First day in the forum here, was about to start searching for ways to limit the number of daily snapshots that are kept. With its current settings, my RN314 will continually take daily snapshots until the space is low ( I read 5% somewhere). I was looking for a way to either increase the percentage of the drive that should remain free or set a static number of daily snapshots that the RN314 should take before dropping the oldest one (maybe two weeks worth).
If anyone reading this knows that answer or knows which area of the forum to search, I'd appreciate the help. Otherwise...the search begins!
Thanks!
Ken

6 Replies

  • mdgm-ntgr's avatar
    mdgm-ntgr
    NETGEAR Employee Retired
    Yes, once free space falls below 5%, the oldest automatic snapshots will be deleted to free up some space until more than 5% is free again.

    Welcome to the forum!
  • Note also that the NAS will automatically prune snapshots - http://kb.netgear.com/app/answers/detai ... management

    Monthly snapshots are kept forever (which in my personal view is a mistake). But there aren't that many to manually delete.

    There are two downsides with using snapshots on shares with a lot of data churn. You mentioned one - if there is a lot of data churn in the share, then the space used goes up The second is that the changing files can be become fragmented. For instance, if you have an SQL database in the share that is always being updated, taking snapshots will fragment the database file. So If you have a lot of data churn on a share, you might want to turn snapshots off altogether.

    At the other extreme - if there is no churn at all in the main share, then snapshots are free. they take essentially no disk space. Similarly, if files are only added (but not renamed or deleted), snapshots are also free.

    I am thinking that if snapshots need to be deleted after two weeks, then either the isn't enough disk capacity (and you should add a third drive) or snapshots likely need to be turned off for some shares.
  • Well, it's really the CoW that's causes the "fragmentation", since a file that may have miraculously been written to contiguous blocks will no longer be once even one of its blocks is updated. But it is of course true that snapshots can't be enabled without also having CoW enabled. :)

    I didn't realize monthly snapshots were retained indefinitely. Might make me rethink using weekly instead. But that does make me curious how to adjust the retention rules, as mdgm mentioned. (Whoops! That showed up in the RSS feed but not in the web site... "This percentage can be adjusted via SSH.")
  • mdgm-ntgr's avatar
    mdgm-ntgr
    NETGEAR Employee Retired
    If CoW is disabled on a share when you take a snapshot it will do CoW at that point in time.
  • Also good to know. But it is possible to have CoW enabled without snapshots. That's the basic point I wanted to make. The block behavior is driven by CoW.
  • btaroli wrote:
    Also good to know. But it is possible to have CoW enabled without snapshots. That's the basic point I wanted to make. The block behavior is driven by CoW.
    Yes.

    -if bitrot protection is enabled and snapshots are enabled then CoW is enabled all the time
    -if bitrot protection is disabled and snapshots are enabled, then CoW is enabled before a snapshot is taken, and disabled immediately afterwords.

    In the latter case, "enabling" CoW means that the snapshot and the main share start out both pointing to the same underlying data when the snapshot is taken. If CoW were disabled, then the snapshot would start out as an independent copy. Future changes to the main share can still increase fragmentation, and will increase the amount of real disk space taken up by the snapshots.

    Either way, it is the data churn that actually causes the fragmentation. If files are not updated (but are only added/deleted/renamed or completely re-written) then CoW will not increase fragmentation.

NETGEAR Academy

Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology! 

Join Us!

ProSupport for Business

Comprehensive support plans for maximum network uptime and business peace of mind.

 

Learn More