Setup ceph for storage mailserver?
I have read some article but none of them tell how to use ceph for mail server will be like.
The most close to it: https://www.7layer.org/?p=313, but it was glusterFS
So is there any different when I'm using cephFS as a storage pool and make a soft-link from the storage pool to the actual path of mail storage?
Is it cephfs store email data as object-storage or file-storage
quanlm@ceph1:~$ df -h
Filesystem Size Used Avail Use% Mounted on
udev 302M 0 302M 0% /dev
tmpfs 63M 7.9M 55M 13% /run
/dev/sda1 12G 2.1G 9.8G 18% /
tmpfs 311M 0 311M 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 311M 0 311M 0% /sys/fs/cgroup
tmpfs 63M 0 63M 0% /run/user/1001
ceph-fuse 2.5G 48M 2.5G 2% /mnt/mycephfs
quanlm@ceph1:~$ cd /mnt/mycephfs/
quanlm@ceph1:/mnt/mycephfs$ ls
1111 123 ceph-deploy-ceph.log mail Maildir test1.img
quanlm@ceph1:/mnt/mycephfs$ cd ~
quanlm@ceph1:~$ ll -h
total 100K
drwxr-xr-x 7 quanlm quanlm 4.0K Oct 31 07:16 ./
drwxr-xr-x 5 root root 4.0K Oct 30 08:57 ../
-rw------- 1 quanlm quanlm 20K Oct 31 05:53 .bash_history
-rw-r--r-- 1 quanlm quanlm 220 Oct 29 04:41 .bash_logout
-rw-r--r-- 1 quanlm quanlm 3.8K Oct 29 05:08 .bashrc
drwxrwxr-x 3 quanlm quanlm 4.0K Oct 31 02:00 .byobu/
drwx------ 3 quanlm quanlm 4.0K Oct 29 07:25 .cache/
-rw-rw-r-- 1 quanlm quanlm 20K Oct 31 04:37 ceph-deploy-ceph.log
-rw-rw-r-- 1 quanlm quanlm 1.1K Oct 29 05:49 .cephdeploy.conf
drwxrwxr-x 2 quanlm quanlm 4.0K Oct 31 04:45 cluster/
drwxrwxr-x 10 quanlm quanlm 4.0K Oct 31 07:25 dovecot-ceph-plugin/
lrwxrwxrwx 1 quanlm quanlm 19 Oct 30 08:42 mail -> /mnt/mycephfs/mail//
lrwxrwxrwx 1 quanlm quanlm 22 Oct 30 07:33 Maildir -> /mnt/mycephfs/Maildir//
-rw-r--r-- 1 quanlm quanlm 655 Oct 29 04:41 .profile
-rw------- 1 root root 1.0K Oct 30 07:57 .rnd
drwx------ 2 quanlm quanlm 4.0K Oct 31 03:58 .ssh/
-rw------- 1 root root 5.4K Oct 31 04:45 .viminfo
-rw-rw-r-- 1 quanlm quanlm 174 Oct 31 03:59 .wget-hsts
P/s: Postfix, dovecot and squirrelmail installation from this guide: https://www.ionos.com/community/email-office/email/set-up-a-postfix-mail-server-with-dovecot-and-squirrelmail-on-ubuntu-1604/
P/SS: The system is work just fine but in this way, I only create a link for each user manually, like a user quan didn't on the soft-link so on the others server don't have it mail data storage
Solution 1:
CephFS for mail storage works.
You will have to do just some tunning. In our case, we decreased: bluestore_min_alloc_size_hdd and of course enabled compression. If you store your emails on SSDs, the option is bluestore_min_alloc_size_ssd and should be already low enough.
However, we still have a small setup with 240GB of emails and slowly grwoing.