The back story is that I installed Zimbra on my new small home server on the M.2 disk. M2 disk are fast but I want Zimbra to be on a mechanical disk (that I know how to repair if it gets broken) and M2 disk has something called "terabytes written" (TBW).
Command run as root (with default umask) if not specified otherwise.
1: Backup Zimbra and create new disk and an ext4 partition. For me it became /dev/hda1
2: Mount the new disk at a temporary mount point. I had nothing mounted on /mnt and my temporary mount point was created as /mnt/temp
Code: Select all
cd /
mount /dev/hda1 /mnt/temp
Code: Select all
zmcontrol stop
Code: Select all
ps aux | grep -i zimbra
Code: Select all
rsync -aHAWXS /opt/ /mnt/temp/
Code: Select all
cd /
mv opt opt.org
Code: Select all
mkdir opt
Code: Select all
umount /mnt/temp
mount -o noatime,dirsync /dev/sda1 /opt
Code: Select all
zmcontrol start
My UUID of /dev/hda1 is a5e05262-6d45-4a95-9dfd-0bc623e26947. You have to find your unique UUID with the command blkid. My new row in /etc/fstab
Code: Select all
UUID=a5e05262-6d45-4a95-9dfd-0bc623e26947 /opt ext4 rw,noatime,dirsync 0 0
10: As the zimbra user stop Zimbra
Code: Select all
zmcontrol stop
Code: Select all
umount /opt
mount -a
To my help was the post by milauria viewtopic.php?t=62472#p286278 and the guide https://techguides.yt/guides/how-to-par ... ntu-20-04/ (step 4. "Mount disks on Ubuntu").
//Sigtrap