724 Part V . Running Servers (Web hosting resellers) Manually Mounting

724 Part V . Running Servers Manually Mounting an NFS File System If you know that the directory from a computer on your network has been exported (that is, made available for mounting), you can mount that directory manually using the mount command. This is a good way to make sure that it is available and working before you set it up to mount permanently. Here is an example of mounting the /tmp directory from a computer named maple on your local computer: # mkdir /mnt/maple # mount maple:/tmp /mnt/maple The first command (mkdir) creates the mount point directory (/mnt is a common place to put temporarily mounted disks and NFS file systems). The mount command identifies the remote computer and shared file system separated by a colon (maple:/tmp), and the local mount point directory (/mnt/maple) follows. If the mount fails, make sure the NFS service is running on the server and that the server s firewall rules don t deny access to the service. From the server, type ps ax | nfsd to see a list of nfsd server processes. If you don t see the list, try to start your NFS daemons as described in the previous section. To view your firewall rules, type iptables -L (see Chapter 17 for a description of firewalls). By default, the nfsd daemon listens for NFS requests on port number 2049. Your firewall must accept udp requests on ports 2049 (nfs) and 111 (rpc). To ensure that the mount occurred, type mount. This command lists all mounted disks and NFS file systems. Here is an example of the mount command and its output (with file systems not pertinent to this discussion edited out): # mount /dev/hda3 on / type ext3 (rw) … … … maple:/tmp on /mnt/maple type nfs (rw,addr=10.0.0.11) The output from the mount command shows the mounted disk partitions, special file systems, and NFS file systems. The first output line shows the hard disk (/dev/ hda3), mounted on the root file system (/), with read/write permission (rw), with a file system type of ext3 (the standard Linux file system type). The just-mounted NFS file system is the /tmp directory from maple (maple:/tmp). It is mounted on /mnt/ maple and its mount type is nfs. The file system was mounted read/write (rw), and the IP address of maple is 10.0.0.11 (addr=10.0.0.11). This is a simple example of using mount with NFS. The mount is temporary and is not remounted when you reboot your computer. You can also add options for NFS mounts: Note
Searching for affordable and reliable webhost to host and run your web applications? Go to our java web server services and you will be pleased.

Leave a Reply