Mount an NFS Share Point in the VCH Endpoint VM
When creating an NFS client mount, the combination of permissions and settings on the server side and the number of possible combinations of options on the client side can make it very difficult to test. In addition, the question of which ports to open on firewalls can also cause connection problems.
If you deploy VCHs that use NFS share points as volume stores, you can test the connections to these share points by mounting the NFS server from within the VCH endpoint VM. Confirming that you can mount the NFS share point from within the endpoint VM confirms that the NFS volume store configuration will also work. However, the
mount.nfs package is not included in the VCH endpoint VM by default. You must use the Photon OS package manager, Tiny DNF, to add it manually.
- Run the
vic-machine debugcommand with the
--rootpwoptions to enable SSH access to the VCH endpoint VM and to set the root password. For information about
vic-machine debug, see Debug Running Virtual Container Hosts.
- Follow the instructions in Install Packages in the Virtual Container Host Endpoint VM to configure the VCH endpoint VM so that it can run Tiny DNF commands.
- You have an NFS share point that is configured for anonymous mounting.
- Use SSH to connect to the VCH endpoint VM as root user.
- Install the
tdnf install nfs-utils
This package adds the
/etc/servicesfile, which is not present by default.
tdnf install iana-etc
- Start the
systemctl start rpcbind
- Check the status of the
systemctl status rpcbindIf
rpcbindis running correctly, you should see the message:
* rpcbind.service - RPC Bind Service Loaded: loaded (/usr/lib/systemd/system/rpcbind.service; enabled; vendor preset: enabled) Active: active (running) since Tue 2018-03-06 16:15:17 UTC; 10s ago Process: 1025 ExecStart=/usr/sbin/rpcbind $RPCBIND_OPTIONS -w (code=exited, status=0/SUCCESS) Main PID: 1028 (rpcbind) Tasks: 1 CGroup: /system.slice/rpcbind.service
Mar 06 16:15:17 Linux systemd: Starting RPC Bind Service... Mar 06 16:15:17 Linux systemd: Started RPC Bind Service.</pre>
`-1028 /usr/sbin/rpcbind -w
- Mount the NFS share point in the VCH endpoint VM.
mount -t nfs nfs_sharepoint_url -o vers=3For information about how to specify the NFS sharepoint URL, see the description of the
vic-machine create --volume-storeoption in Specify Volume Datastores.
If the mount operation was successful, the NFS share point is correctly configured for use as a volume store by this VCH.