On box where you want to share or the source box
0. Login as root
1. Edit dfstab
vi /etc/dfs/dfstab
insert
share -F nfs /opt/logs
2. Start the NFS Server
/etc/init.d/nfs.server start
3. Check is exported
exportfs
On box where you want to mount it or the target box
0. Login as root
1. Create a mount point
mkdir a;chmod 777 a
2. start NFS client
/etc/init.d/nfs.client start
3. mount the nfs
mount -F nfs hostname:/opt/logs /a
to unmount
umount /a
Sometimes you get error messages like this one:
nfs mount: mount: variable: Device busy
Cause This message appears when the superuser attempts to NFS mount on top of an active directory. The busy device is actually the working directory of a process.
Action Determine which shell on the workstation is currently located below the mount point, and change out of that directory. Be wary of subshells (such as su shells) that could be in different working directories while the parents remain below the mount point.
Execute this command to check
fuser directory on client where you are trying to mount nfs or
Do an lsof |grep directory on client where you are trying to mount nfs
This will give you the process which is accessing the directory. You can kill that process.
If you yourself are in that directory while trying to umount, cd out of it.
Here's the best nfs document for Solaris, for people who want to go into more details.
If you yourself are in that directory while trying to umount, cd out of it.
Here's the best nfs document for Solaris, for people who want to go into more details.
No comments:
Post a Comment