Showing posts with label Unix OS AIX Configuration. Show all posts
Showing posts with label Unix OS AIX Configuration. Show all posts

AIX Troubleshoot command (disk,tape,device,fibre,LVM,backup/restore image,NIM,ODM)

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

AIX Replacing a failed physical volume in a mirrored volume group (P-Series 5.3)

** Credit IBM web
Replacing a failed physical volume in a mirrored volume group
The following procedures replace a failed physical volume (PV) within a mirrored volume group. The replacepv command provides a method for replacing a failed PV in most configurations. An alternative procedure is also provided for configurations where the replacepv command cannot be used.
The information in this how-to was tested using AIX® 5.3. If you are using a different version or level of AIX, the results you obtain might vary significantly.
Prerequisites
· All logical volumes using the failed PV have valid copies on other available PVs (with the possible exception of a dedicated dump logical volume).
Replacing a failed PV using the replacepv command
Prerequisites
If any of the prerequisites listed below cannot be met, see the alternate procedure.
· The volume group containing the failed PV is not rootvg.
· The replacement PV can be added to the volume group containing the failed PV (this might not be possible depending on the PV size and volume group characteristics, such as MAX PPs per PV).
· The replacement PV must be able to be configured into the system at the same time as the failing PV.
· The replacement PV's name can differ from the failed PV's name.
· The size of the replacement PV must be at least the size of the failed PV.
· The volume group containing the failed PV must not be a snapshot volume group or have a snapshot volume group.
Complete the following steps, assuming that the failed PV is hdisk2 and the replacement PV is hdisk10:
1. If the replacement PV is not yet installed on the system, perform the steps necessary to install it. To use the configuration manager to define a new PV, run the following command:
cfgmgr
Use the lspv command to determine the name assigned to the PV. For this example, assume that the new PV is named hdisk10.
2. To replace the failed PV with the one defined in Step 1, run the following command:
replacepv hdisk2 hdisk10
When the command runs, hdisk2 is replaced by hdisk10, and hdisk2 is no longer assigned to a volume group.
3. To undefine the failed PV, run the following command:
rmdev -dl hdisk2
4. Physically remove the failed disk from the system.
5. Verify that the procedure was successful by completing the following steps:
· To check that all logical volumes are mirrored to the new PV as desired, run the following

How to migrate rootvg without mksysb tape drive

** Myself

1. At the new machine install AIX.

2. At the old machine backup the following directory
· /etc/passwd
· /etc/group
· /etc/qconfig
· /var/spool/lpd
· /home
· /etc/hosts
· /var/spool/qconfig
· /etc/security
By using this command
tar -cvf /xxx.tar /etc.passwd /etc/group /etc/qconfig /var/spool/lpd /home /etc/hosts /var/spool/qconfig /etc/security
3. Transfer the xxx.tar to the new machine
4. install xxx.tar using this command
tar -xvf xxx.tar
5. Reboot.

Unix OS AIX Install New Languages

** Myself
Check install Lang
locale -a
Add languages
smit lang -> add international lang->
source:/dev/cd0 (OS CD)
choose lang:F4
#after that aix will automatic unmout cd to change anoter cd

Unix OS AIX Commands to change from 32-bit to 64-bit

** Credit http://publib.boulder.ibm.com

Commands to change from 32-bit to 64-bit

To truly change the kernel to 64-bit from 32-bit, the system must be at the AIX® levels.
To change to a 64-bit kernel, enter the following commands:
ln -sf /usr/lib/boot/unix_64 /unix      
ln -sf /usr/lib/boot/unix_64 /usr/lib/boot/unix      
lslv -m hd5      
bosboot -ad /dev/ipldevice      
shutdown -Fr

Unix OS Shell script AIX Mirror root disk

** Myself
#Mirroring the rootvg Volume Group for AIX
#--------------------------------------------------------------------------------
#  1. Extend rootvg to ${SEC_DISK}:
PRI_DISK=hdisk0
SEC_DISK=hdisk1
extendvg rootvg ${SEC_DISK}
#
# Command reduce vg is
# reducevg rootvg ${SEC_DISK}
#
#  2. Disable QUORUM, by running the following:
chvg -Qn rootvg
Loading