I think this has been discussed already, but I can't seen to get to the archive any more.
Is there a way to tell how much disk space overhead there is from using snapshots?
On Tue, 23 Dec 1997, Gregory Gulik wrote:
Is there a way to tell how much disk space overhead there is from using snapshots?
The df command will tell you the total amount of disk space and inodes consumed by snapshots, but I don't think you can determine the size of one particular snapshot, short of deleting it.
Gregory Gulik:
Is there a way to tell how much disk space overhead there is from using snapshots?
Brian Tao:
The df command will tell you the total amount of disk space and
inodes consumed by snapshots, but I don't think you can determine the size of one particular snapshot, short of deleting it.
The "snap list" command lists the snapshots in order, and it includes the amount of space locked down by each snapshot individually, and also the cumulative amount locked down by each snapshot along with all younger snapshots.
If two snapshots in a row lock down lots of blocks individually, but the cumulative amount doesn't change, then that means they are locking down the SAME blocks. If the cumulative does change, then that means they are locking down DIFFERENT blocks
For the oldest snapshot, you can tell how much space it'll free up by looking at the cumulative for all snapshots before it, and the cumulative for it. The difference is what will get freed up. (Does this make sense? You won't get the full amount reported for that snapshots individually, because others will be referencing many of the same blocks.)
For intermediate snapshots, you can kind of get a feel for what's going on by looking at the individual and cumulative sizes, once you get the hang of it, but there's no way to tell for sure how much space will be freed up.
It's funny. One of our concerns when we initially designed snapshots was that they would just be too complicated to manage. They really are complex and confusing. Still, we hoped that in normal practice they would work fairly intuitively, since create patterns in a large FS don't tend to change that rapidly, and when you do have a problem you can just crank back the schedule a bit.
For the most part, I think we got lucky, but sometimes when people ask questions like this, I realize how fundamentally complex snapshots really are.
Dave