I recently decided to try out Citrix XenServer to test some virtual machines. While migrating to Zimbra webmail, I have been looking for an easy way to share the large mail store folder between two servers in case there is ever a problem with the primary. Zimbra’s documentation advises against using NFS for the mail store (/opt/zimbra/store), for performance reasons, which for me is about 60 GB right now. So I have been researching iSCSI options that will still provide fast access time.
XenServer has several free how-to videos on various subjects, and one of them talks about creating a shared disk resource for a virtual machine, detaching it, and reattaching it to another machine. This stood out to me as an excellent solution for Zimbra. Now I can have the manual failover option for this scenario: a new patch comes out for Zimbra; I want to either test it first on the secondary, or install it on the primary first, with the confidence that a second system is completely ready to go, with just a switch of the virtual disk.
Creating the iSCSI backed shared storage on XenServer was easy. Create New Storage, select iSCSI. I created a LUN on our NAS and looked in the logs to find the iSCSI IDs as both servers attempted to connect, then added those IDs to the LUN’s allowed iSCSI list. XenServer behaves as if it is a local disk, for example, /dev/xvdb1. And after connecting both XenServers to an isolated network subnet, along with the NAS dedicated NIC on the new subnet, the performance looks great so far. One of the tips that helped was this Netapp page on how to optimize your iSCSI partition, where they suggest to use fdisk’s expert mode to change the starting LBA from 63 to 64. This link shows what the XenCenter screens look like when setting up iSCSI.
The secondary Zimbra server is also a XenServer virtual machine, so when I need to start up mail services on it, I will need to stop services on the primary with zmcontrol stop, detach the shared storage from the primary in XenCenter, and reattach it to the secondary, then restart Zimbra services on the secondary. This is essentially doing the manual version of what Citrix XenServer Essentials’ High Availability feature can do. While I have not yet played with XenServer Essentials, which has a limited trial version, the High Availability feature might be nice to have in the future. And of course, with the version in use now, we can do a live migration between host servers with a simple right click, “Migrate”.
To summarize the storage options used for Zimbra, I have /opt/zimbra/backup mounted to NFS, since it doesn’t require as much intensive read/write, and /opt/zimbra/store mounted to iSCSI. The secondary system has NFS mounts to both the primary and secondary’s backup folders in case of restores.
I’m looking forward to seeing how this will work in the longer term. Let me know if you have experimented with any of these applications and what worked for you.