Tuesday, January 19, 2016

How to deal with NIM concepts and interview questions?

How to deal with NIM concepts and interview questions?



Filesets Required

   bos.sysmgt.nim.master
   bos.sysmgt.nim.spot

nimd and nimesis – daemon will get started. Else restart the inetd / start the above daemons 
startsrc –g inetd
startsrc –s nimd/ nimesis


Daemons Required:

a) bootp protocol (BOOTPD)
   This is the initial communication made between NIM master and client during network boot.

b) Trivial File Transfer Protocol (TFTPD)
  It is used to transfer lppsource,SPOT and other resources from NIM server to NIM client during the NIM client booting.


Check the services are running,

#lssrc -ls inetd
bootps    /usr/sbin/bootpd   bootpd /etc/bootptab     active
tftp         /usr/sbin/tftpd        tftpd -n                    active

#grep bootps /etc/services
bootps                  67/tcp          # Bootstrap Protocol Server
bootps                  67/udp        # Bootstrap Protocol Server

#grep tftp /etc/services
tftp                    69/udp          # Trivial File Transfer
tftp                    69/tcp          # Trivial File Transfer

If the above services are not enabled, start the same.

#chubserver -v bootp -p udp -a
#chubserver -v tftpd  -p udp -a
#refresh -s inetd
#startsrc -g nfs  (Also, ensure NFS group related services are  also enabled.)



Important Directories and Files

a) /tftpboot

     When we create SPOT, kernel is copied into /tftpboot directory . All kernles of NIM clients are in the direcotry
root@aixnim1: /etc # ls -l /tftpboot
lrwxrwxrwx    1 root     system           34 Dec 19 18:36 aix21.domain.com -> /tftpboot/spot_5200-08.chrp.mp.ent
-rw-r--r--    1 root     system         1276 Dec 19 18:36 aix21.domain.com.info
-rw-r--r--    1 root     system      9379964 Dec  8 15:31 spot_5200-08.chrp.64.ent
-rw-r--r--    1 root     system      9260943 Dec  8 15:31 spot_5200-08.chrp.mp.ent


b) /etc/bootptab

      File which authenticate nim client for remote boot up for nim operations like bos installation, restoration & maintenance boot. Based on the NIM operation, nim client info update and once the NIM operation completed, entry also removed automatically from this file.
      In simple words, authenticates NIM client for remote boot up.

#tail /etc/bootptab
aix21.domain.com:bf=/tftpboot/aix21.domain.com:ip=10.200.50.56:ht=ethernet:sa=50.20.100.48:gw=10.200.50.1:sm=255.255.255.0:
The fields are separated with colon (:) and attributes are separated with equal sign (=):
    first field  - NIM client name
           bf       - boot file name
           ip       - NIM client IP address
           ht       - hardware type
          sa       - TFTP server address for the boot file
          gw      - gateway used by client to reach the server
          sm      - subnet mask for the nim client


c) /etc/niminfo

       The file always exists on the NIM master and client. contains information about who is master and client, port no, protocol informations.

        This is automatically generated when master was created and client was registered to master. This file was not manually edited. If any corrupted, want to be removed and recreated.



How to define the client:     #smitty nim_mkmac

How to define the resource:   #smitty nim_mkres

How to initiate the installation:   #smitty nim_bosinst

How to Rebuild on Master:     #nimconfig -r

How to Rebuild on Client:   #nimint -a master=<MASTER_HOSTNAME> -a name=CLIENT_NIM_NAME>



 if you happy with the above content, please leave your reactions/comments below.

How to install Instfix,APAR,PTF,TL in aix?

How to install Instfix,APAR,PTF,TL in aix?


Instfix/APAR

# instfix -k <fix> -d <directory>


To install filesets

#installp -acgx -d <directory>
or
#smitty installp


To install PTF

#smitty install_all


INPUT device / directory for software               <PTF dir> 
  SOFTWARE to install                                [ all ] 
  PREVIEW only? (install operation will NOT occur)    no 
  COMMIT software updates?                            yes 
  SAVE replaced files?                                no 
  AUTOMATICALLY install requisite software?           yes 
  EXTEND file systems if space needed?                yes 
  OVERWRITE same or newer versions?                   no 
  VERIFY install and check file sizes?                no 
  DETAILED output?                                    no 
  Process multiple volumes?                           yes 
  ACCEPT new license agreements?                      no 
  Preview new LICENSE agreements?                     no 


To upgrade Technology level

#smitty update_all



If you find the above content useful, Please leave your comments and reactions below.

How to deal with Instfix in aix?

How to deal with Instfix in aix?


Check the current technology level
instfix -i | grep ML
Determine the missing filesets
instfix -icqk <ML LEVEL> | grep :-: 
To check particular APAR installed
instfix -ik <fix>
To check more info about particular APAR installed
instfix -aik <fix>
To see a list of fix on a directory
instfix -Td <directory path>
To see a list of filesets included in a APAR
instfix -ivk <fix>
To find out the APAR through filesets
instfix –aiv | grep –p <fileset>:<level>
To install a fix from a directory
instfix -k <fix> -d <directory>
To install a fix using smitty
smitty update_by_fix


if you happy with the above content, please leave your comments / reactions below.


Sunday, December 13, 2015

How to export and mount the nfs filesystem in aix?

How to export and mount the nfs filesystem in aix?


1. Ground work:
We need the below information in hand and confirm the required deamon status.
            ü  Nfs Server name
            ü  Exported directory
            ü  Nfs Client name
            ü  Nfs local mount point name.
            ü  check showmount -e  --> To confirm the exported directory list.
            ü  showmount -a  --> To confirm the list of nfs client server names.

Server Side Configuration: Start the NFS and portmap daemon

# lslpp –L | grep bos.net*  --> Check the nfs server and client installed.
# startsrc –g nfs  --> start the nfs group deamon
# startsrc -s nfsd   --> start the nfsd deamon
# startsrc -s mountd  --> start the mountd deamon
# lssrc -g nfs  --> check the nfs group deamon in active state
# lssrc -s  nfsd  --> Check the nfsd deamon
# lssrc -s mountd  --> check the mountd deamon

•   Client Side Configuration:      Start the NFS and portmap daemon

# lslpp –L | grep bos.net*  --> Check the nfs server and client installed
# startsrc –g nfs   --> start the nfs group deamon
# startsrc –s portmap  --> start the portmap deamon.
# lssrc -s nfsd  --> check the nfs group deamon in active state
# lssrc -s portmap  --> Check the protmap deamon in active state.
# lssrc -s biod   --> Check the biod deamon in active state.


2. Exporting an NFS filesystem

Using Smitty:
# ls -l /etc/exports  --> Check exports file exits.
# cp -p /etc/exports /etc/exports_bak   --> Take the backup of the exports file.
# smitty mknfsexp  --> Exporting the nfs filesystem.
            Specify appropriate values in the PATHNAME of directory to export
             MODE to export directory,
            EXPORT directory now, system restart or both fields.
# cat /etc/exports  --> To confirm the exported directory are present on the /etc/exports.

Using Command line:

# cp -p /etc/exports /etc/exports_bak   --> Take the backup of the exports file.
# vi /etc/exports  --> To Create an entry for each directory to be exported, using the full path name of the directory.
# exportfs -a  --> To read the /etc/exports file and exports all the directories listed.
# showmount -e  --> To confirm the exported directory listed.
# showmount -a  --> To confirm the nfs client name and directory list.


3. Mounting the NFS filesystem on the client.

Using Smitty:
# showmount -e <server_name>  --> To verify the NFS server has exported the directory.
# mkdir /local_directory    --> To create the mounting directory if not already exist.
#  smitty mknfsmnt  --> mount the NFS filesystem.
            PATHNAME of mount point.
            PATHNAME of remote directory.
            HOST where remote directory resides.
            MOUNT now, add entry to /etc/filesystems or both?
            /etc/filesystems entry will mount the directory on system RESTART.
            MODE for this NFS file system.
 #df -gt <NFS mount_name>  --> To confirm the nfs filesystem has been mounted

Using Command line:
# showmount -e <server_name>  --> To verify the NFS server has exported the directory.
# mkdir /local_directory    --> To create the mounting directory if not already exist.
# mount ServerName:/remote/directory /local/directory 
 #df -gt <NFS mount_name>  --> To confirm the nfs filesystem has been mounted



4. Roll back

Unexporting the NFS filesystem on the NFS server

Using Smitty:

Login to the NFS server and follw the below procedure.
# cp -p /etc/exports  --> To copy the exports directory.
# smitty rmnfsexp  --> To unexport the nfs directory.

Using command line:
# vi /etc/exports --> To Find the entry for the directory you wish to unexport, and the delete that line.
# cat /etc/exports   --> To check the directory now is removed and unexported.
If NFS is current running,
#exportfs -u <directory_name  --> where dirname is the full path name of the directory you just deleted from the /etc/exports file.


Removing the NFS mount on the NFS client server.

Using Smitty:
#smitty rmnfsmnt
# cat /etc/filesystems  --> To confirm the entry has been deleted properly.

Using command line:
#umount <directoryname>   --> To unmount the directory.
# cp -p /etc/filesystems /etc/filesystems_bak   --> To take the backup of the /etc/filesytems file.
# vi /etc/filesystems  --> Find the entry for the directory you just unmounted, and then delete it.
# cat /etc/filesystems  --> To confirm the entry for the directory you just unmounted properly.


Note: If you happy about the above article, please leave your comments / Reactions.

Thursday, December 10, 2015

How to calculate PP size in aix?

How to calculate PP size in aix?


If you dont specify the PP size during the creation of volume group, AIX will take default size. However we can identify the PP size within a second once we understand the concept. 

In aix, the pp size is calculating based on the size of the disks. AIX can use the specific numbers as the PP size. and the pp size is the constant one.. which means it should be in any one of the below numbers.

1, 2, 4, 8, 16, 32, 64,128,512,1024, (MB).

If the disk size is exactly 2 then the PP size would be 2MB
If the disk size is exactly 4 then the PP size would be 4MB
If the disk size is exactly 8 then the PP size would be 8MB
.like wise we can get to know if the disk size is exactly 16,32,64,128,256,512,1024 GB then the pp size is 16MB, 32MB, 64MB, 128MB, 256MB, 512MB, 1024MB respectively.
.

If the disk size is between 4GB < 8GB then the pp size is 8MB (Greater than 4  GB & less than 8GB)
If the disk size is between 8GB < 16GB then the pp size is 16MB.(Greater than 8  GB & less than 16GB)
Please see the below diagram for the rest of the disk size and its pp size.

if the disk size is 20 GB then what would be the pp size?
The disk size is 20GB which lies between 16GB - 32GB, so the pp size is 32MB.
(The pp size should not be 16MB as the disk size is more than 16GB, so the next PP size is 32, so the system would take 32MB)

Now i am going to ask you one questioin... If the disk size is 132 GB, tell me what is the pp size? 
  Yes, you are correct, the pp size is 256 MB.

Note: Always remember the pp size should be any one of the below numbers for normal & big vg.
1,2,4,8,16,32,64,128,256,1024.


Original and Big Volume Groups
hdisk size between:Default PP Size
1MB - 1,016MB1 MB
1,016MB - 2,032MB2 MB
2,032MB - 4,064MB4 MB
4,064MB - 8,128MB8 MB
8,128MB - 16,256MB16 MB
16,256MB - 32,512MB32 MB
32,512MB - 65,024MB64 MB
65,024MB - 130,048MB128 MB
130,048MB - 260,096MB256 MB
260,096MB - 520,192MB512 MB
520,192MB - 1,040,384MB1,024 MB

Scalable Volume Groups
hdisk size between:Default PP Size
1MB - 2,040MB1 MB
2,040MB - 4,080MB2 MB
4,080MB - 8,160MB4 MB
8,160MB - 16,320MB8 MB
16,320MB - 32,640MB16 MB
32,640MB - 65,280MB32 MB
65,280MB - 130,560MB64 MB
130,560MB - 261,120MB128 MB
261,120MB - 522,240MB256 MB
522,240MB - 1,044,480MB512 MB
1,044,480MB - 2,088,960MB1,024 MB
2,088,960MB - 4,177,920MB2,048 MB
4,177,920MB - 8,355,840MB4,096 MB
8,355,840MB - 16,711,680MB8,192 MB
16,711,680MB - 33,423,360MB16,384 MB
33,423,360MB - 66,846,720MB32,768 MB
66,846,720MB - 133,693,440MB65,536 MB
133,693,440MB - 267,386,880MB131,072 MB

Monday, September 14, 2015

How to deal with network commands in aix?


How to deal with network commands in aix?




Description
Command
List out all connections
netstat -a
To list out only tcp connections
netstat -at
To list out only udp connections
netstat -au
To disable reverse dns lookup
netstat -ant
To list out only listening connection
netstat -tnl
To list process/user id of listening connection
netstat -nlpt
To list out statistics of all packet 
netstat -s
To display kernel routing info
netstat -rn
To print out network interface
netstat -i
To Detailed info of network interface
netstat -ie
To get netstat continuous output
netstat -ct
To display the multicast group info
netstat -g







If you happy with the above aritcle, please leave your reactions.. (It will take less than a second )