[Dovecot] mdbox and doveadm purge

Morten P.D. Stevens mstevens at imt-systems.com
Sat Jul 9 20:23:06 EEST 2011


Hi,

We are currently testing Dovecot 2.0.13 with mdbox. If I delete large 
objects with refcount=0 the index is not updated apparently.

Here's an example:

[root at mail-004 storage]# ls -l
total 194776
-rw------- 1 vmail vmail  482960 Jul  9 14:58 dovecot.map.index
-rw------- 1 vmail vmail    4584 Jul  9 16:06 dovecot.map.index.log
-rw------- 1 vmail vmail   32856 Jul  9 14:50 dovecot.map.index.log.2

[root at mail-004 mdbox]# du storage/
194788  storage/

[root at mail-004 mdbox]# doveadm dump 
/var/vmail/example.org/user/mdbox/storage/ | grep 'ref.*\b0\b'
  - ext 3 ref       :          0 (0000)
  - ext 3 ref       :          0 (0000)
  - ext 3 ref       :          0 (0000)
  - ext 3 ref       :          0 (0000)
  - ext 3 ref       :          0 (0000)
  - ext 3 ref       :          0 (0000)
  - ext 3 ref       :          0 (0000)
  - ext 3 ref       :          0 (0000)

[root at mail-004 mdbox]# doveadm purge -A
[root at mail-004 mdbox]# du storage/
142072  storage/

[root at mail-004 mdbox]# doveadm dump 
/var/vmail/example.org/user/mdbox/storage/ | grep 'ref.*\b0\b'
  - ext 3 ref       :          0 (0000)
  - ext 3 ref       :          0 (0000)
  - ext 3 ref       :          0 (0000)
  - ext 3 ref       :          0 (0000)
  - ext 3 ref       :          0 (0000)
  - ext 3 ref       :          0 (0000)
  - ext 3 ref       :          0 (0000)
  - ext 3 ref       :          0 (0000)

[root at mail-004 mdbox]# cd storage/
[root at mail-004 storage]# ls -l
total 142060
-rw------- 1 vmail vmail  482960 Jul  9 14:58 dovecot.map.index
-rw------- 1 vmail vmail    4584 Jul  9 16:06 dovecot.map.index.log
-rw------- 1 vmail vmail   32856 Jul  9 14:50 dovecot.map.index.log.2

[root at mail-004 mdbox]# doveadm purge -A
[root at mail-004 mdbox]# cd storage/
[root at mail-004 storage]# ls -l
total 142060
-rw------- 1 vmail vmail  482960 Jul  9 14:58 dovecot.map.index
-rw------- 1 vmail vmail    4936 Jul  9 16:12 dovecot.map.index.log
-rw------- 1 vmail vmail   32856 Jul  9 14:50 dovecot.map.index.log.2

[root at mail-004 storage]# doveadm dump 
/var/vmail/example.org/user/mdbox/storage/ | grep 'ref.*\b0\b'
[root at mail-004 storage]#

The index is updated only after the second run of doveadm purge -A ?

Best regards,

Morten


More information about the dovecot mailing list