Applies to VoipNow 3.X.X!
With distributed environments, some of the folders need to be shared between nodes. For that, you can either use a NAS /SAN server and mount a shared disk on all nodes form the distributed environment, or you may use a NFS server that can reside on the main node, infrastructure controller (IC), or a dedicated server.
For the sake of simplicity, we'll assume that the NFS server will be installed on the IC, which is the main node, but all the files will be stored on a faster drive, like a SSD disk, mounted under the /home/storage folder.
Using the Infrastructure Controller
Install the NFS utilities and supporting clients and daemons for the NFS server on the main node (the IC), that will became the NFS server for the distributed environment.
When working with NFS, you must take into consideration the total number of NFS threads that are available on the NFS server. By default, this number is set to 8. However, it's better to increase the number of threads on the NFS server. To do this, increase the value of RPCNFSDCOUNT in /etc/sysconfig/nfs
Once the files are installed and the number of processes is set, start the NFS daemon on the IC.
- Before exporting the shared storage disk, you need to make sure that all the shared files and folders are available there.
Assuming that /home/storage/ is the storage home directory, the following command will copy all the required files in the shared location.
After running all these commands, the structure should look something like this:
The folders from the shared location must be mounted on the IC as well on the other nodes. For the IC, which is the main node also used as th eNFS server, the following lines must be added in /etc/fstab
In order to export the shared folder to all the nodes from the distributed environment, the line below must be added to /etc/exports. This line says that /home/storage will be exported and that it can be used by any NFS client from then network 10.150.12.0/24. Basically, any NFS client can mount the shared folder and use it.
To increase the writing performance of the NFS server, the share was exported using async as the method of writing. Keep in mind, however, that async can cause data loss and corruption of the saved files.
Once the fstab and exports lines were added, the folders must be mounted and shared on the network. The following commands are required:
Using any node from the distributed infrastructure
Before mounting the shared location, you need to install all the NFS utilities and supporting clients on the current node. To do this, run the following:
Let's assume that you want to add a dedicated PBX node which must have access to all the media files of the infrastructure and, at the same time, must be able to add new files, voicemail, call recordings, etc. In order to mount the shared folder exported form the IC and, also, the shared location mounted under the required folders, enter the following in the /etc/fstab file:
10.150.12.35 is the IP address of the main node. It should be replaced with the real IP address.
Once all changes are saved, the following command is required:
- The command above will mount all the shared folders on the local node.
Except where otherwise noted, content in this space is licensed under a Creative Commons Attribution 4.0 International.