Friday, November 18, 2022

Script for enabling failed vscsi and fscsi path on AIX client .

 Hello All,


Today will share small script which tested and used for enabling failed path on AIX client LPAR.

sometime AIX admin needs to take reboot of VIO server for maintenance activity, when AIX admin reboot 1 VIO server out of 2 then 1 VSCSI or FSCSI path become failed. once VIO is up and active sometime AIX admin observe that after VIO up some path still in failed state. AIX admin can try following script to enable those path


Scenario: Script to enable only failed path


for s in `lspath |grep -i failed|awk '{print $2}'`

do

chpath -l $s -p `lspath -l $s |grep -i failed|awk '{print $3}'` -s Enabled

sleep 2

done


To confirm whether any path on VIO server is failed or not


#lspath |grep -i failed


Thanks  !!!


:)




Saturday, November 12, 2022

Run perfpmr on AIX to provide performance data from AIX server.

 Sometime AIX admin needs to provide AIX LPAR performance data to support for analysis,

this data generally required when there is performance issue on AIX LPAR.

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


perfpmr data accurate and effective when AIX admin run during problem window or when problem exists.

IBM support provide script of perfpmr AIX admin must run script which is valid according to version of AIX operating system


steps to run perfpmr on AIX

-----------------------------------

step 1:

OBTAINING THE PACKAGE

          
           From the internet:

           ==================
           'ftp://ftp.software.ibm.com/aix/tools/perftools/perfpmr'




     configure "perfpmr" 1st time 


          once following file downloaded and placed on temporary location on AIX LPAR ,follow following procedure,
          'perf71.tar.Z'.

         login as root 


          create perf71 directory inside /tmp  and move tar file to that directory 

             # mkdir /tmp/perf71
             # cd /tmp/perf71



          c. extract the shell scripts out of the compressed
               tar file:

             # zcat /tmp/perf71.tar.Z | tar -xvf -


Step 2:

Create following directory

# mkdir /tmp/perfdata
# cd /tmp/perfdata

and run following script to start perfpmr and make sure that following script executed from "/tmp/perfdata" path only. if he execute in any other path all data will be collected there.

#nohup /tmp/perf71/perfpmr.sh 600 &


it will run command in background for 600 seconds, for 10 minutes

AIX Admin can monitor this by 

#tail -f nohup.out 


once from nohup.out AIX admin confirm that perfpmr completed ,admin can convert that directory to pax.gz by following command

#cd /tmp

#ls -ld perfdata

#pax -xpax -vw perfdata | gzip -c > pmr#.pax.gz


once file is genrated send that file to IBM support for analysis.



Thanks

.



split command Unix AIX

split command Unix AIX

AIX split command is useful when larg size "snap" file genrated and AIX admin unable to upload it on IBM ecurep portal because of file upload size restriction on company environment.

AIX admin can split file by using following command.

#split -b  size_of _file large_size_file_name

---size of file  ,  Here AIX admin mention 10th of the size of file, displayed by ls -l command
---large_size_file_name--- Mention file name which AIX admin wanted to split.


after above split command execution following 3 file will get generated,

xaa
xab
xac

AIX admin upload these files to ecurep portal.

this way AIX admin split large size file in 3 part and reduce size. this will help to bypass restriction of larg file upload


Thanks !!!!!

iptrace run on AIX client and server

 Execute IPtrace on AIX Server and client for IBM support.

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



AIX NFS client command

#startsrc -s iptrace -a "-a -bd server IP /tmp/iptracefile.client.raw"

AIX NFS server command

#startsrc -s iptrace -a "-a -bd Client IP /tmp/iptracefile.client.raw"


When AIX admin run iptrace for certain time period ,admin can stop iptrace using following command

stopsrc -s iptrace // for stopping on client and server




Thanks


Saturday, October 22, 2022

Extended grep use and example on UNIX and AIX server

 How AIX and UNIX admin use extended grep with example.

----------------------------------------------------------------------------

AIX and UNIX

Lets observe following example where AIX admin wanted to check path of  storage disk.

#lspath |grep -w "hdisk2"

#lspath |grep -w "hdisk3"

#lspath |grep -w "hdisk4"

Instead of typing above single command for getting path details, AIX admin can use following extended grep.


#lspath |grep -E " hdisk2 |hdisk 3 |hdisk4"

above command will display path information for hdisk2 ,hdisk3 and hdisk4.






Thanks !!!!!

Friday, October 14, 2022

Move resource group from one node to other using clRGmove command

Move resource group from one node to other AIX hacmp
-------------------------------------------------------------------------
AIX admin also use command to move RG,like below

clRGmove -g <RG> -n  <node> -m

<RG> --This is resource group name
-n  --This is for node name is HACMP cluster

After RG movement completed successfully use following command to confirm if resource group movement completed successfully.

#clRGinfo
#lssrc -ls clstrmgrES |grep -i state   // To check cluster state

Always Take cluster snapshot before doing any criticle activity, also make sure that admin have all pre-chek and mksysb.

How to move resource group using smitty menu
--------------------------------------------

smitty hacmp

                    HACMP for AIX

Move cursor to desired item and press Enter.

  Initialization and Standard Configuration
  Extended Configuration
  System Management (C-SPOC)
  Problem Determination Tools

Select "System Management"

----------------------------------------------------------------------------------------------------------------

         System Management (C-SPOC)

Move cursor to desired item and press Enter.

  Manage HACMP Services
  HACMP Communication Interface Management
  HACMP Resource Group and Application Management
  
  
  Open a SMIT Session on a Node

Select "HACMP Resource Group and Application Management"

----------------------------------------------------------------------------------------------------------------

          HACMP Resource Group and Application Management

Move cursor to desired item and press Enter.

  Show the Current State of Applications and Resource Groups
  Bring a Resource Group Online
  Bring a Resource Group Offline
  Move a Resource Group to Another Node / Site

  Suspend/Resume Application Monitoring
  Application Availability Analysis

Select "Move a Resource Group to Another Node / Site"

----------------------------------------------------------------------------------------------------------------

           Move a Resource Group to Another Node / Site

Move cursor to desired item and press Enter.

  Move Resource Groups to Another Node
  Move Resource Groups to Another Site

Select "Move Resource Groups to Another Node"

----------------------------------------------------------------------------------------------------------------

		   Select a Resource Group                      
                                                                         
 Move cursor to desired item and press Enter.                             
                                                                          
   #                                                                      
   # Resource Group                State                Node(s) / Site    
   #                                                                      
     app_rg                       ONLINE                node1 /         
     data_rg                      ONLINE                node2 /        
                                                                          
   

Select the resource group to be moved.

----------------------------------------------------------------------------------------------------------------

		   Select a Destination Node                         
                                                                          
  Move cursor to desired item and press Enter.                             
                                                                                                 
    # *Denotes Originally Configured Highest Priority Node                 
      node2   
      

Select a destination node.

----------------------------------------------------------------------------------------------------------------

         Move Resource Group(s) to Another Node

Type or select values in entry fields.
Press Enter AFTER making all desired changes.

                                                        [Entry Fields]
  Resource Group(s) to be Moved                       app_rg
  Destination Node                                    node2

Confirm the entry fields are correct and press Enter

----------------------------------------------------------------------------------------------------------------

  Command: OK            stdout: yes           stderr: no

Before command completion, additional instructions may appear below.

Attempting to move resource group app_rg to node node2.

Waiting for the cluster to process the resource group movement request....

Waiting for the cluster to stabilize........................................

Resource group movement successful.
Resource group app_rg is online on node2.


Cluster Name: node2

Resource Group Name: app_rg
Node                         State
---------------------------- ---------------
node2                       ONLINE
node1                       OFFLINE

Resource Group Name: data_rg
Node                         State
---------------------------- ---------------
node2                       OFFLINE
node1                       ONLINE

----------------------------------------------------------------------------------------------------------------



Thanks !!!!

Shutdown service on GPFS node

 GPFS on AIX

------------------------------------------------------

On GPFS node sometime AIX admin need to stop GPFS on  that specific node.

command for that is:


mmshutdown -N nodename //stop gpfs service on only specific node

mmshutdown -a //it will stop GPFS on all node of cluster

mmgetstate -aLs //show status of GPFS cluster,generally use for GPFS cluster health check

mmstartup -a //It will start GPFS on all cluster node