On Sat, 2012-12-15 at 08:44 +0100, Peer Heinlein wrote:
The mdbox-format with the altstorage-feature is quite nice and important.
But we're having much more then >> 30 TB of maildata and doing an fsck on huge partitions takes too much (down-) time for our mailsystem.
It would be much easier, if Dovecot would be able to use at least THREE storage-paths for his m-Files (and not just TWO like now).
People have asked for this a few times, but it's not that easy to implement (because of how altstorage code is now implemented), and I'm not really convinced that it's worth the trouble to add.
Having an altstorage1 and altstorage2, we would be able to move away all mails from on altstorage-mountpoint, we could put this storage-moungpoint into "maintenance" and do an fsck without Downtime for Dovecot.
It would be nice having a doveadm-feature to put a altstorage-path in "maintenance-mode", so to move easily away all m-files to other alt-storage-paths and to let Dovecot know not to use this locked partition.
The new "doveadm mount" stuff can handle this. If you unmount a filesystem (and maybe mounting it to another mountpoint), Dovecot will just fail all commands that attempt to access the altstorage (instead of assuming all the mails are gone and recreating the index).
I think moving from one altstorage to another would be possible with rsync:
- Mount the new storage
- cp/rsync files to new storage [3. If it takes long enough that doveadm purge/altmove is already run, rsync again.]
- Move the new storage's mountpoint over the old one (not sure if there's a way to do this atomically?)
Having even more then 3 storage-paths would be nice for huge setups: In this case we could easily use different SMALLER partitions without having just two or three huge partitions > 15 TB.
Like others mentioned, you could do this also by dividing users to multiple different partitions.