Aki Tuomi
2021-May-20 10:31 UTC
Dovecot v2.3.13 reporting (very) incorrect vsize for some maildir folders
> On 20/05/2021 13:16 Eirik Rye <rye at trojka.no> wrote: > > > > On 10 May 2021, at 11:52, Timo Sirainen <timo at sirainen.com> wrote: > > > > S= is the "physical size", W= is the "virtual size". quota=count / vsize calculations should be using the W= value, not the S= value. > > > I renamed all messages containing S= and W= values in a user's mailbox (Trash) which had the incorrect quota calculation, stripping these from the filenames to ensure they were not causing incorrect calculations. > > Then, I deleted every single dovecot* file in the user's mailbox (all indexes and control files, including dovecot-uidlist): > > root at server:~# find /mail/<username>/Maildir/ -type f -name 'dovecot*' -delete > > Running `doveadm mailbox status -u <username> 'vsize' 'Trash'` -still-, even after all this, returns a vsize calculation that is off by a factor of about two: > > root at server:~# du -bs /mail/<username>/Maildir/.Trash > 7200481589 /mail/<username>/Maildir/.Trash > root at server:~# doveadm mailbox status -u <username> 'vsize' 'Trash' > Trash vsize=14584428026 > > (The user was not logged in during any of this testing) > > I am at a bit of a loss at what is causing this issue now. I have tested against 2.3.13 and 2.3.14 now. Any chance I may have hit a bug in these versions? > > It is worth mentioning that I have only encountered a small handful of users (out of about 100k) where the quota calculation is wildly incorrect. For the most part it appears to be right. > > - EirikHi! Quota will count only virtual size of mails (and not directories) and that will likely never match with du -bs, which counts for things more than just the mail contents. Aki
Eirik Rye
2021-May-20 11:08 UTC
Dovecot v2.3.13 reporting (very) incorrect vsize for some maildir folders
> On 20 May 2021, at 12:31, Aki Tuomi <aki.tuomi at open-xchange.com> wrote: > > Hi! > > Quota will count only virtual size of mails (and not directories) and that will likely never match with du -bs, which counts for things more than just the mail contents.Right, but the quota/vsize of the folder in my example is calculated by Dovecot to be ~14GB, while the real physical size of the whole directory is ~6.8GB. Dovecot thinks the folder is twice as big than it actually, physically is. :/ - Eirik