NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
ScottChapman
Jan 09, 2015Apprentice
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!
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
- mdgm-ntgrNETGEAR Employee RetiredYou could start by deleting the oldest snapshot for each share.
I don't think there is an easy way to monitor this.
Generally I recommend being selective as to which shares to use snapshots with, but it does depend on the use case, how diligently you backup, what you use the shares for, how important the data in the shares is etc. - StephenBGuru - Experienced UserFrom what I've read, you need to enable the btrfs quota features to even see the actual on-disk space used by any share (snapshots or the main folder). CoW makes it rather messy in general, since the the data blocks are referenced in multiple folders (and in the general case this is not neatly structured like it is on the NAS).
In cases where a block is multiply referenced, the file system needs to decide which folder it actually belongs to - an arbitrary decision at that level if you think about it. - ScottChapmanApprentice
- StephenBGuru - Experienced UserNote it begins with
With quota and qgroups... we can now see how big each of those snapshots are, including exclusive usage.
So it turns on whether the quota features are stable enough to deploy in production environments yet. Not sure on the answer, but I do think Netgear would need to kick the tires a bit before turning them on. - ScottChapmanApprenticeYea, would be good to get the pros to look at it. But might be worth trying? I assume enabling/disabling those two features would do any *harm* ?
- ScottChapmanApprenticeAnyone have a test system they would be willing to try the simple example on that website?
- StephenBGuru - Experienced User
Seems unlikely that enabling the features would hurt unless you actually tried to set a quota. But there could be some risks I guess.ScottChapman wrote: Yea, would be good to get the pros to look at it. But might be worth trying? I assume enabling/disabling those two features would do any *harm* ? - ScottChapmanApprenticeIn usual fashion I jumped right in!
So, what I am not real clear on are what subvolumes exist on my NAS. I was assuming that /data is a subvolume and that all shares are subvolmes (in order to do snapshots independently). That basically right?
When I turned on for one of my shares (btrfs quota enable /data/Media) I was expecting the command to show the usage to basically show me the snapshots for the subvolume /data/media. Instead it looks like it showed me all of them.
Am I misunderstanding the subvolume structure on the NAS? Anyone else want to try to figure this out? It actually looks really useful. Might have to write some PHP this weekend to generate reports. - StephenBGuru - Experienced User/data is a volume, the shares are subvolumes. You can see the full subvolume list with "btrfs subvolume list /data"
- ScottChapmanApprentice
StephenB wrote: /data is a volume, the shares are subvolumes. You can see the full subvolume list with "btrfs subvolume list /data"
Yea ok. It looks like snapshots are also considered subvolumes?
I was able to get my script working last night (in case anyone is interested). Basically it gives you a report of which snapshots have the most exclusive storage.
Turns out though this is not quite as useful as I was imagining... Basically if you store 500G in a share, make two snapshots, and then delete the 500G that 500G is really shared between the two snapshots. So, it figuring out how much exclusive storage is held by a snapshot might not be very useful when lots of snapshots are being taken.
Anyone got something to help remove snapshots (aside from using the frontend?)
All this makes me think that snapshot management might be a useful add-on
Related Content
NETGEAR Academy
Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!