Tanti Technology

My photo
Bangalore, karnataka, India
Multi-platform UNIX systems consultant and administrator in mutualized and virtualized environments I have 4.5+ years experience in AIX system Administration field. This site will be helpful for system administrator in their day to day activities.Your comments on posts are welcome.This blog is all about IBM AIX Unix flavour. This blog will be used by System admins who will be using AIX in their work life. It can also be used for those newbies who want to get certifications in AIX Administration. This blog will be updated frequently to help the system admins and other new learners. DISCLAIMER: Please note that blog owner takes no responsibility of any kind for any type of data loss or damage by trying any of the command/method mentioned in this blog. You may use the commands/method/scripts on your own responsibility. If you find something useful, a comment would be appreciated to let other viewers also know that the solution/method work(ed) for you.

Friday, 18 April 2014

[How To] Convert a small VG to Big VG or Scalable VG

1. Types of Volume Groups
VG typeMaximum PVsMaximum LVsMaximum PPs per VGMaximum PP size
Normal VG3225632,512 (1016 * 32)1 GB
Big VG128512130,048 (1016 * 128)1 GB
Scalable VG102440962,097,152128 GB
2.  How to determine the type of volume Group
You can use the readvgda command to check a VG’s type:
# readvgda hdisk30 | grep type
.....    readvgda_type: smallvg
3.  Convert to Big VG or Scalable
To convert a standard VG to big VG format every physical volume in the volume group needs at least one free physical partition. The volume group oraclevg contains 13 physical volumes with no free partitons left:
lsvg_p
So the first physical partition of hdisk31, hdisk32, hdisk33.. till hdisk42 and hdisk44 have to be moved to hdisk30. To find the affected logical volumes we check disk by disk for the logical volume residing on the first PP:
# lspv -l hdisk31
hdisk31:
LV NAME     LPs PPs   DISTRIBUTION              MOUNT POINT
orp32101lv  799 799   160..160..159..160..160   /orp321am01

# lspv -l hdisk32
hdisk32:
LV NAME     LPs PPs   DISTRIBUTION              MOUNT POINT
orp32101lv  799 799   160..160..159..160..160   /orp321am01

.....so on till last physical disk......
Affected LV is orp32101lv . To find the logical partitions to be migrated we look for physical partiton ’0001′ on each disk..
# lslv -m orp32101lv| grep -w 0001|egrep '(hdisk31|32|33|34|35|36|37|38|39|40|41|42|44)' 
0001 0161 hdisk31 
0320 0001 hdisk31 
1119 0001 hdisk32 
1918 0001 hdisk33 
2717 0001 hdisk34 
3516 0001 hdisk35 
4315 0001 hdisk36 
5114 0001 hdisk37 
5913 0001 hdisk38 
6712 0001 hdisk39 
7511 0001 hdisk40 
8310 0001 hdisk41 
9109 0001 hdisk42 
0001 0161 hdisk44 
0320 0001 hdisk44
start the migration using migratelp:
# migratelp orp32101lv/0320 hdisk30
 0516-1291 migratelp: Mirror copy 1 of logical partition 320 of logical volume
 orp32101lv migrated to physical partition 160 of hdisk30.
# migratelp orp32101lv/1119 hdisk30
 0516-1291 migratelp: Mirror copy 1 of logical partition 1119 of logical volume
 orp32101lv migrated to physical partition 159 of hdisk30.
# migratelp orp32101lv/1918 hdisk30
 0516-1291 migratelp: Mirror copy 1 of logical partition 1918 of logical volume
 orp32101lv migrated to physical partition 158 of hdisk30.
# migratelp orp32101lv/2717 hdisk30
 0516-1291 migratelp: Mirror copy 1 of logical partition 2717 of logical volume
 orp32101lv migrated to physical partition 157 of hdisk30.
# migratelp orp32101lv/3516 hdisk30
 0516-1291 migratelp: Mirror copy 1 of logical partition 3516 of logical volume
 orp32101lv migrated to physical partition 156 of hdisk30.
# migratelp orp32101lv/4315 hdisk30
 0516-1291 migratelp: Mirror copy 1 of logical partition 4315 of logical volume
 orp32101lv migrated to physical partition 155 of hdisk30.
# migratelp orp32101lv/5114 hdisk30
 0516-1291 migratelp: Mirror copy 1 of logical partition 5114 of logical volume
 orp32101lv migrated to physical partition 154 of hdisk30.
# migratelp orp32101lv/5913 hdisk30
 0516-1291 migratelp: Mirror copy 1 of logical partition 5913 of logical volume
 orp32101lv migrated to physical partition 153 of hdisk30.
# migratelp orp32101lv/6712 hdisk30
 0516-1291 migratelp: Mirror copy 1 of logical partition 6712 of logical volume
 orp32101lv migrated to physical partition 152 of hdisk30.
# migratelp orp32101lv/7511 hdisk30
 0516-1291 migratelp: Mirror copy 1 of logical partition 7511 of logical volume
 orp32101lv migrated to physical partition 151 of hdisk30.
# migratelp orp32101lv/ 8310 hdisk30
 0516-1291 migratelp: Mirror copy 1 of logical partition 8310 of logical volume
 orp32101lv migrated to physical partition 150 of hdisk30.
# migratelp orp32101lv/ 9109 hdisk30
 0516-1291 migratelp: Mirror copy 1 of logical partition 9109 of logical volume
 orp32101lv migrated to physical partition 149 of hdisk30.
# migratelp orp32102lv/320 hdisk30
 0516-1291 migratelp: Mirror copy 1 of logical partition 320 of logical volume
 orp32102lv migrated to physical partition 148 of hdisk30.
Checking…..
# lsvg -p oraclevg
 oraclevg:
 PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
 hdisk30 active   799        438     131..00..00..147..160
 hdisk31 active   799         1      01..00..00..00..00
 hdisk32 active   799         1      01..00..00..00..00
 hdisk33 active   799         1      01..00..00..00..00
 hdisk34 active   799         1      01..00..00..00..00
 hdisk35 active   799         1      01..00..00..00..00
 hdisk36 active   799         1      01..00..00..00..00
 hdisk37 active   799         1      01..00..00..00..00
 hdisk38 active   799         1      01..00..00..00..00
 hdisk39 active   799         1      01..00..00..00..00
 hdisk40 active   799         1      01..00..00..00..00
 hdisk41 active   799         1      01..00..00..00..00
 hdisk42 active   799         1      01..00..00..00..00
 hdisk43 active   799         12     00..12..00..00..00
 hdisk44 active   799         1      01..00..00..00..00
 hdisk45 active   799         1      00..01..00..00..00
Finally we are ready to migrate the volume group to big VG format.
# chvg -B oraclevg
0516-1216 chvg: Physical partitions are being migrated for volume group descriptor area expansion. Please wait.

 0516-1164 chvg: Volume group oraclevg changed. With given characteristics oraclevg can include up to 128 physical volumes with 1016 physical partitions each.
To be able to integrate physical volumes with more than 1016 partitions we need to increase the limit of the number of physical partitions per physical volume:
# chvg -t 2 oraclevg
 0516-1164 chvg: Volume group oraclevg changed. With given characteristics oraclevg  can include up to 64 physical volumes with 2032 physical partitions each.
As we see we have one physical partiton less per disk. This is due to a larger VGDA with big VGs:
# lsvg -p oraclevg
oraclevg:
PV_NAME PV STATE TOTAL PPs FREE PPs   FREE DISTRIBUTION
hdisk30 active     798       437      130..00..00..147..160
hdisk31 active     798       0        00..00..00..00..00
hdisk32 active     798       0        00..00..00..00..00
hdisk33 active     798       0        00..00..00..00..00
hdisk34 active     798       0        00..00..00..00..00
hdisk35 active     798       0        00..00..00..00..00
.................

[How-To] Add, Remove CD/DVD ROM from LPAR Dynamically


Safe way to Move/Remove the CD/DVD ROM from LPAR using DLPAR Operation:
On the LPAR find out where the CD/DVD-ROM is assigned:
# lsdev -Cc cdrom
cd0   Available  03-08-00   SATA DVD-ROM Drive
# lsdev -Cl cd0 -F parent
sata0
# lsdev -Cl sata0 -F parent
sissas0
# lsslot -c slot
# Slot Description Device(s)
HEA 17 Logical I/O Slot lhea1 ent0
U789D.001.DQD52DG-P1-T1   Logical I/O Slot pci4 usbhc2 usbhc3
U789D.001.DQD52DG-P1-T3   Logical I/O Slot pci3 sissas0
U9117.MMA.6534BE4-V4-C0   Virtual I/O Slot vsa0
U9117.MMA.6534BE4-V4-C4   Virtual I/O Slot vscsi0
U9117.MMA.6534BE4-V4-C8   Virtual I/O Slot vscsi1
U9117.MMA.6534BE4-V4-C22  Virtual I/O Slot vscsi3
U9117.MMA.6534BE4-V4-C24  Virtual I/O Slot vscsi4
# lsdev -Cc cdrom -F "name physloc"
cd0 U789D.001.DQD52DG-P4-D1
Remove the slot from this host:
# rmdev -dl pci3 -R
cd0 deleted
sissas0 deleted
sata0 deleted
pci3 deleted
Then from HMC — go to –> Dynamically Logical Partitioning –> Physical Adapters –> Remove the controller and then assign to another partition.



[How-To] Create an LPP source from CD/DVD


What is lpp_source

An lpp_source is a directory similar to AIX install CDs. It contains AIX Licensed Program Products (LLPs) in Backup File Format (BFF) format and RPM Package Manager (RPM) filesets that you can install.

How to Create lpp_source

  • As root, On NIM server create a directory to hold the lpp_source.
cd /export/nim/lpp_source
mkdir aix_71_tl03
  • On NIM server, Start up nim with smitty nim The “Network Installation management” menu will appear.
    • select “Perform NIM Administration Tasks” as shown below:
   
  • Select Manage Resources
  
  • Select Define a Resource
  • Choose lpp_source
  • Fill out the fields below:
    • Resource Name:  The unique name of the resource you are adding to the NIM environment. The name you supply identifies the resource in the NIM environment
    • Server of Resource: Lists the NIM name of the machine that serves this resource.
    • Location of Resource: The path name on the server where the resource resides.
    • NFS Client Security Method(optional): Specify that the mount commanduses Data Encryption Standard (DES)  for NFS transaction
    • Source of Install Image: Specifies which device or NIM resource is to be used when creating the resource.
  • Hit Enter, The command will process, and eventually come back with “OK”.
  • On the command line, you can optionally check to see that the lpp source was created by:
lsnim -l aix_71_tl03
aix_71_tl03:
 class = resources
 type = lpp_source
 arch = power
 Rstate = ready for use
 prev_state = verification is being performed
 location = /export/nim/lpp_source/aix_71_tl03
 simages = yes
 alloc_count = 0
 server = master

Monday, 14 April 2014

Perform NIM operation without booting nim client machine to SMS mode:


Perform NIM operation without booting machine to SMS mode:

If you have any confusion or problem in finding out the ethernet adapter to select during the migration or any operation where you need to select the adapter for performing ping test or to start the installation through network, you can use the below command.




1. Find out the gateway of the servers where you need to perform the operation using below command:

netstat -nr
Destination        Gateway                                              
default             x.x.x.x --> gateway of client  

2.  In "ifconfig -a" o/p, select the interface/adapter(entX) which has an IP, which is reachable from your laptop.(which you use to do network boot)

3. Set the bootlist in such a way, so that after the server reboot the it boots through network.

bootlist -m normal entX  gateway=(GW of Client)  bserver=(NIM IP) client=(CLIENT IP)

Advantages:

1. You may not end up with shutting down the wrong server from HMC GUI.
2. You can overcome the ping test, where mostly people give wrong ip details.
3. Also helps if one has less experience about the SMS menu

B700F120 LED server hung



AIX server migrated from AIX5.3 to AIX6.1 on 9117-mmb frame and the server hangs at the LED B700F120


B700F120

B700F120

Explanation

Platform firmware detected an error

 

Response

The platform is unable to support the requested architecture options requested by the operating system via ibm,client-architecture-support interface.

 

Solution

6100-01 is not supported on a 9117-mmb. So if installing the AIX operating

 

system on a 9117-mmb frame, please make sure you go with one of these options.

AIX 6.1 with the 6100-04 Technology Level and Service Pack 3, or later.
AIX 6.1 with the 6100-03 Technology Level and Service Pack 5, or later.
AIX 6.1 with the 6100-02 Technology Level and Service Pack 8, or later.

 If you have used lpp and spot of 6100-01 level, please update the lpp and spot to the above mentioned TL levels and perform the migration.

                      By doing so, you can bypass this LED hung of server during the reboot of the server after the OS migration

How to list files in alphabetical order in a directory



We know how to list the files by sorting with time, and using long list options, but anyone knows how to list based on the alphabetical order.

Here is the simple command to do that :



cd to directory and then

#  ls -ltr | awk ' { print $9 }' | sort -d

This will list files based on alphabet order.

find oslevel of the clone rootvg



We usually know how to find the oslevel of a server, but if we want to find the oslevel of the cloned rootvg that exists in the disk, then its very simple.

Using the below blvset command, you can find the oslevel in the clone vg/disk.





/usr/lpp/bosinst/blvset -d /dev/hdisk0  -g level

      Where hdisk0 is part of the cloned rootvg as below.

# lspv | grep rootvg
 hdisk0          00z301dce111df74                    altinst_rootvg
 hdisk1          00c503d45e50dr04                    rootvg          active
  • If we need few more details on the cloned disk, then below command will be useful. If we need TL level just need to check the date when clone performed and we know when the TL or SP upgrade happened on the server. so based on that we can decide the TL level.
 /usr/lpp/bosinst/blvset -d /dev/hdisk0  -g menu
locale: C C C C C C
console:
blvname: hd5
targ_dev: /dev/hdisk0
root_fsattr: hd4:jfs2:hd8
timestamp: Fri Jun 28 12:57:06 2013
padstring: 7.1 pad string:@%$#~!~~!~#$%@