Skip to content

Commit 58ce32b

Browse files
committed
Add docs for NFS client
1 parent b7a6c3f commit 58ce32b

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed

docs/handbook/network-communications.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,65 @@ You can create additional CIFS datasets using the following 4 commands.
299299

300300
< Place holder for content >
301301

302+
### Configuring NFS client connectivity
303+
304+
OpenIndiana has built in NFS client support and automatic mounting capabilities for using remote NFS shares.
305+
306+
#### Manually mounting remote NFS shares
307+
308+
The [`mount -F nfs`](https://illumos.org/man/8/mount_nfs) command is used to manually mount a remote share to a specified location.
309+
Two forms of remote host and path are supported, `host:/remote/path` and `nfs://host/remote/path`.
310+
For example, to mount the remote folder `example` on the server `hipster` to the local path `/mnt/example`, this command could be used:
311+
312+
```
313+
# mount -F nfs nfs://hipster/example /mnt/example/`
314+
```
315+
316+
#### Automatically mounting remote NFS shares
317+
318+
Automounting is provided by the *autofs* service. This enables automatic on demand mounting and unmounting of remote NFS shares.
319+
Compared to manually mounting NFS shares, this saves time and doesn't require root access once set up.
320+
Mounting specific (direct) remote shares requires configuring the `/etc/auto_master` and `/etc/auto_direct` files.
321+
322+
<div class="note" markdown="1">
323+
!!! note
324+
*autofs* has many other features which are likely to be useful for larger networks with multiple users, such as automatic mounting of user home directories.
325+
For more information, see [Solaris Network Services documentation](https://docs.oracle.com/cd/E23823_01/html/816-4555/rfsrefer-66.html).
326+
</div>
327+
328+
Before automounting can be used, the autofs daemon must be running. In OI it should be enabled by default:
329+
330+
```
331+
# svcs system/filesystem/autofs
332+
STATE STIME FMRI
333+
online 14:59:45 svc:/system/filesystem/autofs:default
334+
```
335+
336+
If it is not already running, it can be enabled with `svcadm enable system/filesystem/autofs`.
337+
338+
The paths for direct NFS shares are configured in `/etc/auto_direct`. For this file to be read by autofs, a new line must first be added to the end of `/etc/auto_master`:
339+
340+
```
341+
# Master map for automounter
342+
#
343+
+auto_master
344+
/net -hosts -nosuid,nobrowse
345+
/home auto_home -nobrowse
346+
/- auto_direct
347+
```
348+
349+
The `/etc/auto_direct` file can then be created and populated. Entries consist of the local path to mount the NFS share, optional mount options, and the remote NFS path.
350+
Both the forms in the previous section for specifying the remote path are supported.
351+
For example, this configures two automatically mounted shares, one using the `ro` option (for read-only):
352+
353+
```
354+
/mnt/example nfs://hipster/example
355+
/mnt/reference -ro hipster:/reference
356+
```
357+
358+
For changes to these files to take effect, reboot or run the `automount` commmand.
359+
360+
The `mount` command is used without arguments to list all current mounts, including any automatically mounted NFS locations and mount time (when the automatic mount was triggered).
302361

303362
### Configuring CIFS/SMB client connectivity
304363

0 commit comments

Comments
 (0)