Vous êtes sur la page 1sur 16

AIX Tips

ODM Delete Command easy Step to remove a Disk


odmdelete -o CuDv -q name=hdisk1
Check the status of a mksysb tape (Guessing tape drive is rmt0)
chdev -l rmt0 -a block_size=0
mt -t /dev/rmt0.1 fsf 3
lsmksysb -c -f /dev/rmt0.1
or
restore -Tvf /dev/rmt0.1 -s4
How to remove vpath
rmdev -Rdl dpo
How to check the speed of a fiber card currently running at.
fcstat fcs0
NIM showlog command example
nim -o showlog -a full_log=yes -a log_type=nimerr 530TL4spot
Command to boot from network (provided maint boot enabled in the boot
server)
( If not then this command enables maintenance boot
nim -o maint_boot -a spot=spotname servername)
bootlist -m normal ent0 speed=auto duplex=auto gateway=X.X.X.X
bserver=X.X.X.X client=X.X.X.X
( replace x with the real IPs and speed/duplex according to your network speed
settings)
Remove a mksysb image from NIM Server
nim -o remove -a rm_image=yes mksysbname
Create a image.data from mksysb image
restore -xvqf /images/mksysb.image ./image.data
List all ODM Definitions
odmget CuAt - to see all the attributes
odmget CuDv - to see all the devices
To remove a mirror copy from a LV
/usr/sbin/rmlvcopy fslv01 1 hdisk4 hdisk5
Creating a spot from mksysb
nim -o define -t spot -a source=mksysb1 -a server=master -a
location=/export/spot spot1
Restore a file from mksysb image
restore -xvqf ./mksysb.image ./etc/passwd
Create an lpp source from existing directory
nim -o define -t lpp_source -a server=master -a
location=/export/lpp_source/530TL5lpp 530TL5lpp
Create a spot from existing lpp source
nim -o define -t spot -a server=master -a location=/export/spot/530TL5spot -a
source=530TL5lpp 530TL5spot
How to update a lpp source from a downloaded file sets
gencopy -X -b "-qv" -d /TMP_FOR_UPDATE_CD -t
/export/lpp_source/530TL6lpp/ -f ALL 2>&1
Learn 10 good UNIX usage habits from IBM
http://www-128.ibm.com/developerworks/aix/library/au-badunixhabits.html
How to find a Tape is Mksysb or not
Run this command to see the list of files. If it doesn't show anything then the
tape is NOT MKSYSB
chdev -l rmt0 -a block_size=0
mt -t /dev/rmt0.1 fsf 3
lsmksysb -c -f //dev/rmt0.1
or
restore -Tvf /dev/rmt0.1 -s4
To define a mksysb resource custimgname in NIM
nim -o define -t mksysb -a server=master -a location=/images/custimg.img
custimgname
How to find out the Physical Location of a disk
lsdev -Cc disk -l hdisk0 -F "name location"
Install all software from CD
/usr/sbin/installp -aX -Y -d/dev/cd0 * all

Install Atape software from utility directory


/usr/sbin/installp -aX -Y -d/utility Atape*
To display BOS installation status information while the installation is
progressing, run the following command on the master:
lsnim -a info -a Cstate ClientName
or
lsnim -l ClientName
To perform a base system installaion on a machine venus (if you don't
want any bosinst_data, script, fbscript.
image data then just don't use them in the command line) from the NIM
Server then run this.
nim -o bos_inst -a source=rte -a spot=530ML7SP3spot -a
lpp_source=530ML7SP3lpp -a bosinst_data=No_Prompt -a script=FTPSCR -a
fb_script=Install_Drivers\
-a accept_licenses=yes -a preserve_res=yes -a no_client_boot=yes a
set_bootlist=no -a force_push=no venus
Or with fewer option

nim -o bos_inst -a source=rte -a spot=530ML7SP3spot -a


lpp_source=530ML7SP3lpp -a bosinst_data=No_Prompt -a script=FTPSCR -a
fb_script=Install_Drivers\
-a accept_licenses=yes -a no_client_boot=yes -a force_push=no venus
Now boot the client machine from the network
To resync a logival volume in AIX. Here is an example
Note down the LV IDENTIFIER
root@zeus</root> lslv hd6
LOGICAL VOLUME: hd6 VOLUME GROUP: rootvg
LV IDENTIFIER: 00c8411e00004c000000011731887e00.2 PERMISSION:
read/write
VG STATE: active/complete LV STATE: opened/stale
TYPE: paging WRITE VERIFY: off
MAX LPs: 512 PP SIZE: 128 megabyte(s)
COPIES: 2 SCHED POLICY: parallel
LPs: 2 PPs: 4
STALE PPs: 2 BB POLICY: non-relocatable
INTER-POLICY: minimum RELOCATABLE: yes
INTRA-POLICY: middle UPPER BOUND: 32
MOUNT POINT: N/A LABEL: None
MIRROR WRITE CONSISTENCY: off
EACH LP COPY ON A SEPARATE PV ?: yes
Serialize IO ?: NO
Now run this command on the STALE LV

root@zeus </root> lresynclv -l 00c8411e00004c000000011731887e00.2


Or this script will resync all the Logical Volume of all Volume Groups. Modify
this as per your requirement. This one I created for our test environment and so
far seems to be working in test environment. Please test it in a test box before
you use
lsvg|while read VG
do
lsvg l $VG|awk '{print $1}'
done|sed -e '/LV/d' -e '/\:/d'|while read LV
do
lslv $LV|grep 'LV IDENT'|awk '{print $3}'
done|while read LVIDENT
do
lresynclv -l $LVIDENT
done
To add all the filesets on /dev/cd0 to NIM lpp source 530TL5lpp
nim -o update -a packages=all -a source=/dev/cd0 530ML5lpp
To add all the filesets from a directory /utility/aixml to NIM lpp source
530TL5lpp
nim -o update -a packages=all -a source=/utility/aixml 530ML5lpp
How to create a NIM LPP Source from CD
To create from an existing directory use the full path of the existing directory
ex. /export/lpp_source/510ML2lpp instead of /dev/cd0
gencopy -X -b "-qv" -d /dev/cd0 -t /export/lpp_source/510ML8lpp -f file 2>&1
How to create a lpp_source from existing directory i,e
/export/lpp_source/520TL10SP2lpp
nim -o define -t lpp_source -a server=master -a
location=/export/lpp_source/520TL10SP2 lpp 520TL10SP2lpp
NIM Network boot problem
# smitty nim_control_boot ==>
>> Limit Boot Image Creation to Defined Interfaces?
>> It was currently set to "NO"
Booting a Client from NIM Server in diagnostics mode from the command
line

Follow this procedure for performing the diag operation from the master and
client. To perform the diag operation from the client, enter:
nimclient -o diag -a spot=SPOTName
To perform the diag operation from the master, enter:
nim -o diag -a spot=SPOTName MachineObjectName
How to restore a Customer non bootable mksysb image to Client M/C
(Try to use the next procedure in NIM Server and try NIM load instead)
Don't try restbyname in NIM Server. It will overwrite all the NIM server data
with the tape Image. Now either use tctl or mt ( Guessing we are using rmt0)
If you want to restore in client M/C itself then
tctl -f /dev/rmt0.1 rewind
tctl -f /dev/rmt0.1 fsf 3
restbyname -xqf /dev/rmt0.1
How to create a NIM Image from Customer mksysb Tape
In NIM Server check a filesystem with at least 5-6 GB free space. I prefer
seperate filesystem for this. Let us guess we are using /export/mksysb directory
so cd to /export/mksysb and restore the image from tape for the Server venus
cd /export/mksysb
chdev -l rmt0 -a block_size=0 (To make sure it can read any block size)
mt -t /dev/rmt0.1 fsf 3
dd if=/dev/rmt0.1 of=/images/mksysb.venus bs=4m
(and use this image. using 4m to avoid any dd buffer error.)
nim -o define -t mksysb -a server=master -a location=/export/mksysb.venus
venus_mksysb
Now initiate the MKSYSB installation for the client venus
nim -o bos_inst -a source=mksysb -a mksysb=venus_mksysb -a
spot=530ML7SP3spot -a lpp_source=530ML7SP3lpp -a accept_licenses=yes
-a \ no_client_boot=yes -a force_push=no venus
All these information might not be necessary. We normally use in our
environment to allocate the mksysb and necessary lppsource & spots. In our
NIM definition our bosinst.data is called No_Prompt, our Script is called as
FTPSCR and FB Script is called Install_Drivers. These are just names but does
lot more than then their names said.
nim -o allocate -a source=mksysb -a mksysb=mksysb.venus -a
lpp_source=530TL5lpp -a spot=530TL5spot -a bosinst_data=No_Prompt -a
script=FTPSCR \
-a fb_script=Install_Drivers -a accept_licenses=yes -a boot_client=no venus
How to display NIM Machines
lsnim -c machines
How to display NIM networks
lsnim -c networks
If NFS Mount failes to mount with following error message -
RPC: 1832-019 Program not registered
Then -> Run on the client. And if both the server & client is new then run on
both uncomment portmap in /etc/rc.tcpip if not already done
make sure rc.nfs is not commented out in /etc/inittab
stopsrc -g nfs
startsrc -s portmap
/etc/rc.nfs
Now it should mount.
Installing Aix when booting from a mksysb tape fails.
Try clone load first. Clone load is boot from AIX CD1 and then recover from
tape. Or you can try the other procedure too. You need to access the firmware
command line prompt, which usually appears as an option in the SMS menus.
At the firmware command line prompt, type following two commands:
setenv real-base 1000000
reset-all
The system will then reboot, and you will be able to boot from tape, assuming
that you have an valid boot image on your tape media.
Create a Filesystem using command line
mkvg -y testvg hdisk1
mklv -y testlv testvg 500 hdisk1 (500 is 500 LP )
chlv -t jfs2 testlv
crfs -v jfs -a nbpi=16384 -A yes -d testlv -p rw -m /custimg
crfs -v jfs2 -A yes -d testlv -p rw -m /custimg
or
Create aJFS2 filesystems on VG testvg with size 10MB mount point /fs1 with
adding entry in /etc/filesystems
crfs -v jfs2 -g testvg -a size=10M -m /fs1 -A yes
ODM command to delete network.
odmdelete -q name = en0 -o CuAt
odmdelete -q parent = en0 -o CuDv
odmdelete -q name = en0 -o CuDv
odmdelete -q name = en0 -o CuDep
odmdelete -q dependency = en0 -o CuDep
odmdelete -q value1 = en0 -o CuDvDr
odmdelete -q value3 = en0 -o CuDvDr
odmdelete -q name=inet0 -o CuAt
Etherchannel problem after loading the server from Customer mksysb
tape
You must remove the ODM entries first before you configure etherchannel
run this on the correct network interface. Ex. en0
odmdelete -q name=en0 -o CuAt
odmdelete -q name=inet0 -o CuAt
How to remove a failed Disk from ODM
If you have been working with a PVID value rather than with an hdisk name,
ensure that the PVID is removed from the ODM with the following command.
The
32-digit value supplied consists of the PVID plus 16 zeros. For example:

odmdelete -q value=0073659c2c6d26f10000000000000000 -o CuAt ( add 16


zeros)
To get the PVID run
lsvg -p vgname
Then run
rmlvcopy 1 0073659c2c6d26f1 (16 Digit PVID)
Restoring tar backup with absolute pathname to different directory
A tar backup created using absolute path names can only be restored to the
directory from which it was created. One way to restore it to a different
directory is by using the pax command. For example, suppose you receive a tar
tape created using absolute path names.
tar -cvf /dev/rmt0 /work/*
but want to restore it to the /test directory. The pax command would be:
pax -rf /dev/rmt0 -s/work/test/p
The -s/work/test/p does the directory change.
Determine the path to your system's error log file by running the following
command:
/usr/lib/errdemon -l

To change the maximum size of the error log file enter:


/usr/lib/errdemon -s LogSize
To change the size of the error log device driver's internal buffer, enter:
/usr/lib/errdemon -B BufferSize

To list all events for which logging is currently disabled, enter:


errpt -t -F Log=0

To list all events for which reporting is currently disabled, enter:


errpt -t -F Report=0

IBM 3494 Library testing commands


mtlib -l /dev/lmcp0 -D -E
mtlib -l /dev/lmcp0 -qM
look man mtlib for more options
Vpaths not created for all hdisks of an AIX host or missing vpaths for
some hdisks.
In some cases a customer may notice that some hdisks are not associated with
any vpaths. Or a customer may not see the expected number of vpaths for the
number of hdisks that they have on their AIX host.

In either case the problem could be caused by the fact that the hdisks with no
vpath association are listed in a file called /etc/vpexclude. If this file exists a
customer can remove the file and run cfgmgr and the hdisks will now be
associated with vpaths.

The only way that the vpexclude file can be created is if a customer runs a
querysn command on the AIX host or if the customer manually edits the
/etc/vpexclude file to include the hdisks.
Resetting the NIM state from the command line
Follow this procedure for resetting the NIM state from the command line.

To return a machine to the ready state, enter:

nim -Fo reset MachineName

To deallocate resources, enter:

nim -o deallocate -a subclass=all MachineName


Recovering the /etc/niminfo file from the command line
nimconfig -r
To list all duplicate and conflicting updates in the /myimages image source
directory
/usr/lib/instl/lppmgr -d /myimages -u

To remove all duplicate and conflicting updates in the /myimages image


source directory, type:
/usr/lib/instl/lppmgr -d /myimages -u –r
How to change the console to tty0 if tty0 not available
smitty devices > add a tty >tty rs232 Asynchronous terminal > sa0 ( or sa1) in
next screen select port to 0, baud rate to 9600 and Enable Login to enable and
hit enter. Now run smitty console and change the device from /dev/lft0 to
/dev/tty0
To attempt to boot through a gateway using Ethernet with Duplex & speed
Auto, and then try other devices, enter: Bserver=Boot Server, may be your
NIM Server too. Even if you don't have a gateway you need to mention it.
In that case use 0.0.0.0 as gateway. And client is ther Server you want to
load from NIM
bootlist -m normal ent0 speed=auto duplex=auto gateway=192.168.0.1
bserver=192.168.0.10 client=192.168.0.45 hdisk0 rmt0
ODMDELETE COMMAND TO DELETE NIM OBJECTS
Suppose you want to delete the entry with TRYME mksysb and lsnim shows
the name as mksysb.TRYME and you are unable to delete it normal way.
MAKE SURE YOU BACKUP NIM DATABSE BEFORE THIS. READ THE
LAST LINE TOO. OTHERWISE NIM SERVER WON"T WORK
odmget nim_attr >/tmp/nim_attr.out
vi /tmp/nim_attr.out and look for TRYME entry
Note down the id no for Ex. id=1161733976
odmdelete -o nim_attr -q id=1161733976
Now Delete it from nim_objects
odmget nim_objects >/tmp/nim_objects.out
vi that file and note down the id for TRYME
odmdelete -o nim_object -q id=1162344443
now from websm screen or smitty nim add the routing information to NIM
MASTER object
resources -> master ->properties ->nim interface. ( Add the interface again)
Identifying the Origin of "core" Files
(Collected from Internet)
When an application core dumps, a "core" file is placed in the current
directory. Core files are often a symptom of a problem that needs attention.
You can determine which application caused the "core" file going to the
directory where the core file is located and running the command:
$ lquerypv -h core 6b0 64
The name of the application causing the core file is listed in the section on the
right. In the sample output below, the "ftpd" application
caused the core file.
000006B0 7FFFFFFF FFFFFFFF 7FFFFFFF FFFFFFFF |................|
000006C0 00000000 000007D0 7FFFFFFF FFFFFFFF |................|
000006D0 00170000 53245A2C 00000000 00000015 |....S$Z,........|
000006E0 66747064 00000000 00000000 00000000 |ftpd............|
000006F0 00000000 00000000 00000000 00000000 |................|
00000700 00000000 00000000 00000000 000000CF |................|
00000710 00000000 00000020 00000000 000000BE |....... ........|

In addition, AIX can be configured to detect when core files are created and
mail a message to root, alerting root that an application has failed. The
instructions for setting this up are in a README file in the
/usr/samples/findcore directory. These programs are delivered with the
bos.sysmgt.serv_aid fileset.
Extend a filesystem in AIX command line
Suppose you want to extend /usr file system to 4GB
chfs -a size=4G /usr
or
chfs -a size=4000M /usr
or you want to add some more space like 2GB with existing size
chfs -a size=+2G /usr
You can extend the root file system same way. Suppose the new size you want
is 2GB
then
chfs -a size=2G /
or
chfs -a size=2000M /
Sendmail Warning: .cf file is out of date: sendmail AIX5.3/8.13.4 supports
version 10, .cf file is version 9
Solution : vi /etc/mail/sendmail.cf and change V9 to V10
How to erase complete data from a disk on aix 5.2 TL6 and 5.3TL4
diag -d hdiskX -T format
How to make IP changes permanent from command line
/usr/sbin/mktcpip -h'P550B_LP01' -a'30.3.0.120' -m'255.255.0.0' -i'en2'
-g'30.3.0.120'
How to copy from one streaming tape to a another tape
tcopy /dev/rmt0 /dev/rmt1
How to check integrety of a tape
tapechk
How to display all the VLAN Adapter
lsdev -Cc adapter -t eth -s vlan
How to use BSD style network setting in AIX
smit configtcp fast path and then select BSD Style rc Configuration.
and configure the /etc/rc.bsdnet file using a standard text editor.

How to check the last fsck log of /utility filesystem


/sbin/helpers/jfs2/fscklog /utility
How to check the inode status of a file or inode or to check last accessed
time etc
/sbin/helpers/jfs2/istat /etc/passwd
or
/sbin/helpers/jfs2/istat 40 /dev/hd4 ( to check inode 40 of /dev/hd4)
How to cleanup deleted ODM spaces
/usr/samples/odm/odmclean -d CuDvDr
How to find which fileset contains a particular binary for example ls
lslpp -w /usr/bin/ls
To display if the hardware is 32-bit or 64-bit, type:
bootinfo -y

How to change AIX OS from 32 bit kernel to 64 Bit kernel


ln -sf /usr/lib/boot/unix_64 /unix
ln -sf /usr/lib/boot/unix_64 /usr/lib/boot/unix
bosboot -ad /dev/ipldevice
shutdown -r
How to know if the kernel is 32-bit enabled or 64-bit enabled ?
bootinfo -K
How to lock and unlock a user
To unlock
chuser account_locked=false user
or
chsec -f /etc/security/user -a account_locked=false -s user

To lock
chuser account_locked=true user
or
chsec -f /etc/security/user -a account_locked=true -s user
How to define whether the user name should be echoed on a port
vi /etc/security/default stanza and change usernameecho = false
or
chsec -f /etc/security/login.cfg -s default -a usernameecho=false
How to change the password prompt for example
chsec -f /etc/security/login.cfg -s default -a pwdprompt="Enter your Password
now:
How to change login prompt from telnet session like it will display the
words in quote
chsec -f /etc/security/login.cfg -s default -a herald="Enter your user ID now:
How to supressthe login messages
touch .hushlogin
How to save current network parameter options for next boot
/usr/sbin/tunsave -a -F nextboot -t no

How to reset a user "asis"s failed login count


chsec -f /etc/security/lastlog -a "unsuccessful_login_count=0" -s 'asis'
How to restore a file from a savevg backup
/usr/bin/restorevgfiles -s -r -f'/dev/rmt0' -b'4096' -a'' /etc/passwd
How to preview information about a savevg backup with block size 4MB
listvgbackup -l -f'/dev/rmt0' -b'4096' -a''
What is the command to create VG on VPATH device
mkvg4vp
What is the command to add a Datapath PV to a vg
extendvg4vp
How to identify a PCI Slot at U1.5-P2-I8
drslot -c pci -i -s 'U1.5-P2-I8'
How to display all graphics adapters in a machine
lsdisp
How to display all Read Write Optical Device List ( Optical Jukebox)
lsdev -Cc rwoptical
How to add path to available Data Path Devices
/usr/sbin/addpaths
How to define and configure all Data path Devices
/usr/lib/methods/cfcallvpath
How to display all the vpath devices
lsdev -Cc disk -s dpo -t vpath
How to display Data Path Device Configuration
lsvpcfg
How to configure a defined tty
mkdev -l tty0
How to display the PMTU table
pmtu display
or
netstat -in
How to display all locked users (including system users)
usrck -l ALL (lowercase L)
How to generate hardware and software inventory of a server
/usr/sbin/geninv -c
or
/usr/sbin/geninv -l
How to display and change setting of the core files
lscore - to diplay settings
chcore - to change settings

How to search for and correct physical partitions that are stale or unable
to
perform I/O operations on rootvg. ( Look manual for more options for this
command)
mirscan -v rootvg
How to determine the status of your system battery
diag -B -c
How to run diggonostics on all SCSI devices without user action
diag -S 5 -c
How to determine if the 64-bit kernel extension is loaded ?
genkex |grep 64
Restore a Backup by Name
To restore a remote backup archive by name, use the following command:
rsh remotehost "dd if=/dev/rmt0 bs=blocksize" | restore -xvqdf- pathname

Restore a Backup by inode


To restore a remote backup archive by inode, use the following command:
rsh remotehost "dd if=/dev/rmt0 bs=blocksize" | restore -xvqf- pathname

Restore a Remote cpio Archive


To restore a remote archive created with the cpio command, use the following
command:
rsh remotehost "dd if=/dev/rmt0 ibs=blocksize obs=5120" | cpio -icvdumB

Restore a tar Archive


To restore a remote tar archive, use the following command:
rsh remotehost "dd if=/dev/rmt0 bs=blocksize" | tar -xvpf- pathname

Restore a Remote Dump


To restore a remote dump of the /myfs file system, use the following
command:
cd /myfs rrestore -rvf remotehost:/dev/rmt0
Backup by Name
To remotely create a backup archive by name, use the following command:
find pathname -print | backup -ivqf- | rsh remotehost "dd of=/dev/rmt0
bs=blocksize conv=sync"

To remotely create a backup archive by inode, first unmount your file


system then use the backup command. For example:
umount /myfs backup -0 -uf- /myfs | rsh remotehost "dd of=/dev/rmt0
bs=blocksize conv=sync"

To create and copy an archive to the remote tape device, use the following
command:
find pathname -print | cpio -ovcB | rsh remotehost "dd ibs=5120 obs=blocksize
of=/dev/rmt0"

Create a tar Archive remotely :


tar -cvdf - pathname | rsh remotehost "dd of=/dev/rmt0 bs=blocksize
conv=sync"

Create a Remote Dump remotely. To create a remote dump of the /myfs


file system, use the following command:
rdump -u -0 -f remotehost:/dev/rmt0 /myfs
How to compare two directory
dircmp /dir1 /dir1
How to identify if a file is sparsely-allocated, for ex. /etc/passwd.
fileplace -v /etc/passwd
How to displaythe placement of file blocks within logical or physical
volumes
fileplace -v /usr/bin/ls

fileplace -p /usr/bin/ls ( Will display the PV it resides in)


How to verify the list of bootable PVs :
ipl_varyon -i
How to display the filesystems in a volume group
lsvgfs rootvg
How to display the jfs/jfs2 file systems, run
lsjfs
or
lsjfs2
How to clean up a failed software installation
installp -C
How to unlock a rootvg
putlvodm -K `getlvodm -v rootvg`
How to run 64BIT application on 32 bit kernel
Smitty -> System Environments ->Enable 64bit Application environment
or
/etc/methods/cfg64
and run the following command
mkitab "load64bit:2:wait:/etc/methods/cfg64 >/dev/console 2>&1 # Enable 64-
bit execs"
How make AIX replying to broadcast ping run this command
no -o bcastping=1
How to out the Status of VGDA of rootvg and hdisk0
lqueryvg -g `getlvodm -v rootvg` -At -p hdisk0
How to change a users attribute like pasword length
chsec -f /etc/security/user -s sid -a minlen=8
or
chuser minlen=8 sid

How to determine the tape block size


Use the dd command to read a single block from the device and find out what
block size is used for the archive:
dd if=/dev/rmt0 bs=128k count=1 | wc -c
This will return to you the size in bytes of the block being read. Assuming that
your backup was made with the
same physical block size, you can change your device to use this block size.
or
Use the tcopy command as follows to find out the block size:
# tcopy /dev/rmt0
tcopy : Tape File: 1; Records: 1 to 7179 ; size:512
tcopy : Tape File: 1; End of file after :7179 records; 3675648 bytes
How to mirror a terminal
portmir -t pts/0 ( To start)
portmir -o (To stop)
How to restart inetd
refresh -s inetd
How to identifying the current run level at the command line:
# cat /etc/.init.state
2
or
who -r
How to displays the names of the files added to the system during
installation of the specified fileset. for Ex. openssh
lslpp -f openssh.base.server
How to list all the softwares in a cdrom ( To display directory use the path)
installp -L -d /dev/cd0
How to resize the VG size after increasing the lun sizes on Fast-T
chvg -g vgname
How to check the LVCB data
getlvcb -AT <LVname>
How to find the latest service pack inside a SPOT
nim -o fix_query 530TL8spot |grep SP
How to configure STK L700 Library with AIX for Veritas Netbackup 6.x

You need to know two things first

1. Which fcs card you zoned the Fiber Robotic device


For Example fcs0 or fcs1

2. FCID of the robot. Which you will find from the Fiber switch in the Zone.
Or run fcsstat. it will look like 0x242DB1
Now you need to run
1) /usr/openv/volmgr/bin/driver/install_ovpass
2) mkdev -c media_changer -t ovpass -s fcp -p fscsi0 -w 0x0242DB1,0
(fcsi0 if connected to fcs0, fscsi1 if fcs1 , FCID from Fiber Switch, add ,0 after
that)
3)/usr/openv/volmgr/bin/scsi_command -d /dev/ovpass0 -inquiry (will show
the robot)
4)/usr/openv/volmgr/scan will give you details of the robot if added correctly
Then run the netbackup Admin GUI
/usr/openv/netbackup/bin/jnbSA&
And discover everything from the main menu wizard. Don't go to device robot.
Most of the types veritas discover devices including robots correctly
How to find the devices in pre defined subclass
lsdev -P -H
then run
lsdev -Cc disk -Fname -sscsi - for scsi disks
lsdev -Cc cdrom -Fname -sscsi - for scsi cdrom
lsdev -Cc disk -Fname -sfcp - for fiber disks
lsdev -Cc tape -Fname -sfcp - for fiber tapes
How to find the system id number of AIX Server
lsattr -El sys0 -a systemid
or
uname -u
How to check and repair two file systems simultaneously on different drives
(from dfsck man page from AIX Server)
dfsck -p /dev/hd1 - -p /dev/hd7
How to fix SAN disks issue after rerecovering mksysb to different hardware
connected to different SAN disks.
Sceanario :
In a recent disaster recovery scenario I had to recover two lpar to different
hardware. mksysb created on two lpars connected to EMC Server and I was
recovering to two different hardware connected to IBM Shark. Both have AIX
5.3 TL10. After recovering I figured out that one lpar can see the Shark SAN
disks but showing as defined. And the other lpar no SAN disks are showing.
Solution I used : First I ran lslpp -l |egrep 'emc|ibm2105|sdd' and found that
mksysb has Clarion drivers/powerpath/ibm2105 etc. As we are not using
Clarion or EMC disks I am free to remove those packages. So I ran installp -u
EMC* and removes all the EMC softwares. Then I unstalled IBM2105
packages same way. The 2nd lpar now automatically showing the Shark disks
but they are showing as defined. Now I ran

rmdev -rdl fscsi0 and rmdev -rdl fscsi1 ( as SAN disks are connected to fcs0 &
fcs1)
After that I ran cfgmgr -vl fcs0 & cfgmgr -vl fcs1 and all the disks came as
MPIO device and as available. Now if I want vpath software then I would
download latest sdd drivers and ibm2105.rte from ibm website and install
them.

If you want to learn how to Install AIX 5L. Here is the link from IBM. I
think this is one of the best document which covered almost everything of
AIX installation.
http://www-128.ibm.com/developerworks/aix/library/au-install-aix.html
This page was last modified on Thursday, August 12, 2010 07:29:19 AM
THOUGH MOST OF THE SOLUTIONS I TESTED AND I TRY TO TEST
BEFORE I POST, STILL THERE MIGHT BE SOMETHING WHICH I
COLLECTED FROM WEB LONG BACK AND COULDN'T TEST
EARLIER. I AM TRYING TO MAKE THINGS CORRECT BUT IF YOU
PLEASE LEAVE A FEEDBACK WHENEVER YOU SEE SOMETHING
INCORRECT, WILL HELP ME TO CORRECT AND IT WILL HELP
OTHERS TOO.
Please leave a feedback if you think it helped you to figure out or provide any
clue to fix your issue. That will encourage me more. I tried to make sure less
typos but I don't get much time anymore. Too busy with my work. So please
leave a feedback if think something is not correct. Most of the stuffs I put here
from my day to day work and problem fixing.