zimbra mirroring on secondary harddisk

follow all the steps of Zimbra installations use the same package of the primary one.

like an entry in etc/hosts disable postfix and selinux

after completing all move /opt/zimbra   /opt/zimbra.old

scripts to copy data from primary

set this scripts in primary harddisk after rebooting

mount the secondary harddisk

df  -h

/dev/sdb4 /mnt

[root@zimbra ~]# crontab -l
33 15 22 02 * /bin/sh /home/sas/with-delete.sh &> /home/sas/withdelete.log 2>&1




[root@zimbra script]# cat with-delete.sh

#!/bin/sh
Date1=`date +%d-%m-%Y`
T1=`date`

rsync -avz --delete /opt/zimbra /secondary/opt/zimbra > /home/sas/withdelete.log 2>&1

T2=`date`

echo "START :  " $T1 >> /home/sas/withdelete.log
echo "END   :  " $T2 >> /home/sas/withdelete.log


----------------------------------------------------

above method giving errors

"Starting ldap...[sudo] password for zimbra:"

after fixing this MySQL is crashing

** buffer overflow detected **: /opt/zimbra/common/sbin/mysqld terminated

solution was to rsync with 

rsync -avz --delete /opt/zimbra/  root@172.16.2.22:/opt/zimbra/

above cmd is wrong way

with delete will always run from the destination server so you need to execute this cmd from the server where you need the data in download mode


rsync -avz --delete root@172.16.2.32:/opt/zimbra/ /opt/zimbra/



put / after Zimbra



without renaming old /opt/zimbra to /opt/zimbra.old



also try this 

https://wiki.zimbra.com/wiki/Zimbra_services_stop_due_to_stale_PID

Problem

Sometimes Zimbra services are stop due to stale PIDs. You can see those Stale PIDs in /var/log/zimbra.log file like this:

11:38:03 zlog zmmailboxdmgr[28932]: assuming no other instance is running
11:38:03 zlog zmmailboxdmgr[28932]: no manager process is running
11:38:03 zlog zmmailboxdmgr[28949]: stale pid 27322 found in /opt/zimbra/log/zmmailboxd_manager.pid: No such process

Solution

This can be fix after restart the Zimbra serveices:

zmcontrol restart

If you are still facing the same issue then you need to remove it manually. Please follow the below steps to remove it manually

1) Stop the Zimbra services.

su - zimbra 
zmcontrol stop 

2) Check if any process is still running for the 'zimbra' user then kill it.

[Run as ROOT user] 
ps -elf | grep -i zimbra 
kill -9 <pid>

3) Check the remove stale PID files.

[Run as ROOT user] 
ls -ltr /opt/zimbra/log/*.pid 
rm /opt/zimbra/log/*.pid            # Press Y to confirm the file deletion. 

4) Now start Zimbra services.

su - zimbra 
zmcontrol start

Comments

Popular posts from this blog

cpanel exam CPSP Answers

How to install zimbra collaboration suite 8.8.11 on CentOS 7

awstats installation