Checking an NFS Server Connection

By default, Cocktail service uses persistent volumes via storage classes. An NFS server is built and used as a storage class in local and bare-metal environments, and the default storage class provided by a service provider is used in public clouds.

This document describes how to check the status of an NFS server and its connection with the Cocktail service in local and bare-metal environments.

  • NFS server installation and startup (The example assumes that the nfs server address is 192.168.0.175 and the nodes that make up the cluster is located in the 192.168.0.0/24 range.)
# yum install nfs-utils
# mkdir -p /cocktail-nfs

# vi /etc/exports
/cocktail-nfs 192.168.0.0/24(rw, sync, no_root_squash, no_all_squash)

# systemctl enable rpcbind
# systemctl enable nfs-server
# systemctl restart rpcbind
# systemctl restart nfs-server
  • Verify that the master and worker nodes are connected to the nfs server

The NFS server and client use UDP and TCP ports 111, 1039, 1047, 1048, and 2049. Verify that the ports are not blocked in the firewall via ping or telnet commands, and make sure that the directory shared by the nfs server can be queried.

# yum install nfs-utils

# ping 192.168.0.175
# telnet 192.168.0.175 2049

You can look up the shared directory via the showmount command.
# showmount -e 192.168.0.175
/cocktail-nfs 192.168.0.0/24
  • If deployed on Minikube

Check the volume name from k8s Dashboard > Config and Storage > Persistent Volume Claims and move to and query the directory using the following command: (Assuming pvc :pvc-1fb67e4b-d821-11e7-ba90-0800271793b1)

# minikube ssh

# cd /mnt/sda1/hostpath-provisioner/pvc-1fb67e4b-d821-11e7-ba90-0800271793b1
# ls -al
total 176200
drwxrwxrwx 5  999  999     4096 Dec  3 12:03 .
drwxr-xr-x 4 root root     4096 Dec  3 11:57 ..
-rw-rw---- 1  999  999    16384 Dec  3 12:03 aria_log.00000001
-rw-rw---- 1  999  999       52 Dec  3 12:03 aria_log_control
drwx------ 2  999  999    12288 Dec  3 12:03 cocktail
-rw-rw---- 1  999  999 50331648 Dec  3 12:20 ib_logfile0
-rw-rw---- 1  999  999 50331648 Dec  3 12:03 ib_logfile1
-rw-rw---- 1  999  999 79691776 Dec  3 12:20 ibdata1
-rw-rw---- 1  999  999        0 Dec  3 12:03 multi-master.info
drwx------ 2  999  999     4096 Dec  3 12:03 mysql
drwx------ 2  999  999     4096 Dec  3 12:03 performance_schema
-rw-rw---- 1  999  999    24576 Dec  3 12:03 tc.log
  • Lookup of a mount directory on an NFS server of a pod with a persistent volume (PV)
# login to nfs server

NFS 서버에서 공유한 디렉토리로 이동(/cocktail-nfs라고 가정함)
# cd /cocktail-nfs
# cd /

results matching ""

    No results matching ""