In a very large Virtuozzo environments you may want to export templates via NFS to other nodes to avoid multiple cache updates when an EZ template update is being performed.
It works only with
ploop-based templates. Verify that you are using ploop:
# grep "VEFSTYPE" /etc/sysconfig/vz VEFSTYPE="ext4"
Select one Virtuozzo 6.0 node which should be used to export templates, install NFS components on it
# yum install rpcbind nfs-utils nfs-utils-lib
Enable NFS-related services
# chkconfig rpcbind on # chkconfig nfslock on # chkconfig nfs on
# service rpcbind start Starting rpcbind: [ OK ] # service nfslock start Starting NFS statd: [ OK ] # service nfs start Starting NFS services: [ OK ] Starting NFS mountd: [ OK ] Starting NFS daemon: [ OK ] Starting RPC idmapd: [ OK ]
/etc/exportsto export the directory via NFS. Add following record:
<SUBNET>with corresponding network settings (e.g. 192.168.1.0 and 255.255.255.0).
Run following command to export the share
# exportfs -a
Modify permissions to allow NFS clients to write into this directory
# chown -R nfsnobody:nfsnobody /vz/template
Now you can mount the NFS share on any other Virtuozzo node and cache template on any node. The template caching utility (
vzpkg) is NFS-aware and will lock the template during caching operation which would prevent any conflicts.