NFS Server
Exports directories to the network using dfstab/SMF and provides file data to clients.
Solaris · NFS
Solaris · Lesson 22
NFS lets you share files and directories over the network so that remote systems can access them as if they were local. In Solaris, NFS is tightly integrated with SMF and IPS, making it easy to set up reliable file sharing between Unix systems.
NFS (Network File System) allows one Solaris system to act as an NFS server and share directories, while other systems act as NFS clients and mount those shared directories over the network.
Exports directories to the network using dfstab/SMF and provides file data to clients.
Mounts exported directories and accesses them as if they were local filesystems.
Shared directories controlled by share/dfstab with options like rw, ro, root, anon and client lists.
NFS exports in Solaris support fine-grained access control. You can specify:
Walk through these examples in your lab environment using two VMs: one as server and one as client.
Most Solaris 11 systems already have NFS, but you can verify and install using IPS.
Use svcadm to enable NFS server and svcs to verify it is online.
dfstab defines which directories are exported. shareall reads this file and activates exports.
Use rw= / ro= / root= to control which clients and hosts get which access level.
On systems with firewall/pf configured, make sure NFS-related ports are allowed.
Mount the exported directory on a local mountpoint. Great for testing.
Add an entry so the share mounts automatically at boot on the client.
Use share/showmount on server, mount on client to confirm configuration.
Always unmount cleanly before removing vfstab entries or shutting down server for maintenance.
Use svcs, showmount, logs and ping to diagnose most problems.
anon=0 and wide-open root access in production; prefer mapping anonymous users to non-privileged UIDs.rw= and ro= options instead of exporting to everyone./var/adm/messages and /var/log/syslog for NFS-related errors regularly.NFS is often combined with ZFS and zones – in later lessons, you can export ZFS datasets and mount them inside Solaris zones for flexible architectures.