Exporting and mounting file systems on Linux and HP-UX
If you want to use a shared file system on Linux® and HP-UX systems, you must export it from the system where it is located and mount it on every system on which you want to access it.
You must be logged on as root.
To export and mount file systems on Linux and HP-UX systems, complete these steps:
- Export a file system on Linux and HP-UX systems.
- Add the file system that you want to export to the file ⁄etc⁄exports.
- Export all entries in the file ⁄etc⁄exports by entering the command ⁄usr⁄sbin⁄exportfs -a.
- Verify that the file system is exported by entering the command ⁄usr⁄sbin⁄exportfs.
All shared file systems are displayed.
- Mount a file system on HP-UX and Linux systems.
- If the file system that you want to mount is remote, ensure you have the permission to mount it by entering the command⁄usr⁄sbin⁄showmount - e
where is the name of the remote operating system.
- Choose an empty file system that serves as the mount point for the file system that you want to mount.If an empty file system does not exist, create it by entering the command mkdir /
where is the name of the local file system.
- Mount the file system on your local system by entering the corresponding command.
- On HP-UX, enter the command/usr/sbin/mount -F nfs sourcehost:/sourcedir /destinationdir
- On Linux systems, enter the command/bin/mount -t nfs sourcehost:/sourcedir /destinationdir
where:
is the name of the remote operating system
is the name of the remote file system
is the name of the local file system
To mount the remote file system after each reboot, add it to the
/etc/fstab file.For a description of the file format of
/etc/fstab, enter the command
man fstab.
example fstab:
server:/mnt /mnt nfs rw,hard 0 0 #mount from server
No comments:
Post a Comment