linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Disk space accounting and subvolume delete
@ 2010-05-10 18:23 Bruce Guenter
  2010-05-10 18:50 ` Josef Bacik
  2010-05-11  0:10 ` Yan, Zheng 
  0 siblings, 2 replies; 9+ messages in thread
From: Bruce Guenter @ 2010-05-10 18:23 UTC (permalink / raw)
  To: linux-btrfs

[-- Attachment #1: Type: text/plain, Size: 989 bytes --]

Hi.

When deleting a snapshot, I have observed that the disk space used by
that snapshot is not immediately released (according to statvfs or df).
Neither "sync" nor "btrfs filesystem sync" releases the disk space
neither.  The only way I have found to actually fully release the disk
space is to issue the sync and then sleep until the statvfs free numbers
stop changing.

This is a rather problematic approach to managing disk space.  Is there
any way to either force a wait until the disk space has been released?

My application is automatically managing disk space in the presence of
snapshots.  I allow the disk (a backup) to fill up with snapshots until
it is nearly full, and then to delete snapshots until I have a threshold
free.  However, without the disk space being released promptly and no
way to wait until it is released, the loop can't tell how many snapshots
to delete.

-- 
Bruce Guenter <bruce@untroubled.org>                http://untroubled.org/

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2010-06-01  2:32 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-10 18:23 Disk space accounting and subvolume delete Bruce Guenter
2010-05-10 18:50 ` Josef Bacik
2010-05-11  0:10 ` Yan, Zheng 
2010-05-11 15:45   ` Bruce Guenter
2010-05-12  5:02     ` Yan, Zheng 
2010-05-12 21:56       ` Mike Fleetwood
2010-05-31 19:01       ` Bruce Guenter
2010-05-31 20:34         ` Mike Fedyk
2010-06-01  2:32         ` Yan, Zheng 

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).