Synchronization of OS templates on cluster nodes

From ISPWiki
Jump to: navigation, search

For automatic OS deployment, each cluster node must contain a directory with OS templates. Normally, the templates are located in the /nfsshare directory.

Correspondence between the directory and templates is provided as follows (the optionOsTplDistributionMethod):

  • nfs: the /nfsshare directory of the main node is mounted on each cluster node. You need to install and configure the NFS-server on the machine with VMmanager.
  • rsync: when installing an OS template or adding a cluster node, VMmanager will synchronize the directories using rsync. This is the only synchronization method available in VMmanager Cloud
  • distrsync: similar to rsync, but the synchronization process is managed with the ostdistrsync utility, which updates templates for all the cluster nodes in parallel. Templates synchronization is performed both from the master-server, and from any node where the synchronization has been already completed. On the source server only one rsync is performed allowing to decrease subsystem and network interface load. See also the RsyncBwLimit in the article VMmanager configuration file
  • manual: no synchronization, the template is installed on the master node, synchronization of directories must be performed by user

If you use rsync, the template synchronization will start only during installation/update of templates in VMmanager. I.e. the templates that were added manually (custom local templates) won't be synchronized.

If you use custom OS templates, execute the following command for synchronization in VMmanager KVM:

/usr/local/mgr5/sbin/mgrctl -m vmmgr osmgr.afterinstall

The command will start the full synchronization of the directory with templates (/nfsshare) on all the cluster nodes.

Hoe to change the synchronization type

To change a synchronization type, call the osmgr.rsync function with the method=nfs|rsync|manual parameter

/usr/local/mgr5/sbin/mgrctl -m vmmgr osmgr.rsync method=rsync

Note: changing nfs into rsync will unmount all the directories with OS templates and start rsync on all the cluster nodes. Changing into manual will not perform any action, the administrator should unmount them himself.

Restart VMmanager to apply the changes:

/usr/local/mgr5/sbin/mgrctl -m vmmgr exit