Storage NFS Tasks

This chapter contains the following sections:

Mount NFS Share

Summary
Mount an NFS export on a Linux machine.
Description
This task mounts an NFS share on a Linux machine. You provide comma-separated host IP addresses or FQDNs specifying where to mount the share on the hosts. All the hosts should share the same user name, password, and mount binary location (for example, /usr/bin/mount if not set in the path on the host machine). Scenario for Mounting the NFS Share:
  1. This task creates a new mount directory on the path given by user, mounts the share on the directory, and updates the entry in the /etc/fstab file.
  2. If the mount directory already exists, the task throws a warning, mounts the share on the directory, and updates the entry in the /etc/fstab file. The rollback is registered only for the /etc/fstab update and will not delete the directory.
  3. If the mount directory already exists and had an entry in in the /etc/fstab file for the same share name, then the task mounts the share and and throws a warning. The rollback is registered only for unmount and will not delete the directory.
  4. If the /etc/fstab file is already updated and the mount directory does not exist, the task creates the directory and mounts it. Rollback is registered only for unmounting and deleting the directory.
  5. If the mount directory already exists and has an entry in the /etc/fstab file for the share name and a mount present on the Linux machine, the task throws a warning and registers for rollback.
Failure: This task fails if any of the mounts fail on any host. All the hosts that are successful are be registered for rollback. The mount fails if:
  • The mount directory already exists and is mounted on some other NFS Share.
  • There is an entry in the /etc/fstab for the same mount directory for some other NFS Share.
  • The task cannot create the directory, update the entry in /etc/fstab, or mount the NFS share directory.
Inputs
Input Description Mappable To Type Mandatory
Host IP Address(s) Comma Separated IP address(s)/FQDN of the hosts where NFS share need to be mounted.​ For Example 10.​2.​2.​2,10.​3.​3.​3,bigbox.​mynetwork.​com gen_​text_​input Y
Username Username gen_​text_​input Y
Password Password password Y
NFS Export Path NFS Export Path gen_​text_​input Y
Mount Directory Mount Directory on which NFS Shares to be mounted.​ The path should start with slash (/) and parent directory for creating mount directory should exist gen_​text_​input Y
File​System Type Select NFS File​System Type of the Mount Directory NFSFile​System​Type Y
Optional Parameters Optional parameters to be passed while mounting NFS Share.​ Please make sure the mount options are valid.​ gen_​text_​input
Mount Utility Path Mention the complete path of mount binary, ignore if it is already set in the PATH environment variable gen_​text_​input
Outputs
No Outputs

Unmount NFS Share

Summary
Unmount an NFS share directory on a Linux machine.
Description
This task unmounts an NFS share on a Linux machine. You provide comma-separated Host IP Addresses or FQDNs specifying the shares to be unmounted from the hosts. All the hosts should share same user name, password, and umount binary location (for example, /usr/bin/mount if not set in the path on the host machine). Failure: This task fails if any of the unmounts fail on any host. The task throws an error for the failed host and moves to the next host.
Inputs
Input Description Mappable To Type Mandatory
Host IP Address(s) Comma Separated IP address(s)/FQDN of the hosts where NFS share need to be unmounted.​ For Example 10.​2.​2.​2,10.​3.​3.​3,bigbox.​mynetwork.​com gen_​text_​input Y
Username Username gen_​text_​input Y
Password Password password Y
Unmount Utility Path Mention the complete path of umount binary, ignore if it is already set in path gen_​text_​input
NFS Export Path NFS Export Path gen_​text_​input Y
Unmount Location Unmount Location gen_​text_​input Y
Outputs
No Outputs