Saturday, July 16, 2016

How to create a filesystem in hacmp cluster in aix?

How to create a filesystem in hacmp cluster in aix?


1. Ground work:

#lslpp -l|grep -i cluster.es.server.rte     --> To check the current version of the cluster
#clRGinfo                            --> Check if the RG is online status.
#cllsvg               --> check the cluster volume group names
#lsvg -o              --> check the active volume group.
#lsvg <volume group>    --> To check the free space of the VG where you create FS.
#lsrsrc -ls clstrmgrES     --> To check the cluster is stable on both nodes.


2. Implementation steps

#smitty hacmp
     system management (c-spoc)
         HACMP logical volume management
             shared filesystem
                Enhance journal file systems
                  Add an Enhanced journal file systems
                     (Select the VG where we need to create a filesystem)
                        (update the name of the FS (like abcdFS) and size of theFS)
                                    Press Enter

Note: The filesystem get mounted once it gets created
#lsvg -l <volume group>      --> Check and confirm the filesystem created
The filesystem will be added by hacmp on the secondary node
Check the directory on the secondary node:  #ls -ld /abcdFS

3. Validation

#df -gt /abcdFS    --> To confirm the version has been upgraded.



Friday, July 15, 2016

How to upgrade HACMP version in aix?

How to upgrade HACMP - Cluster version in aix?


1. Ground work:

#lslpp -l|grep -i cluster.es.server.rte     --> To check the current version of the cluster
#./clRGinfo                            --> Check if the RG is online status.
#lssrc -ls clstrmgrES               --> check if the cluster manager is stable on both nodes
#smitty hacmp ->
    Extended configuration
      snapshot configuration
        Create a snapshot of the cluster configuration  (Mandatory -snap name and description)
             output: .info and .odm file created (Required this for restoration)

#/var/hacmp/clverify/clverify.log   --> check clverify has no errors
#emgr -l                                          --> Check if the emergency fixes there on the server
#emgr -rL                                          --> To remove the emergency fix.
Check Download the hacmp upgrade filesets from fixcentral and save it in rootvg directory.

2. Implementation steps

Stop the cluster services on both the nodes.
#lssrc -ls clstrmgrES                    --> check if the cluster manager is st_stable on both nodes
#smitty hacmp
     system management (c-spoc)
         manage hacmp services
             stop cluster services  (now, select node/noes and bring resource groups offline)

#lssrc -ls clstrmgrES                    --> Now the cluster manager demon should be ST_INIT
#lslpp -l|grep -i cluster.es.server.rte   --> To check the current version of hacmp
#cd <package_located directory>
#smitty update_all        -- > Do the preview first and commit next, once done follow below
#lslpp -l|grep -i cluster.es.server.rte    --> To confirm the version has been upgraded.
Reboot the node and perform the upgrade on the other node.
#smitty hacmp
     system management (c-spoc)
         manage hacmp services
             start cluster services  (now, select node/node names, automatically)

#/tmp/hacmp.out                      --> To check any error and warnings


3. Validation

#lslpp -l|grep -i cluster.es.server.rte    --> To confirm the version has been upgraded.
#lppchk –v                                           --> No output should displayed, only the prompt
#./clRGinfo                                         --> To check the RG is online as before.
#lssrc -ls clstrmgrES                            --> To check if the cluster manager is stable (ST_Stable)



Tuesday, July 12, 2016

How to capture the screen into the file in aix?

How to capture the screen into the file in aix?


Being as a system admin, whenever you are doing the task, you copy the screen and paste it on your notepad for your future reference.  Instead of notepad, you can save it on the server itself using the "script" command

#script

The output file name is "typescript"

so whatever you type on the screen is copied into typescript file.

To stop this script command, press ctrl+D and press enter

Now you check the file, you can see the output of your screen.







How to stop and start the error demon in aix?

How to stop and start the error demon in aix?


To stop the error demon:  #/usr/lib/errstop
To start the error demon: # /usr/lib/errdemon
For checking the errlog, we need to initiate the test logger
#errlogger "test"
#errpt   ---> you can see the test logger on the errpt

If the errpt corrupted, please follow the below.

 Delete the error log file   #rm /var/adm/ras/errlog
Stop the error demon:      # /usr/lib/errstop
Start the error demon:      #/usr/lib/errdemon   (When starting the errdemon, it will automatically creates the errlog files.






Sunday, July 10, 2016

How to troubleshoot disk related issues in aix?

How to troubleshoot disk related issues in aix?



If the disk is local disk, then please execute the below commands to troubleshoot the issue.


Commands
 Explanation
# lspv
To list the disk details
# lsvg -p <vg_name>
To check the vg whether it is in missing state
# varyonvg <vg_name>
To bring disk from missing to active
# errpt 
To check the error details
# errpt -N hdiskX
To check the error details for the particular disk.
# errpt -aj <identifier>
To check the detailed error output of disk
# lquerypv -h /dev/hdiskX
The output should not be all zero


if the issues found, then log a case with IBM and replace the disk.

-========================================================================


If the disk is virtual which is provided by VIOS , then please execute the below commands to troubleshoot the issue.


Commands
Explanation
# lspv
To list the disk details
# lsdev -Cc disk
To check whether the disk is local,virtual
# errpt
To check the error details
# errpt -N hdiskX
To check the error details for the particular disk.
# lspath
To check paths that is is single/dual path
# lscfg -vpl hdiskX
To get the C# of the disk (example: C110)
Execute below cmd on VIO 
# lsdev -slots|grep -i CXX
To identify the vhost details corresponding to the disk on the lpar
# lsmap -all|grep -p vhostX
To get the disk details corresponding to the disk on the lpar
# errpt
To check the error details (execute on aix prompt)
# errpt -N hdiskX
To check error details for particular disk.(execute on aix prompt)
# errpt -aj <identifier> 
To check the detailed error output of disk. (execute on aix prompt)

if the issues found, then log a case with IBM and replace the disk.


======================================================================


If the disk is provided by any other storage,  then please execute the below commands to troubleshoot the issue.



Commands
Explanation
# lsdev -Cc
To check the disk is local/virtual/storage
# lsdev -Cl hdiskX -F parent
To identify the parent of the hard disk
# lsdev -Cl fscsiX -F parent
To identify the fcs details.
# fcstat fcsX
To check the FC card details
# fcstat fcsX|awk '/Transmit/,/Words/'  
if the data transfer and send is not changing 
-then we have connectivity problem


if everything seems to be normal up on fcs, the problem should be on the storage side.. pass it to storage team.






How to troubleshoot network related issues?

How to troubleshoot network related issues?


The below commands are very useful when you troubleshoot any network related issues.


Commands
         Explanation
# errpt   
To Check the errpt error
# errpt|more   
To check the error
# errpt -aj <identifier>  
To Check the detailed error
# lsdev -Cc adapter
To Check the adapter device details
# entstat ethX    
To check the ethernet statistics
# netstat -v      
To check the detailed output of ethernet card
# netstat -v|grep -E "ETHERNET|Adapter|Errors|State"   
To check the errors with detailed output
# netstat -v|grep -E "ETHERNET|Adapter|State"   
To check the detailed output
# netstat -v|grep -E "ETHERNET|Device|State"    
To check the link status and state.