Professional Documents
Culture Documents
mt -t /dev/rmt0.1 fsf 3
lsmksysb -c -f //dev/rmt0.1
or
Command to boot from network (provided maint boot enabled in the boot server)
530TL5lpp
-a source=530TL5lpp 530TL5spot
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
mt -t /dev/rmt0.1 fsf 3
lsmksysb -c -f //dev/rmt0.1
or
To display BOS installation status information while the installation is progressing, run the following
command on the master:
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
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.
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 from a directory /utility/aixml to NIM lpp source 530TL5lpp
nim -o update -a package=all -a source=/utility/aixml 530ML5lpp
To create from an existing directory use the full path of the existing directory ex.
/export/lpp_source/510ML2lpp instead of /dev/cd0
lpp 520TL10SP2lpp
NIM Network boot problem
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
(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)
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.
All these informations 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 say.
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.
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
Etherchannel problem after loading the server from Customer mksysb tape
You must remove the ODM entries first before you configure etherchannel
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
/usr/lib/errdemon -s LogSize
To change the size of the error log device driver's internal buffer, enter:
/usr/lib/errdemon -B BufferSize
errpt -t -F Log=0
errpt -t -F Report=0
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.
Follow this procedure for resetting the NIM state 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
smitty devices
add a tty
tty rs232 Asynchronous terminal
sa0
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
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.
resources -> master ->properties ->nim interface. ( Add the interface again)
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
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.
or
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
tapechk
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
To unlock
chuser account_locked=false user
or
chsec -f /etc/security/user -a account_locked=false -s user
To lock
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:
/usr/sbin/tunsave -a -F nextboot -t no
How to preview information about a savevg backup with block size 4MB
listvgbackup -l -f'/dev/rmt0' -b'4096' -a''
lsdisp
How to display all Read Write Optical Device List ( Optical Jukebox)
lsdev -Cc rwoptical
/usr/sbin/geninv -c
or
/usr/sbin/geninv -l
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
diag -S 5 -c
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"
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
installp -C
How to unlock a rootvg
putlvodm -K `getlvodm -v rootvg`
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
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 configure STK L700 Library with AIX for Veritas Netbackup 6
2. FCID of the robot. Which you will find from the Fiber switch in the Zone
it will look like 0x242DB1
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)
#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
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