Skip to content

Commit 3deb49d

Browse files
NFS server documentation for network-communications.md
* NFS server documentation for network-communications.md * Fix NFS server documentation. Forgot to close backtick * NFS server documentation fix typo rw -> ro
1 parent 6b8d3b6 commit 3deb49d

File tree

1 file changed

+93
-0
lines changed

1 file changed

+93
-0
lines changed

docs/handbook/network-communications.md

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,99 @@ You can create additional CIFS datasets using the following 4 commands.
331331

332332
### Hipster as an NFS server
333333

334+
< Placeholder for introduction content >
335+
336+
337+
#### Manual pages
338+
339+
You can read more about the commands and files used or mentioned with the `man` pages, and at the provided links in the document.
340+
341+
* [dfstab(5)](https://illumos.org/man/5/dfstab)
342+
* [share_nfs(8)](https://www.illumos.org/man/8/share_nfs)
343+
* [share(8)](https://www.illumos.org/man/8/share)
344+
* [shareall(8)](https://www.illumos.org/man/8/shareall)
345+
* [svcadm(8)](https://www.illumos.org/man/8/svcadm)
346+
* [unshare(8)](https://www.illumos.org/man/8/share)
347+
348+
For example to view the full documentation for `share(8)` you can use this command:
349+
```console
350+
$ man share.8
351+
```
352+
353+
354+
#### Sharing a folder with NFS
355+
356+
To create a read-only temporary NFS share on an existing folder in this example `/nfs/example` you can use the following [share(8)](https://www.illumos.org/man/8/share) command:
357+
358+
```console
359+
# share -d example-share -F nfs -o ro /nfs/example
360+
```
361+
362+
The flags provided can be described in a table such as the following:
363+
364+
|Flag|Description|
365+
|------|-----------|
366+
|-d|Adds a description for the share in this case `example-share`|
367+
|-F|Filesystem type, in this case NFS.|
368+
|-o|Options for the NFS share in this case `ro`|
369+
370+
If you want the share to be persistent, you can write it to the [dfstab(5)](https://illumos.org/man/5/dfstab) by using the `-p` flag on the [share(8)](https://www.illumos.org/man/8/share) command.
371+
372+
You can then use the [share(8)](https://www.illumos.org/man/8/share) command with no arguments to list shares as follows:
373+
374+
```console
375+
$ share
376+
- /nfs/example ro "example-share"
377+
```
378+
379+
After this you can enable the `network/nfs/server` service with [svcadm(8)](https://www.illumos.org/man/8/svcadm) using the following command:
380+
381+
```console
382+
# svcadm enable network/nfs/server
383+
```
384+
385+
And then use [shareall(8)](https://www.illumos.org/man/8/shareall) to share it on the network as follows:
386+
387+
```console
388+
# shareall
389+
```
390+
391+
392+
#### Using an access list
393+
394+
An access list argument is a colon separated list, the access list may include the following:
395+
396+
* A hostname, which must be represented as a fully qualified DNS or LDAP name.
397+
* A netgroup
398+
* A domain name suffix
399+
* A network, IP address or IP subnet
400+
401+
This is an example of creating an NFS share that's read-only for everyone, but provide read-write and root access to a single IP address in this case `192.168.0.100`, IP addresses are prefixed with `@` as they are in the network components:
402+
403+
```console
404+
# share -F nfs -o ro,rw=@192.168.0.100,root=@192.168.0.100 /nfs/example
405+
```
406+
407+
408+
#### Other useful NFS options
409+
410+
|Option|Description|
411+
|------|-----------|
412+
|nosuid|Ignore attempts of clients setting suid bits.|
413+
|none=*access_list*|Deny all access to clients that match the access list.|
414+
415+
416+
#### Removing an NFS share
417+
418+
You can use the [unshare(8)](https://www.illumos.org/man/8/unshare) utility with the NFS share folder as shown here:
419+
420+
```console
421+
# unshare /nfs/example
422+
```
423+
424+
425+
#### Securing NFS with Kerberos
426+
334427
< Place holder for content >
335428

336429

0 commit comments

Comments
 (0)