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

Forum Discussion

ScottChapman's avatar
ScottChapman
Apprentice
Jan 09, 2015

Best way to monitor snapshot disk space?

Is there any good way to monitor how much space is being consumed by snapshots?

I am running on a NAS with somewhat limited space (using about 65% at the moment). And I have snapshots for all my shares.

However, I've been re-organizing folders deleteing files, moving files etc...

SO, it occurred to me, as I keep seeing my free space drop, that I must be holding on to space with some snapshots... Surely I can go back and start deleting them, but wanted to focus on areas where I can recover most space.

I figure there must be some mechanisms for managing snapshots and how much size they are consuming. Any leads before I go off googling and getting into trouble??

Thanks in advance!

15 Replies

Replies have been turned off for this discussion
  • StephenB's avatar
    StephenB
    Guru - Experienced User
    ScottChapman wrote:
    ...All this makes me think that snapshot management might be a useful add-on
    Totally agree. The automatic pruning that happens now is basically a fail-safe the ensures the NAS can boot, etc. It would be great if there were user-adjustable settings via an add-on (or just built in). I think setting the max age of a snapshot would be very useful, as well as being able to set a snapshot schedule.
  • StephenB wrote:
    ScottChapman wrote:
    ...All this makes me think that snapshot management might be a useful add-on
    Totally agree. The automatic pruning that happens now is basically a fail-safe the ensures the NAS can boot, etc. It would be great if there were user-adjustable settings via an add-on (or just built in). I think setting the max age of a snapshot would be very useful, as well as being able to set a snapshot schedule.

    Now that I've figured out how to figure things out (and delete snapshots) I might write some PHP to help prune mine before the automatic pruning. Let me know if you are interested and maybe I can incorporate what you want to see.

    But yea, a more official add-on would be stellar.
  • Does your PHP manage to clean up the ROS list of snapshots that is kept apart from the BtRFS structures? I ask because I have a share for which I had done some manual subvolume deletes (really to try and get rid of a massive number of unwanted snapshots, rather than clicking on them one at a time in the web UI). BtRFS happily obliged, but ROS still thinks there are hundreds of them, and won't let me blash this share into oblivion -- it "fails" to delete the snapshots. :( Not precisely the problem you were looking to solve here, I know. But if you worked out how to update that list in your PHP, that could be useful for me in this case. :D
  • mdgm-ntgr's avatar
    mdgm-ntgr
    NETGEAR Employee Retired
    btaroli you need to clean up the entries in the readynasd database using sqlite3. If you deleted them on 6.2.x or 6.3.x you may need to fix the snapper config as well.
  • I've no doubt... but this is an issue the referenced PHP script would have needed to address as well, yes? :) Hence my inquiry. :D