SPARCbook Portable Workstation User Guide
8-15
Using the Network Interface
Sharing Filesystems
If you have added directories to an already existing
/etc/exports
file
the NFS daemons will already be running and you may need only to
enter the
exportfs
command.
ò
Disabling file sharing
Before disabling file sharing, check to see if any files are being shared
with the
exportfs
command without arguments. This produces a list
of shared directories. You can unexport directories at any time by using
the export -u command. For example:
# export -u /usr/anywork
halt NFS access to
/anywork
# export -ua
halt NFS access to all directories
Mounting filesystems
To share a directory that has been made available for sharing, or
exported, you use the
mount
command. This allows you to attach
remote filesystems to your own filesystem tree and access them as a
normal part of your own filesystem. You may need to create a directory
as a mount point and then mount the remote filesystem. For example,
Betty Small on the machine medoc wishes to mount the directory
/anywork,
which resides on the machine merlot, and access it within
her home directory
/export/home/bs
in a subdirectory called
/mywork
. The steps required would be as follows:
ò
Create the new directory
% mkdir /export/home/bs/mywork
This step is only required if the directory does not already exist.
However, using an existing directory as a mount point will prevent you
from accessing files already in that directory while the remote
filesystem is mounted.
ò
Mount the remote directory
# mount merlot:/usr/anywork /export/home/bs/mywork
Figure 8-5 illustrates the effect of mounting the remote directory on the
local directory tree. Note that although this directory has the name
/anywork
on merlot, accesses to the directory from the local host
(medoc) use the name of the mount point
/mywork
. For example:
$ ls mywork
File_1 File_2 File_3
S3UG4_Book Page 15 Friday, August 8, 1997 11:37 am