NFS Data Source On HP-UX.
NFS Data Source On HP-UX.
Read more...
This tutorial is all about configuring a NFS datasource on HP-UX. In NFS the data is stored in a centralised server, you just need to mount the nfs filesystem from a system in the network and access the data. Here is step by step method of configuring a nfs datasource.
Here by node i mean a system. Suppose we have 3 systems (all HP-UX systems) -- one nfs server and 2 nodes in the network from which I will access data on the nfs server. First create a directory on the nfs server (shared directory say "base") and a directory on each the nodes (mount directory say "mount"). Go to /etc/dfs. There is a file called dfstab. Open the file in vi editor and add the following line and save it:-
Syntax: share -F nfs -o rw -d “shared directory” /shared directory
Eg: share -F nfs -o rw -d “base” /base.
The file is read only so we have to change the permissions to read/write using the command:-
Command:- chmod 755 /etc/dfs/dfstab.
Now we have to stop and start the nfs service on the server for the changes to take effect. Go to the nfs server and type the following commands.
Stopping the server:- Command:- /sbin/init.d/nfs.server stop.
Starting the server:- Command:- /sbin/init.d/nfs.server start.
Now mount the datasource from the node from which you want to access data on the server.
Syntax:- mount -F nfs :/shared directory /mount directory.
Eg:- mount -F nfs 10.168.0.70:/base /mount.
Just type "mount" and you can see it mounted. Once you mount the mount directory you can access data in the shared directory on the nfs server. If you want to access data from the other node you have unmount the directory here and similarly mount it from the other node.
Here by node i mean a system. Suppose we have 3 systems (all HP-UX systems) -- one nfs server and 2 nodes in the network from which I will access data on the nfs server. First create a directory on the nfs server (shared directory say "base") and a directory on each the nodes (mount directory say "mount"). Go to /etc/dfs. There is a file called dfstab. Open the file in vi editor and add the following line and save it:-
Syntax: share -F nfs -o rw -d “shared directory” /shared directory
Eg: share -F nfs -o rw -d “base” /base.
The file is read only so we have to change the permissions to read/write using the command:-
Command:- chmod 755 /etc/dfs/dfstab.
Now we have to stop and start the nfs service on the server for the changes to take effect. Go to the nfs server and type the following commands.
Stopping the server:- Command:- /sbin/init.d/nfs.server stop.
Starting the server:- Command:- /sbin/init.d/nfs.server start.
Now mount the datasource from the node from which you want to access data on the server.
Syntax:- mount -F nfs :/shared directory /mount directory.
Eg:- mount -F nfs 10.168.0.70:/base /mount.
Just type "mount" and you can see it mounted. Once you mount the mount directory you can access data in the shared directory on the nfs server. If you want to access data from the other node you have unmount the directory here and similarly mount it from the other node.