Web hosts - Chapter 27 . Running a File Servers 725

Chapter 27 . Running a File Servers 725 . -a Mount all file systems in /etc/fstab (except those indicated as noauto). . -f This goes through the motions of (fakes) mounting the file systems on the command line (or in /etc/fstab). Used with the -v option, -f is useful for seeing what mount would do before it actually does it. . -r Mounts the file system as read-only. . -w Mounts the file system as read/write. (For this to work, the shared file system must have been exported with read/write permission.) The next section describes how to make the mount more permanent (using the /etc/fstab file) and how to select various options for NFS mounts. Automatically Mounting an NFS File System To set up an NFS file system to mount automatically each time you start your Linux system, you need to add an entry for that NFS file system to the /etc/fstab file. That file contains information about all different kinds of mounted (and available to be mounted) file systems for your system. Here s the format for adding an NFS file system to your local system: host:directory mountpoint nfs options 0 0 The first item (host:directory) identifies the NFS server computer and shared directory. mountpoint is the local mount point on which the NFS directory is mounted. It s followed by the file system type (nfs). Any options related to the mount appear next in a comma-separated list. (The last two zeros configure the system to not dump the contents of the file system and not to run fsck on the file system.) The following are examples of NFS entries in /etc/fstab: maple:/tmp /mnt/maple nfs rsize=8192,wsize=8192 0 0 oak:/apps /oak/apps nfs noauto,ro 0 0 In the first example, the remote directory /tmp from the computer named maple (maple:/tmp) is mounted on the local directory /mnt/maple (the local directory must already exist). The file system type is nfs, and read (rsize) and write (wsize) buffer sizes (discussed in the Using mount Options section later in this chapter) are set at 8192 to speed data transfer associated with this connection. In the second example, the remote directory is /apps on the computer named oak. It is set up as an NFS file system (nfs) that can be mounted on the /oak/apps directory locally. This file system is not mounted automatically (noauto), however, and can be mounted only as read-only (ro) using the mount command after the system is already running. The default is to mount an NFS file system as read/write. However, the default for exporting a file system is read-only. If you are unable to write to an NFS file system, check that it was exported as read/write from the server. Tip
In case you need quality webspace to host and run your web applications, try our personal web hosting services.

Leave a Reply