Thursday, December 22, 2016

How to solve current boot logical volume /dev/hd5, does not exist on /dev/hdisk# in aix?

How to solve current boot logical volume /dev/hd5, does not exist on /dev/hdisk# in aix?



Many cases we could receive this issue when we run mksysb command or run alt_disk copy or create/recreate the bosboot image on the disk.

Please follow the below procedure to fix the issue.


#cd /usr/bin
#cp mkszfile mkszfile.old
#vi mkszfile

search for the argument "-qv" and find the following line


BOOT_BLKS=`LC_MESSAGES=C ${bosboot} -qv | ${tail} -1l | ${awk} '{print $2 * 2}'` 


Add the  -d /dev/ipldevice. The line should look like this when finished


BOOT_BLKS=`LC_MESSAGES=C ${bosboot} -qvd /dev/ipldevice| ${tail} -1l | ${awk} '{print $2 * 2}'` 


then save it and run mksysb or alt_disk again.

or


change mkszfile to use  #bosboot -qvd /dev/ipldevice

****************************************************************************************************************************************



Another blv error

==============


If /dev/ipldevice vary with the boot disk, need to follow the below steps to correct it. We will do the first step for sure and it will end up with error as below, proceed with the next steps.

bosboot -ad /dev/ipldevice
0516-602 lslv: Logical volume name not entered.
0301-168 bosboot: The current boot logical volume, /dev/hd5,   does not exist on /dev/hdisk0.

Solution:
lsvg -p rootvg - hdisk0
lslv -m hd5 -->
hdisk0 on PV1 1st partition
savebase -v - successful

will remove/recreate hd5 – no need to worry it worked good

# rmlv hd5
# mklv -y hd5 -t boot -a e rootvg 1 hdisk0
# cd /dev
# rm ipldevice
# ln /dev/rhdisk0 /dev/ipldevice
# bosboot -ad /dev/ipldevice - same error

# bootinfo -B hdisk0 - 1
# ln /dev/rhd5 /dev/ipl_blv
# cd /dev -
same maj/min numbers
# bosboot -ad /dev/ipldevice

Now we got the same minor and major number for hdisk0

# ls -ld /dev/ipldevice
crw-------    2 root     system       20,  0 Oct 31 2019  ipldevice
# ls -ld /dev | grep -i "20,  0"
# ls -l /dev | grep "20,  0"
brw-------    1 root     system       20,  0 Mar 31 08:54 hdisk0
crw-------    2 root     system       20,  0 Oct 31 2019  ipldevice
crw-------    2 root     system       20,  0 Oct 31 2019  rhdisk0
#
alt_disk_install was able to proceed now

****************************************************************************************************************************

Another blv error

=============


0301-162 bosboot: savebase failed with /dev/hdisk0.

0301-165 bosboot: WARNING! bosboot failed - do not attempt to boot device.


Solution
=======

Boot the sever into maintenance mode
Remove the corrupted blv - #rmlv –f hd5
recreate the new hd5 blv logical volume - # mklv -y hd5 -t boot -a e rootvg
create a bootimage - # bosboot -ad /dev/hdisk0
Shutdwon -Fr 


Thursday, September 15, 2016

How to reset the unknown root password in aix?

How to reset the unknown root password in aix?


1. Ground work:

Get the hmc details
Get the hscroot password of the HMC
Make sure CD available on the server.
Login to hmc and reboot the server from sms mode


2. Implementation

(Boot the server in sms mode and follow the below steps)

5. Select boot options
1. Select install/Boot device
4. IDE
1. IDE-CDROM
3. Service mode boot
1 Yes (Exit sms)
1. Type 1 and press enter to have english during install
3. Start maintenance mode for system recovery
1. Access a root volume group
0 Continue
1 (Select the boot device)
1. Access this volume group and start a shell

# passwd
Changing password for "root"
root's New password:
Enter the new password again:
sync;sync;sync;reboot
                     
3. Validation

login to the server with the new password and confirm you can logon successfully.

4. Downtime
Yes downtime required for this task.

Note: If you dont have CD to boot up the server in maintenance mode, then you can use the NIM server to get maintenance mode. Please see the link below.
http://howtoaix.blogspot.in/2015/04/how-to-boot-server-into-maintenance.html


Saturday, September 10, 2016

How to reboot HMC server in AIX?

How to reboot HMC server in AIX?


1. Ground work:

Ip address or hostname of the HMC
hscroot password to access the HMC
Get the Frames and Lpars attached to this hmc
cat /proc/uptime                   --> To check the uptime of the hmc


2. Reboot the HMC using command line

Login to the hmc with hscroot access
hmcshutdown -t now -r              --> To reboot the HMC


3. Reboot the HMC using GUI mode

Login to the HMC GUI using hscroot user account
HMC management --> Shutdown or restart  --> select Restart HMC  --> Click OK


4. Post check

cat /proc/uptime                   --> To check the uptime of the hmc
Check you can see all the Frames and its Lpars.


Wednesday, September 7, 2016

How to stop and start the hacmp cluster in aix?

How to stop and start the hacmp cluster in aix?


1. Ground work:

/usr/es/sbin/clu*/utiI/clRGinfo      --> To check the RG online status
lssrc -ls clstrmgrES                          --> To check the cluster manager is stable on both nodes
cat /var/hacmp/clverify/clverify.log  --> To check and confirm the log file has no errors.


Take a snapshot of the cluster

smitty hacmp
            extended configuration
                        snapshot configuration
                                    Create snapshot of the cluster configuration
                                                cluster snapshot name / Cluster snapshot description

The above will create .odm and .info file.
Take all the basic outputs

2. Stop the cluster services

smitty hacmp
            system management (C-Spoc)
                        Stop cluster services
                                    (Provide necessary details) stop now / provide node names/  Bring RG offline.

3. Validation

./clRGinfo                                 --> To check the RG online status
lssrc -ls clstrmgrES                   --> To check the cluster manager is stable on both nodes


4. Start cluster services

smitty hacmp
            system management (C-Spoc)
                        Start cluster services
                                    (Provide necessary details) start now / provide node names/  Choose Automatic for manage RG


5. Validation

/clRGinfo      --> To check the RG online status
lssrc -ls clstrmgrES                   --> To check the cluster manager is stable on both nodes
cat /tmp/hacmp.out                --> To check the HA services and RG status.



Tuesday, September 6, 2016

How to increase memory using dlpar in aix?

How to change memory using dlpar in aix?



1. Ground work:

uname -L                                 --> To find the Lpar name and Lpar id.
lparstat -i                                --> To check current assigned memory (Desired memory)
prtconf -m                               --> To check the size of the memory
lsrsrc ibm.managementserver     --> To find the hmc details where the lpar belongs to.
Get the hscroot password to access the HMC for the DLPAR operation.


2. Implementation steps 

Login to the HMC using hscroot access

system management
            servers
                        select the frame
                                    Select the lpar
                                                Dynamic Logical Partitioning
                                                            Processor
                                                                        Add or remove
                                                                                    change the assigned memory
(change the size of the memory - increase upto Maximum memory limits or decrease upto Minimum memory level)
                                                                                                Click OK

We need to change the same in the partition profile so that when the LPAR is reactivated, it should start with the new value.

Select the Lpar
            Configuration
                        Manage profile
                                    Select the default profile last activated
                                                Action
                                                            Edit
                                                                        Now change the desired memory value 
                                                                                    Click OK
                                   
4. Validation
lparstat -i                                        --> To check the output of the memory. (Check online memory)
prtconf -m                                       --> To check the size of the memory.



Tuesday, August 30, 2016

How to create EtherChannel in aix?

How to create EtherChannel or Link Aggregation in aix?


Two Ethernet adapters to be aggregated together to form a single Ethernet device.
For example, ent0 and ent1 can be aggregated into an EtherChannel adapter called ent3. And interface en3 would then be configured with an IP address.

1. Ground work:

lsdev -Cc adapter             --> To check the adapter details
lsdev -Cc adapter|grep -i etherchannel            --> To check already the server has any existing etherchannel


2. Implementation

(In the below example,  the physical interfaces ent1 & ent2 are configured for etherchannel)

 #smitty etherchannel
  EtherChannel / Link Aggregation Adapters         ent1                   +
  Enable Alternate Address                                           no                     +
  Alternate Address                                                       []                      +
  Enable Gigabit Ethernet Jumbo Frames                  no                     +
  Mode                                                                            standard               +
  Hash Mode                                                                  default                +
  Backup Adapter                                                          ent2                   +
  Internet Address to Ping                                                                            []
  Number of Retries                                                       []                      +#
  Retry Timeout (sec)                                                     []                      +#

Now the etherchannel ent3 has been created.  then put IP address to the etherchannel ent3
#smit  -->  Communications Applications and Services > TCP/IP > Minimum Configuration & Startup   
Now select the ent3 as a network interface and also provide mandatory info like hostname, netmask and then start now. 
                     
3. Validation

lsdev –Cc adapter|grep –i etherchannel   --> To confirm ent3 is a etherchannel
entstat -d enX |grep Active   --> To check the primary adapter is active
lsdev -Cc adapter             --> To check the adapter details 


4. Roll back

lsdev –Cc adapter|grep –i etherchannel   --> To check the etherchannel
#smitty etherchannel -> Remove An EtherChannel / Link Aggregation’
Reconfigure IP on the adapters


5. Downtime

NO downtime required for this task



Note:
If one adapter fails, network traffic is automatically sent on the next available adapter without disruption to existing user connections. The adapter is automatically failed back to service on the EtherChannel or Link Aggregation when it recovers.


Friday, August 26, 2016

How to find out the FC card is dual port or single port in aix?

How to find out the FC card is dual port or single port in aix?


We might come across many times that whether our Fiber channel card is single or dual port.

For example, if you want to see your fcs2 is single port or dual port in aix, then use the below command to confirm.


#lsslot -c pci |grep -i fcs2

U1.5-P1-I1 PCI 64 bit, 66MHz, 3.3 volt slot fcs2 fcs3

The above output clearly shows that fcs2 is a dual port fiber channel. That is fcs2 and fcs3.