Daniel van Ham Colchete
2016-Apr-01 18:15 UTC
"Lost" e-mail after alternate partition offline
Hey guys! I've got a problem here and I wish you could help me. A drive failed here and went offline for some time. This was a alternate storage drive so it took a while (hours) for us to notice. There was a problem with DRBD also, so it didn't move to the redundancy, it just went offline. I was able to recover all the files there, but a few of my users still don't see their old e-mails, the ones that are supposed to be on the alternate storage.>From what I could troubleshoot here file are there, vmail user can accessthem, so it's not a permission issue, but a doveadm dump on the index file of each mail folder, won't show the e-mail at the alternate storage drive. So, they are there (at the filesystem), but they aren't (from a imap client). Is there a way to rebuild the dovecot.index file, re-adding everything back to each folder? Best, Daniel Colchete
On 01 Apr 2016, at 21:15, Daniel van Ham Colchete <daniel.colchete at gmail.com> wrote:> > Hey guys! > > I've got a problem here and I wish you could help me. A drive failed here > and went offline for some time. This was a alternate storage drive so it > took a while (hours) for us to notice. There was a problem with DRBD also, > so it didn't move to the redundancy, it just went offline.It's a good idea to keep the alt storage mountpoint directory's permissions so that Dovecot doesn't have read permissions to it unless it's mounted. That way Dovecot would just start logging errors instead of thinking that the alt storage mails are lost.> I was able to recover all the files there, but a few of my users still > don't see their old e-mails, the ones that are supposed to be on the > alternate storage. > > From what I could troubleshoot here file are there, vmail user can access > them, so it's not a permission issue, but a doveadm dump on the index file > of each mail folder, won't show the e-mail at the alternate storage drive. > > So, they are there (at the filesystem), but they aren't (from a imap > client). > > Is there a way to rebuild the dovecot.index file, re-adding everything back > to each folder?There aren't any easy ways to fix it except doveadm fore-resync.