Tanti Technology

My photo
Bangalore, karnataka, India
Multi-platform UNIX systems consultant and administrator in mutualized and virtualized environments I have 4.5+ years experience in AIX system Administration field. This site will be helpful for system administrator in their day to day activities.Your comments on posts are welcome.This blog is all about IBM AIX Unix flavour. This blog will be used by System admins who will be using AIX in their work life. It can also be used for those newbies who want to get certifications in AIX Administration. This blog will be updated frequently to help the system admins and other new learners. DISCLAIMER: Please note that blog owner takes no responsibility of any kind for any type of data loss or damage by trying any of the command/method mentioned in this blog. You may use the commands/method/scripts on your own responsibility. If you find something useful, a comment would be appreciated to let other viewers also know that the solution/method work(ed) for you.

Sunday, 26 June 2011

NFS

NFS

AIX - Network - Assign IP address to NIC

Assign IP address to NIC

Using mktcpip or smitty tcpip command we can assign IP address to NIC

#smitty tcpip

It will ask following details

Hostname –
IP address –
Subnet mask –
DNS server –
DNS Server name –
Gateway –
#
Or
#ifconfig en0 inet 192.168.1.1 netmask 255.255.255.0 up (Configure en0 starts Immediately)


After finishing this process ip address assigned to NIC

Or

We can assign one more IP address to same network card

#ifconfig en0 192.168.1.33 alias (adding alias IP to en0)
#ifconfig –en0 192 168.1.33 –alias (Removing alias IP from en0)
AIX - Network - Check status of the NIC
AIX - Network - Check status of the NIC

Using ifconfig command we can check the status of the NIC
#ifconfig –a (To show status of all network interfaces for IP)
AIX - Network - Check the Network Statistics
AIX - Network - Check the Network Statistics


Using netstat command we can check the network statistics

#netstat –a (To show the state of all sockets)

#netstat –c (To show the network buffers cache)

#netstat –D (To show the net drops of packets)

#netstat –i (To display interface statistics)

#netstat –rn (To show routing table – ip will be given instead of host names)

#netstat –s (To show statistics of the protocols)


AIX - Network - Clear Gateway

Using route command we can clear the gateway

#route –f (To clear the gateway)

AIX - Network - Disable IP address

Using ifconfig command we can disable the IP address
#ifconfig en0 down (Turns off network card en0)
Enable IP address

#ifconfig en0 up (Turns on network card en0)

AIX - Network - NIC Configuration

Using cfgmrg command we can configure to server

Cfgmgr command is device management related command. If we want to install new network card, first we should connect network in server. While booting the server boot process is starting the cfgmrg, so that time network card will be installed in server.

We have installed Ethernet card 1.

That Ethernet card is divided into three parts

Ent0 – Physical adapter
En0 – Logical name
Et0 – Architecture of the card (802.3)

Or

Using mkinet command we can install the NIC

AIX - Network - Remove IP Address

Using ifconfig command we can remove network interface from network list
#ifconfig en0 detach (Removes en0 card from the network interface list)




AIX - Network - Trace Host

Using traceroute command we can trace the route to the host

#traceroute ServerA (To trace the route to ServerA)


AIX - Network -Changing the HOST Name

Using hostname command we can change the host name

#hostname (It will display existing host name)
ServerA

#hostname ServerB

#hostname ServerB

ServerA host name is changed to ServerB
Or
Using chdev command to change the hostname for inet0

#chdev –l inet0 –a hostname=ServerB


AIX - Network -Check the NIC device status

#entstat en0 (To display the status of Ethernet device en0)
#entstat –d en0 (To display detailed information about Ethernet device en0)
Posted by Pa
AIX - NFS (Network File System)

In this NFS we can share the file systems from server to clients, across the network, using some nfs related commands we can configure the NFS in server end and client end. So clients can access the server mounted files systems through network, with specified permissions, such as read only, read write.

NOTE:
Before configuring the NFS, U should check the /etc/hosts file entry, and NFS daemons and all the nfs daemon subsystems.

--- nfsd, rpc.mountd subsystems is running on server end.

--- rpc.statd, rpc.lockd, rpc.mountd subsystems running on client end


AIX - NFS - Changing Exported File System Permissions

Using chnfsexp command we can change the permission for exported file systems

#smitty chnfsexp

One smitty screen will appear, and then you specify the permission and configure the file system.
AIX - NFS - Client End

Then we should import the file system to client end.

5. Import
6. List the imported file systems
7. Remove the imported file systems



AIX - NFS - Export file system

Using smitty mknfsexp command we can export the file system

#smitty mknfsexp

One window will appear then you have to put the configuration

a. File system name (what file system you want to export i.e. /usr)

b. Specify the target host name (destination host name i.e. serverB)
If this box is empty, then this exporting file system is allowed to all the clients.

c. Specify the access permissions (Read only, Read write)

d. Host allowed root access (Source Server name, ServerA)

e. Then press enter button to execute the above configuration finally result will be OK, if you got OK output then your configurations are exported properly. If you got FAILED error message then you have to check the configuration.

NOTE: After exporting the file system, that exported file system will be added in /etc/exports, and /etc/xtab because while boot process, server is checking exported file systems from above files, if entry found in the above file then file system are exporting on boot process.
AIX - NFS - Import File Systems

Using smitty mknfsmnt command we can import the file system.

#smitty mknfsmnt

One smitty configuration screen will appear then you have to specify the following things.

a. specify the path name of mount point (client end mount point by default /mnt will be available or we have to create directory and we can specify that directory name to mount the file system /mnt)

b. Specify the path name of remote directory (This is server file system name i.e. /usr, which file system was exported by server)

c. Host where remote directory resides (This is exporting source server name i.e. ServerA)

d. Mount type name (Specify the file system type jfs2)

e. Then press enter button to execute the above configuration, finally it will exported


AIX - NFS - List Exported File System

Using lsnfsexp command we can list the exported file system

#lsnfsexp

/usr – rw

AIX - NFS - List Imported Files System

Using mount command we can check the imported file system status.

#mount

Above command is used to display the mounted file system information along with file system type, if nfs mounted file system available then it will show file system type name nfs so easily we can identify which nfs mounted file system.



AIX - NFS - Remove Exported File System

Using smitty rmnfsexp command we can remove the exported file system

#smitty rmnfsexp

One smitty screen will appear, and then you press Esc+4, it will check and shows what are the file systems are exported. Then you can remove the exported file system.

After this command execution, list the exported file system using command lsnfsexp, now removed file systems is not listed.

NOTE: while removing the file system, the file system entry removed from /etc/exports and /etc/xtab

AIX - NFS - Remove Imported File System

Using smitty rmnfsmnt command we can remove the mounted file system from client end.
#smitty rmnfsmnt

Then one smitty screen will appear. Specify the mounted file system name or press Esc+4 keys, for system analyze and show the mount file system, then you mention from the list also. After this command execution, which mounted file system will be removed from the client PC. Now you put mount command, that removed file system is not listed.

Like this we can export and import the network file system.

AIX - NFS - Server End Activities

Server End

First we should export the file system from server end.

1. Export
2. List the exported file systems
3. Remove the exported file systems
4. Change the exported file system permissions

No comments:

Post a Comment