| United States-English |
|
|
|
![]() |
HP-UX System Administration Tasks: HP 9000 > Chapter 4 Working with HP-UX File
Systems Mounting File Systems |
|
The process of incorporating a file system into the existing directory structure is known as mounting the file system. The file system can be on a disk or disks connected directly to your system, that is, a local file system, or it can be part of a remote NFS file system, and it can be on either a non-LVM disk or a logical volume. Mounting a file system associates it with a directory in the existing file system tree. Prior to mounting, the files, although present on the disk, are not accessible to users; once mounted, the file system becomes accessible. The directory in the existing file system where the file is attached is known as the mount point or mount directory for the new file system, and the files in the added file system become part of the existing file system hierarchy. The mount point should be an empty subdirectory on the existing file system. If you mount a file system on to a directory that already has files in it, those files will be hidden and inaccessible until you unmount the file system. If you try to mount the file system on to a directory whose files are in use, the mount will fail. You can either use SAM or HP-UX commands to mount file systems. If you are using SAM, proceed from SAM's "Disks and File Systems" area menu. You can perform the necessary tasks as part of creating your file system, as already described. For help in mounting files using SAM, see SAM's online help; instructions for using HP-UX commands follow. The mount command attaches a file system, on either a non-LVM disk or a logical volume, to an existing directory. You can also use the mountall command or mount with -a to mount all file systems listed in the file /etc/fstab. (See mount(1M), mountall(1M) and fstab(4) for details.) To mount a local file system:
Refer to mount(1M) for details and examples. You can use either SAM or the mount command to mount file systems located on a remote system. Before you can mount file systems located on a remote system, NFS software must be installed and configured on both local and remote systems. Refer to Installing and Administering NFS for information. For information on mounting NFS file systems using SAM, see SAM's online help. To mount a remote file system using HP-UX commands,
In this example, as a result of issuing the mount command, you can access the directory called remote_dir on the system remotehost under the directory local_dir on your local system. To automatically mount a file system at bootup, list it in the /etc/fstab file. See the entry for fstab(4) for details on creating /etc/fstab entries. Here are some typical problems that are sometimes encountered when mounting a file system and the actions to take to correct the problem. Problem: The mount fails and you get an error message indicating Device busy. Solution: Make sure that another file system is not already mounted to the directory (only one file system can be mounted to a single mount point.) You will also get this message if the mount directory is being used as someone's working directory or if a user has an open file within the mount directory. (You can use fuser(1M) to check who has an open file within the mount directory.) Problem: The mount fails with the message No such file or directory. Solution: The device associated with the device file you're trying to mount doesn't exist, is not physically attached, or is not in a "ready" state. If you have never mounted this device before, check your block device file name to be sure that it has the proper characteristics. Problem: /etc/mnttab is out-of-date with kernel data structures. Solution: Update /etc/mnttab using mount -u. Problem: You get an error indicating /etc/mnttab does not exist or that mount had an "interrupted system call" when you try to mount a file system. Solution: /etc/mnttab is normally created, if it doesn't already exist, within /sbin/init.d/hfsmount when you boot up your computer. If you get one of these messages, /etc/mnttab does not exist so you need to create it using the following command:
The following problems concern attempting to mount a remote file system: Problem: You observe that a server or client are not acting as you expect. Solution: Make sure the server and client have been designated as such in their /etc/rc.config.d/nfsconf script by setting NFS_SERVER=1 and/or NFS_CLIENT=1. Problem: You get an access denied message. Solution: Make sure the remote machine has an entry in the /etc/exports file that lists the client's hostname. (hostname is returned by the hostname(1) command.) If not, add it to /etc/exports and then execute exportfs -a. If you are using the Domain Name Server, servers need to be correctly listed in /etc/resolv.conf. Problem: Same as previous problem. Solution: As an alternate solution, run /usr/sbin/exportfs -i dir from the server to export the named directory or file system to all nodes. Problem: You get the message No such file or directory for the mount point you have chosen. Solution: Make sure the mount directory exists and is not currently being used as a mount point. Problem: On a T500 system, after adding many file systems to /etc/fstab and executing mount -a, you get a message including the words table is full. Solution: See "Reconfiguring the Kernel" in Chapter 1, "Setting Up a System", for help with this T500 problem. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||