1 (edited by xof 2025-01-15 19:28:34)

Topic: Move mail store

I need to move the mail store to block storage. Is this still the current procedure to execute?

Steps:

- Stop Postfix + Dovecot + Nginx services. make sure no access to all mailboxes.
- Move /var/vmail/vmail1 to HDD disk. Also make sure all files / directories are owned by "vmail:vmail" with permission 0700.
- Create a symbol link of moved vmail1 folder back to /var/vmail/vmail1.
- Start Postfix + Dovecot + Nginx services.

For example, let's say you want to move all mailboxes to /mnt/hdd which is a partition on HDD disk:

systemctl stop postfix dovecot nginx
mv /var/vmail/vmail1 /mnt/hdd
ln -sf /mnt/hdd/vmail1 /var/vmail/vmail1
systemctl start dovecot postfix nginx

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2 (edited by chris.23lo 2025-01-15 21:38:09)

Re: Move mail store

i have an idea.

It could work but didn't have that situation in my iredmail server for reason with storage migration.
In my old times with HP Unix LVM and AIX LVM, always did the *online migration* by add the new PV to the VG and make a mirror sync with command ensuring the mirror copy is completely resided in the new PV. (oh....lvm ...zfs are decade old stuff in HP/AIX/Solaris)

Then you can reduce the mirror copy from the old PV.

I did look at Linux, it has LVM support for many years and lvconvert seems to be the command.
In that case, no downtime is needed. But anyone must recommend a backup and a working restore procedure...

And yes, do what you know and can handle....study the steps, know the limitaton and possiblity of what hard corner will be facing...testing....etc.

Migrating to a different server is much harder...IMHO.

3

Re: Move mail store

xof wrote:

Is this still the current procedure to execute?

Yes.

4

Re: Move mail store

Confirmed. Still works like a charm!