Menu

Setup Shared Directory with NFS Client for Linux

Overview

The NFS Client should be installed on any server that is sending qTest data to a Shared Directory. If you are using a distributed server deployment model or if using the load balancing model you will need to install the NFS client BEFORE you install an application node.

You will use the NFS Client to mount to the shared folder, which you have set up in your Shared Server, to a local drive. The local drive will be used to configure qTest Manager/Sessions when you install.

A Shared Directory is used anytime you are deploying qTest applications on more than one server where you have files that may need to be shared among services. These files can be supported by a distributed file system like NFS. The instructions below include setting up a NFS Client.

Install and Configure NFS Client 

  1. Enter the following command to install NFS Client.
    root@ip-[your-ip-address]:/home/ubuntu# sudo apt-get install nfs-common rpcbind
  2. Create a directory that will be used as qTest applications storage.
    root@ip-[your-ip-address]:/home/ubuntu# sudo mkdir /sessions-storage

Mount the Shared Directory to the Shared Server

  1. Mount the Shared Directory to the Shared Server (whose IP address is 10.0.10.126) to the directory you just created. You will use the command based on the application directory you are mounting.
    root@ip-[your-ip-address]:/home/ubuntu# sudo mount 10.0.10.126:/shared-sessions-storage /sessions-storage OR
    root@ip-[your-ip-address]:/home/ubuntu# sudo mount 10.0.10.126:/shared-manager-storage /manager-storage
  2. Edit the file /etc/fstab using vim.
    root@ip-[your-ip-address]:/home/ubuntu# vim /etc/fstab
  3. .. and add the following line to fstab file for permanent mount:
    10.0.10.126:/shared-sessions-storage /sessions-storage nfs rw,sync,hard,intr 0 0
    OR
    10.0.10.126:/shared-manager-storage /manager-storage nfs rw,sync,hard,intr 0 0
  4. Save and close the file when you are done.
  5. Check the mounted share directory with mount command:
root@ip-[your-ip-address]:/home/ubuntu# mount
...
10.0.10.126:/shared-sessions-storage on /sessions-storage type nfs4 (rw,relatime,vers=4.0,rsize=524288,wsize=524288,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=10.0.10.95,local_lock=none,addr=[public IP Address])
...
root@ip-[your-ip-address]:/home/ubuntu#

OR

root@ip-[your-ip-address]:/home/ubuntu# mount
...
10.0.10.126:/shared-manager-storage on /manager-storage type nfs4 (rw,relatime,vers=4.0,rsize=524288,wsize=524288,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=10.0.10.95,local_lock=none,addr=[public IP Address])
...

Now whenever there are files being created/updated/deleted in sessions-storage or manager-storage directory by qTest Sessions/Manager, they will be also created/updated/deleted in the shared-sessions-storage or shared-manager-storage directory in the Shared Server. Those files will be accessible by all qTest Sessions/Manager applications running on different servers.

 

Subscribe To Our Blog
Powered by Zendesk