Monday, June 4, 2012

How to reset SDDPCM statistics on all devices

How to use pcmpath to reset error or all SDDPCM statistics on AIX?

Run this command:
pcmpath clear device `pcmpath query device | sort -n +2 | grep DEV | awk '{print $2}'| head -1` `pcmpath query device | sort -n +2 | grep DEV | awk '{print $2}'| tail -1` count error

Command can be executed by distributed shell on several hosts:
dsh -e path_to_script_with_command_above

Monday, May 28, 2012

How to use HMC to boot LPAR from network using lpar_netboot

lpar_netboot too boot LPAR from network (NIM) using HMC console without setting up LPAr in SMS menu:
https://www.ibm.com/developerworks/wikis/display/virtualization/lpar_netboot

How to track allocated resource in NIM, reset and deallocate resouces

If a resource is allocated to any client in NIM and you want to delete or change resource you get this type of message:

lparx:/ # nim -o remove -arm_image=yes master_mksysb
0042-001 nim: processing error encountered on "master":
   0042-061 m_rmbosi: the "master_mksysb" resource is currently
        allocated for client use

To check whether resource is allocated:
lsnim -l -t mksysb | egrep ":|alloc_count"|grep -v date
lsnim -l -t lpp_source| egrep ":|alloc_count"|grep -v date
lsnim -l -t spot| egrep ":|alloc_count"|grep -v date

To reset and deallocate resources from all machines run this script:
for i in `lsnim -c machines | awk '{print $1}'`
do
    nim -o reset -a force=yes $i
    RC=$?
    if [ $RC -eq 0 ] ; then
        nim -Fo deallocate -a subclass=all $i
    fi
done

Tuesday, April 17, 2012

TSM Locating volume names for both primary and copy file objects

Problem(Abstract)

Explains how to find out which volumes in both primary and copy storage pools contain a specific file object

Resolving the problem

To find out which volumes in primary and copy storage pools hold a specific file object, perform the following:

1) Run a select statement to view a particular file and get the Object_ID. Example:
select * from backups
select * from archives

2) Run the following command:
show bfo 0 OBJECT_ID

Wednesday, January 11, 2012

TSM ANR8302E I/O error on drive

ANR8300E I/O error on library (OP=xx, CC=xx, KEY=xx, ASC=xx, ASCQ=xx, SENSE=xx)