Re: Dovecot v2.3.13 reporting (very) incorrect vsize for some maildir folders

2021-05-21 Thread Eirik Rye
On 05/22/2021 12:20 AM, Joseph Tam wrote: You'll note the ratio between then is almost exactly 2.  Some utilities report space usage in 512-byte block, some in K.  I would hazard a guess that 'ls -s' is reporting in blocks, not K. No, that is just a coincidence. The actual issue was duplicate

Re: Dovecot v2.3.13 reporting (very) incorrect vsize for some maildir folders

2021-05-21 Thread Joseph Tam
On Thu, 20 May 2021, Eirik Rye wrote: I noticed that `ls -s` reported a completely different size to `du`, but similar to what dovecot reports: # ls -s | head -1 total 14099016 # du 7050436 . I assume there are some sparseness or block size related shenanigans going on here instead, causing d

Re: Dovecot v2.3.13 reporting (very) incorrect vsize for some maildir folders

2021-05-20 Thread Eirik Rye
> On 20 May 2021, at 15:18, Eirik Rye wrote: > > I assume there are some sparseness or block size related shenanigans going on > here instead, causing differences in reported physical usage by `du` (syscall > `newfstatat()`) compared to `ls` (syscall `lstat()`) and dovecot. > > The filesyst

Re: Dovecot v2.3.13 reporting (very) incorrect vsize for some maildir folders

2021-05-20 Thread Eirik Rye
> On 20 May 2021, at 14:59, Timo Sirainen wrote: > > Well, next step could be to compare individual mail sizes. It would require > writing some kind of a script to do the comparison though. Hello again, Apologies, I think dovecot is innocent in all of this. I noticed that `ls -s` reported a

Re: Dovecot v2.3.13 reporting (very) incorrect vsize for some maildir folders

2021-05-20 Thread Timo Sirainen
On 20. May 2021, at 14.12, Eirik Rye wrote: > > >> On 20 May 2021, at 13:44, Timo Sirainen wrote: >> >> You can also look at the folder-level vsizes to see which one is causing the >> differences (or are they all doubled?) > > In this user's case, it is only the Trash-folder that has the wro

Re: Dovecot v2.3.13 reporting (very) incorrect vsize for some maildir folders

2021-05-20 Thread Eirik Rye
> On 20 May 2021, at 13:44, Timo Sirainen wrote: > > You can also look at the folder-level vsizes to see which one is causing the > differences (or are they all doubled?) In this user's case, it is only the Trash-folder that has the wrong vsize calculation: # doveadm mailbox status -u 'mes

Re: Dovecot v2.3.13 reporting (very) incorrect vsize for some maildir folders

2021-05-20 Thread Timo Sirainen
On 20. May 2021, at 13.08, Eirik Rye wrote: > > > >> On 20 May 2021, at 12:31, Aki Tuomi 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. >

Re: Dovecot v2.3.13 reporting (very) incorrect vsize for some maildir folders

2021-05-20 Thread Eirik Rye
> On 20 May 2021, at 12:31, Aki Tuomi 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 c

Re: Dovecot v2.3.13 reporting (very) incorrect vsize for some maildir folders

2021-05-20 Thread Aki Tuomi
> On 20/05/2021 13:16 Eirik Rye wrote: > > > > On 10 May 2021, at 11:52, Timo Sirainen 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

Re: Dovecot v2.3.13 reporting (very) incorrect vsize for some maildir folders

2021-05-20 Thread Eirik Rye
> On 10 May 2021, at 11:52, Timo Sirainen 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 incorrec

Re: Dovecot v2.3.13 reporting (very) incorrect vsize for some maildir folders

2021-05-10 Thread Timo Sirainen
On 5. May 2021, at 15.42, Eirik Rye wrote: > > Afterwards, for a couple users, we received reports that mail delivery had > failed because they were over quota. When looking into it for a specific > user, we noticed that the vsize reported for a particular folder (with 47k > messages) was repo

Dovecot v2.3.13 reporting (very) incorrect vsize for some maildir folders

2021-05-05 Thread Eirik Rye
Hello! Dovecot v2.3.13. Full, but anonymized, `doveconf -n` attached. We are in the process of migrating maildir-backed users from filesystem quotes, to using dovecot's "count" quota backend. This is not reflected in the doveconf output because we're overriding `quota`, `quota_rule` and `quota