Moving Zimbra to its own filesystem: data.mdb from 1.4MB to 80GB!

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
mmerlone
Posts: 1
Joined: Wed Sep 16, 2020 2:57 pm

Moving Zimbra to its own filesystem: data.mdb from 1.4MB to 80GB!

Postby mmerlone » Wed Sep 16, 2020 3:16 pm

Hi all,

I have set a Zimbra 5.5.15 on a Ubuntu 18.04 server. Now I have to give /opt a new LVM disk and after zimbra stop and rsync to the new filesystem I got a quite confusing result, maybe someone have already seen this. Follow the space consumptions below:

The file /opt.old/zimbra/data/ldap/mdb/db/data.mdb is reported to have/consume 1.4MB AND 88GB at the same time:

Code: Select all

root@zimbra:/opt.old/zimbra/data/ldap/mdb/db# ls -la
total 1440
drwxr-xr-x 2 zimbra zimbra        4096 Sep 15 17:16 ./
drwxr-xr-x 3 zimbra zimbra        4096 Sep  4 16:42 ../
-rw------- 1 zimbra zimbra 85899345920 Sep 16 10:21 data.mdb
-rw------- 1 zimbra zimbra        8192 Sep 16 11:26 lock.mdb
root@zimbra:/opt.old/zimbra/data/ldap/mdb/db# du -ks .
1436    .
root@zimbra:/opt.old/zimbra/data/ldap/mdb/db# du -ks data.mdb
1428    data.mdb
root@zimbra:/opt.old/zimbra/data/ldap/mdb/db# du -hs data.mdb
1.4M    data.mdb
root@zimbra:/opt.old/zimbra/data/ldap/mdb/db# ls -lh data.mdb
-rw------- 1 zimbra zimbra 80G Sep 16 10:21 data.mdb
root@zimbra:/opt.old/zimbra/data/ldap/mdb/db# df -h /opt
Filesystem               Size  Used Avail Use% Mounted on
/dev/mapper/vgOpt-lvOpt   98G   88G  5.1G  95% /opt
root@zimbra:/opt.old/zimbra/data/ldap/mdb/db# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.5 LTS"
root@zimbra:/opt.old/zimbra/data/ldap/mdb/db#


Turns out that, besides those 80GB takes no space on the .OLD filesystem (/ 16GB), they were all copied to the new with full size!

Code: Select all

root@zimbra:/opt.old/zimbra/data/ldap/mdb/db# du -hs /opt/zimbra/data/ldap/mdb/db/data.mdb
81G     /opt/zimbra/data/ldap/mdb/db/data.mdb
root@zimbra:/opt.old/zimbra/data/ldap/mdb/db# df -h
Filesystem                         Size  Used Avail Use% Mounted on
udev                               3.9G     0  3.9G   0% /dev
tmpfs                              798M  2.4M  796M   1% /run
/dev/mapper/ubuntu--vg-ubuntu--lv   15G   14G  931M  94% /
tmpfs                              3.9G   96K  3.9G   1% /dev/shm
tmpfs                              5.0M     0  5.0M   0% /run/lock
tmpfs                              3.9G     0  3.9G   0% /sys/fs/cgroup
/dev/sda2                          976M  212M  698M  24% /boot
/dev/mapper/vgOpt-lvOpt             98G   88G  5.1G  95% /opt
tmpfs                              798M     0  798M   0% /run/user/999
tmpfs                              798M     0  798M   0% /run/user/1014
root@zimbra:/opt.old/zimbra/data/ldap/mdb/db#


It may be an upstream linux question, but I hope someone can help me here. Is there any suggestion on how to bring that 1.4MB file without inflating it to 88GB?

Thanks, best regards.


User avatar
L. Mark Stone
Elite member
Elite member
Posts: 2187
Joined: Wed Oct 09, 2013 11:35 am
Location: Portland, Maine, US
ZCS/ZD Version: 8.8.15 Network Edition
Contact:

Re: Moving Zimbra to its own filesystem: data.mdb from 1.4MB to 80GB!

Postby L. Mark Stone » Wed Sep 16, 2020 3:42 pm

The LDAP database is held in a Linux sparse file. You can read more about sparse files here: https://www.systutorials.com/handling-s ... -on-linux/

Certain utilities work with sparse files just fine. Many backup systems, like Veeam for example, do not, and restores the sparse file as a regular file. I've seen Veeam restores fail when /opt is on a 100GB partition like yours, and you run out of space in the middle of the restore. (I had a long conversation with a senior Veeam engineer on this topic at the 2019 AWS Summit in NYC...)

You can to dump and restore LDAP to get the sparse file back, if you whatever you have done has resulted in you using a regular file instead of a sparse file: https://wiki.zimbra.com/wiki/LDAP_data_import_export

Hope that helps,
Mark
___________________________________
L. Mark Stone
Mission Critical Email - Zimbra VAR/BSP/Training Partner https://www.missioncriticalemail.com/
Zeta Alliance http://www.zetalliance.org/

Return to “Administrators”

Who is online

Users browsing this forum: Majestic-12 [Bot] and 20 guests