Tuesday 3 September 2013

NFS SERVER SOLARIS HP-UX AIX



SOLARIS
Solaris 9 comes with an NFS server. The first step is to edit the /etc/dfs/dfstab file. We just added this entry: 

share -F nfs -o rw,root=nom-client/Ip -d "share" /share

Start the server: 

# svcadm enable svc:/network/nfs/server:default

Vérifier

# rpcinfo -p localhost | grep nfs
    100003    2   udp   2049  nfs
    100003    3   udp   2049  nfs
    100227    2   udp   2049  nfs_acl
    100227    3   udp   2049  nfs_acl
    100003    2   tcp   2049  nfs
    100003    3   tcp   2049  nfs
    100003    4   tcp   2049  nfs
    100227    2   tcp   2049  nfs_acl
    100227    3   tcp   2049  nfs_acl

On the client side: 

root@srv-1 u-1 # mount -t nfs nfs-serverIP:/share /share2
root@srv-1 u-1 # ls /share2


HP-UX
There is a file called dfstab. Open the file in vi editor and add the following line and save it.
1.Syntax:- share -F nfs -o rw -d “shared directory” /shared_directory
2.Prompt:/> 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:-
1.Prompt:/> 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.
To stop the NFS service type the following at the prompt.
1.Prompt:/> /sbin/init.d/nfs.server stop
To start the NFS service type the following at the prompt.
1.Prompt:/> /sbin/init.d/nfs.server start
Now mount the datasource from the node from which you want to access data on the server.
1.Syntax:- mount -F nfs server:/shared_directory /mount_directory
2.Prompt:/> 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 to unmount the directory here and similarly mount it from the other node.
AIX
Edit  /etc/exports (or create if not exist) and add folders to export:
/home/public -access=client1,root=client1
“access” option restrict access to client list,  root is allow to mount the share on client side

start nfsd service:
startsrc -s nfsd
startsrc -s mountd
 check if daemon are running:
Serveur_NFS_AIX # lssrc -s nfsd
Sous-système      Groupe           PID     Etat
 nfsd             nfs              36540   actif
Serveur_NFS_AIX # lssrc -s portmap
Sous-système      Groupe           PID     Etat
 portmap          portmap          3890    actif
Serveur_NFS_AIX # lssrc -s biod
Sous-système      Groupe           PID     Etat
 biod             nfs              6454    actif
 Export all folders
exportfs –a
 
All should be visible when executing  "exportfs" without option
 Check from client side if rpc service are available:
Client_NFS_Linux # rpcinfo -p $Server_IP | egrep "(mountd|nfs)"
    150001    1   udp  32773  pcnfsd
    150001    2   udp  32773  pcnfsd
    100003    2   udp   2049  nfs
    100003    3   udp   2049  nfs
    100003    2   tcp   2049  nfs
    100003    3   tcp   2049  nfs
    100005    1   udp  41863  mountd
    100005    2   udp  41863  mountd
    100005    3   udp  41863  mountd
    100005    1   tcp  41489  mountd
    100005    2   tcp  41489  mountd
    100005    3   tcp  41489  mountd
 the share should be available :
Client_NFS_Linux # showmount -e $IP_Serveur
Export list for $SERVER_IP:
/home/public (everyone)
 
How to mount the share :
 At aix server, I use command:
mount -o proto=udp <ip server nfs>:/mnt/testdataaixserver /mnt/testdatalinuxclient

No comments:

Post a Comment

HOWTO IMPORT OVA (from VMware) to PROXMOX 5.x

  HOWTO IMPORT OVA (from VMware) to PROXMOX 5.x         Hi All may be someone has faced to import an OVA (created with VMware) to PROX...