Re: total space = (used quota) + (to be expunged)?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Feb 6, 2012, at 09:58 PM, Andre Felipe Machado wrote:
> Hello
> After reading some archived list msg [1], and database formats doc
> (quotas 
> topic)[2], I realized that there is not a "high level" cyrus command to
> display 
> total disk/partition space actually used at a Cyrus imap backend.

That's correct, we don't track that information, because doing it
properly would be hard.  We could track the size of messages in
expunged-but-not-unlinked state and accumulate them for display,
but accounting for the space used by database backends would be
quite hard.

> In order to get exact (approximated when single instance store is
> enabled) to be 
> expunged messages space should a du / df be used ?
> 
> df_used_blocks - used_quota = space_to_be_expunged

Sure.

> Is there a better approach (more exact, faster, lower system load)?

Sadly, no.

> What is the correct way to account for the single instance store effect?
> df or du -L ?
> (du -L)-(du)?

I'm confused why you would want to use du -L.  The -L follows symlinks; Cyrus doesn't use symlinks internally at all (except for sieve scripts).  The "singleinstancestore" option is implemented using hardlinks, and du already accounts for those properly assuming you include all the links in the file trees seen by du.

> At big partitions (with millions of messages) du may cause a high disk
> load...
> Suggestions?

Only the obvious: you could use df, and not have anything else
but Cyrus data on the partition.  This works for us :)

-- 
Greg.
----
Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/


[Index of Archives]     [Cyrus SASL]     [Squirrel Mail]     [Asterisk PBX]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [KDE]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux