Oracle® Solaris 11.4 Network File Sharing Cheatsheet
This cheatsheet provides the basic command syntax to use for some common network file sharing tasks in the Oracle Solaris 11.4 release.
For more information,
see the nfsref(8),
nfsstat(8),
smb(5),
smbadm(8),
share(8),
and mount(8) man pages.
Commonly Used NFS and SMB File Sharing Commands
Table 1 Administering Network File Systems
|
|
Share a ZFS file system
|
# zfs set share.nfs=on | off filesystem
|
Define file systems to use NFS server logging
|
# share -F nfs -o,log=global filesystem
|
List the shared NFS file systems
|
# share -F nfs
|
Mount a file system
|
# mount -F nfs -o specific-options resource mount-point
|
Mount an NFS File System by Using an NFS URL
|
# mount -F nfs nfs://host[:port]/pathname mount-point
|
Display information about file systems available for mounting
|
# /usr/sbin/showmount -e hostname
|
Select different versions of NFS on a server
|
# sharectl set -p server_versmax=version_num nfs
# sharectl set -p server_versmin=version_num nfs
|
Disable server delegation
|
# sharectl set -p server_delegation=off nfs
|
Set a common domain for NFS clients and servers
|
# sharectl set -p nfsmapid_domain=domain_name nfs
|
Create an NFS referral
|
# nfsref add ref_filesystem server_name1:filesystem server_name2:filesystem
|
Remove an NFS referral
|
# nfsref remove ref_filesystem
|
Disable autofs browsability on a single NFS client
|
# sharectl set -p nobrowse=TRUE autofs
|
|
Table 2 Troubleshooting Network File Systems
|
|
Remove all file, record, and share locks for an NFS client
|
# clear_locks -s hostname
|
Display file system operations statistics by file system type and by mount point.
|
# fsstat nfsversnum nfsversnum filesystem
|
Display NFS server statistics
|
# nfsstat -s
|
Display the current NFS information
|
# nfsstat -m
|
Display stack trace for NFS process
|
# /usr/bin/pstack nfs_process_id
|
Display RPC service information for a host
|
# rpcinfo -s hostname
|
|
Table 3 Managing SMB File Sharing
|
|
Enable SMB sharing for ZFS file system on the dataset
|
# zfs set share.smb=on pool/dataset
|
Create an SMB share having no default property value
|
# zfs share -o share.smb=on pool/dataset%share-name
|
Find share to mount from the server
|
# smbadm show-shares server
|
Mount share on a directory
|
# mount -F smbfs //server/share mount-point
|
Remove an SMB Share
|
# zfs destroy pool/dataset%share-name
|
List all SMB mounts
|
# mount -v | grep 'type smbfs'
|
View all the SMB environment property values
|
# sharectl get smb
|
Create an SMB group
|
# smbadm create-group group-name
|
Add a member to an SMB group
|
# smbadm add-member -m member-name group-name
|
Remove member from an SMB group
|
# smbadm remove-member -m member-name group-name
|
Modify an SMB group property
|
# smbadm set-group -p property=value group-name
|
Store SMB persistent passwords
|
# smbadm add-key -u username
|
Remove SMB persistent passwords
|
# smbadm remove-key -u username
|
|