Setting Up Aliases for NFS Exports
About this task
When provisioning file system for various tenants, you can set up an alias for the path in file system, rather than exporting the whole path, to mask the path from the users. Once the alias is set up, users will not be able to access or mount the path in file system.
Aliases can be set up for the cluster, volume, and directory, but not for the root of the path in file system
(/mapr
). To set up an alias for a path in file system:
Procedure
-
Open the NFS exports file in
/opt/mapr/conf/
directory. -
Specify the alias name for the mount path using the following syntax:
Here:<path in MFS> /<alias name> <options>
For example, suppose a file system mount path of<path in MFS>
Refers to the file system mount path. If this points to a: - Volume, the user can access the snapshots associated with the volume.
- Directory, the user cannot access the snapshots.
/<alias name>
Refers to the alias name to use. If there are duplicate aliases in the file, the last entry will take effect and all other duplicate entries will be ignored. If the alias name is not specified, the path in file system will be exported. <options>
The list of available/supported options. /mapr/samplecluster/samplevolume
for tenant samplecustomer. To set up an alias, add the following to the exports file:
For example, to export a certain cluster, volume, or a subdirectory as an alias, comment out/mapr/samplecluster/samplevolume /samplecustomer (rw)
/mapr
and add the following:/mapr/clustername /alias1 (rw) /mapr/clustername/vol /alias2 (rw) /mapr/clustername/vol/dir /alias3 (rw)
NOTEOnly the alias will be visible/exposed to the NFS client. -
Run the following command for the file changes to take effect:
/opt/mapr/bin/maprcli nfsmgmt refreshexports
-
Run the following command to export the path:
Run this command once for each entry in the file.mount -t nfs nfsServer:/<alias_name> /localpath