Showing posts with label Installation. Show all posts
Showing posts with label Installation. Show all posts

Thursday, 4 July 2013

Moving Power Systems from an old HMC to a new HMC

Technote (FAQ)

Are there any steps that need to be performed on an old HMC before moving a server to a new HMC?

Answer

This technote is written for customers that use DHCP on their HMC's private network to connect to the Power servers. Before you physically remove your older Power5, Power6 or Power7 server connections from their existing HMC and move them to the new HMC you will need to first perform a logically remove so they will be ready to connect to a new HMC and get a DHCP lease.

If you just move the physical connections from one HMC to another without removing the logical connection first then the servers might not connect to the new HMC or take a long time doing so.

Performing a Logical Remove

To remove the connection you used the Connections task menu and the sub-menu item is

"Reset or remove connection". 

Take the remove option to remove the server connection from their existing HMC.
Navigation through the GUI would be through following task option menus
Systems Management
-> Servers
--> Select server
---> Expand Connections task menu
----> Click on Reset or remove connection
-----> Use the remove option and press OK to remove the system

The command line option to do a remove has following syntax
rmsysconn -o remove --ip <FSP IP address to remove>
You can see the IP addresses of the flexible service processor (FSP) for a managed system by running
lssysconn -r all
If you use the rmsysconn command instead of the HMC GUI then make sure you remove all IP addresses associated with the server.

Perform the physical connections to new HMC

After you logically remove a system from an existing HMC, physically move the cable over to the new HMC's private switch.

Perform command to prepare HMC for new connections
On the new HMC you might need to run following command.
mksysconn -o auto
It will take several minutes for the server to show up on the new HMC, and when it does it will be as an IP address in state Failed Authentication. You can use the update password task to authenticate the HMC with the server using the appropriate HMC access password for the server.

Monday, 20 May 2013

HOWTO determine installed Technology Level

Introduction

The new IBM methodology dictates two Technology Level (TL) releases per year. The first Technology Level includes hardware features, enablement, and software services. The second includes software features in the release, which means the second release is larger and more comprehensive. Finally, there is also now support for new hardware on older Technology Levels. This page is dedicated about finding information about AIX systems versions.

Determine machine type

To determine the machine type of an IBM AIX server use the uname command:

Command: determining the machine type


# uname -MuL
IBM,9133-55A IBM,0365B005G 3 65-B005G

The options:
-M: gives the machine type and model.
-u: gives the plant code and machine identifier.
-L: show the LPAR number and name.

so in the example:

The machine type: is 9113,
The model is: 55A,
OF prefix IBM: 0365B005G,
Plant code is 3,
Sequence number, 65-B005G

Determine OS level and maintenance level

To determine the AIX OS level and maintenance level use the instfix command with the option -i:

Command: determining the operating system level

# instfix -i | grep AIX_ML
    All filesets for 5.3.0.0_AIX_ML were found.
    All filesets for 5300-01_AIX_ML were found.
    All filesets for 5300-02_AIX_ML were found.
    All filesets for 5300-03_AIX_ML were found.
    All filesets for 5300-04_AIX_ML were found.
    All filesets for 5300-05_AIX_ML were found.
    All filesets for 5300-06_AIX_ML were found.
    All filesets for 5300-07_AIX_ML were found.
    All filesets for 5300-08_AIX_ML were found.

You can also use the command oslevel to determine the current AIX version, the -r option determines the highest recommended technology level.

Command: determining the highest technology level

# oslevel -r
5300-08


Friday, 26 April 2013

Software management in AIX


Fileset in AIX is named for softwares or dependencies.
Group of filesets is called a package.
For eg: bos.net is a package and bos.net.nfs.client is a fileset.
BOS stands for Base Operating System.
BOS is a licensed programming product (LPP).
Bundle : A bundle is a collection of a fileset, package or LPP.
Bundle is of 3 types:
  1. Server bundle
  2. Graphics bundle
  3. Migration bundle
Command used to install softwares is installp
Various commands to install software:
# installp –aVx –d <directory or device name> <application name>
For eg:
# installp – aVx –d /dev/rmt0 bos.net.nfs.client
Flags:
a stands for APPLIED mode. Software installed in applied mode means, admin can rollback the software if the wrong version gets installed or software is not suited as per end user requirements. Because the software is not committed to the OS, so rollback is possible.
To commit the software/application permanently in the OS, command used:
# installp –aCx –d <directory or device name> <application file>
For eg:
# installp –aCx –d /dev/rmt0 bos.net.nfs.client
Flags:
c stands for COMMITTED mode. Once the application is installed using c flag, it cannot be removed later from the OS. Admin must be very careful in running this command.
To remove an application which is installed in applied mode, command used is:
# installp –r <application name>
To uninstall the fileset, command used:
# installp –u <application name>
To clean broken software parts, command used:
# installp –C
To check all softwares installed in APPLIED mode, command used:
# installp –S
To list all the softwares installed in AIX or LINUX OS, command used are:
# lslpp –l (works only in AIX)
# lslpp –L (works in both AIX as well as Linux)
# lslpp –h <application name>
This command will give complete history about the application including the versions installed.
For eg:
# lslpp –h bos.obj
# lslpp –L | grep APPLIED
Will list all the applications installed in APPLIED mode in the OS.
Command used to find the filesets installed for a particular application is:
# lslpp –f <application name>
Command used to find the filesets installed for running any command is:
# lslpp –w /usr/bin/<command>
For eg:
# lslpp –w /usr/bin/path
This command will give the list of filesets needed to run the PATH command.
# lslpp –c command is used to verify the checksum
# lslpp –v command is used to verify the software parts.
To install softwares in Linux commands used are:
# rpm –ivh <application name>
POINTS TO REMEMBER:
Install command’s output is always stored in user’s smit.log directory i.e. /home/smit.log
Software components are basically broken down into 3 types:
  1. Root
  2. Usr
  3. Share
Fileset + package together is called a Bundle.
To check using SMIT whether software is installed properly or not, command used is:
# smit list_installed
To report comparison for softwares, command used:
# smit compare_report
To check software management and utilities, command used:
# smit maintain_software
To install fix from a cd, command used:
# instfix –ik <fix number> -d /dev/cd0
To search for a fix by keyword:
# instfix –s <keyword> -d /dev/cd0
To display all fixes available on cd:
# instfix –T –d /dev/cd0
# instfix –I | grep ML command will list all the fixes for ML (maintenance Level)
# instfix –I | grep TL command will list all the fixes for TL (Technology Level)
Formula for RISC (Reduced Instructions Set Computer):
Time to execute a program = number of instructions X number of clock cycles per instruction X time taken for a clock cycle
mkinstallp command creates software package in install format.
To install updates available on a cd and verify the current maintenance level, command used is:
# install_all_updates –d /dev/cd0

Tuesday, 23 April 2013

Cloning rootvg using alt_disk_copy

Using alt_disk_copy (see the Resources section) to clone your rootvg disks for ease of back-out when doing AIX® upgrades or applications upgrades that resided on the rootvg disks. In that article, I did not cover hardware migrations as this was out of scope. In this article, I discuss how this can be achieved. The man page on alt_disk_copy states (by using the 'O' option), "Performs a device reset on the target altinst_rootvg. This causes the alternate disk install to not retain any user-defined device configurations. This flag is useful if the target disk or disks become the rootvg of a different system."

In a nutshell, this means that any devices that have had their attributes changed, typically by the system administer, are reset to the default value(s). This could mean any changes to the following, but not restricted to:
  • Ethernet cards—reset of IP addresses /hostname
  • Fibre (SAN) cards—reset of any attributes changes, like fc_err_recov
  • sys0—reset of any attributes changes, like maxuproc
  • Reset of the diag hardware email notification list
The process of the migration or move using the cloned rootvg disk method is down to your operating requirements. The most common use is to clone a rootvg disk and insert it onto the new machine for a new base build. This process can be done with the source machine still running. Indeed, it is practical that once the cloned disk is across, you get that disk mirrored, then insert a new disk on the source, and re-mirror that one so you have no down time on the source machine.

However, in this demonstration, I will point out procedures one could use to migrate to new hardware. Taking fibre cards from the source machine to the new machine, as well as the SAN attached disks. As a general rule, there is no need to remove the Ethernet cards, as any new machine, should already have these present.

Review your existing configuration

If you are only concerned about cloning rootvg to build a base new machine, then there is no point in gathering current configurations. Only if you are migrating to new hardware from the current hardware do you have to take config listings to change attributes on the new system.
When migrating to new hardware, review your inittab setting, comment out the services that you do not want to come up until the migration is complete. It is also advisable to take configuration listing of the current AIX machine, so any changes that are reset by the alt_disk_copy and be changed once the new system is brought up.

The following is not an exhaustive list of configuration listing you need to check and amend on the new system when migrating, but it is a good starting point:
  • Listings of all VGs and their LV contents
  • Listing of all the PVs
  • lsattr -El output of all fibre and scsi cards
  • For aio servers, on AIX 6 and 7, ioo -a
  • For aio server, on 5.3 and below use: lsattr -El aio0
  • Listings of Ethernet cards (including ether-channel if present)
  • Take note of IPs and gateway addresses
  • lscfg -vp output
  • lsdev output (ie: lsdev -Cc disk)

Prepare to move

In this demonstration, you can assume:
  • alpha is the source host.
  • bravo is the destination host.

Be mirrored up

On host alpha, make sure the rootvg is mirrored. In this demonstration, we can see that rootvg is not fully mirrored, /opt/db2_09_01, only has one copy. So you need to fix that before unmirroring rootvg.
# lsvg -l rootvg
rootvg:
LV NAME             TYPE       LPs     PPs     PVs  LV STATE      MOUNT POINT
hd5                 boot       1       2       2    closed/syncd  N/A
hd6                 paging     4       8       2    open/syncd    N/A
hd8                 jfs2log    1       2       2    open/syncd    N/A
hd4                 jfs2       8       16      2    open/syncd    /
hd2                 jfs2       36      72      2    open/syncd    /usr
hd9var              jfs2       3       6       2    open/syncd    /var
hd3                 jfs2       16      32      2    open/syncd    /tmp
hd1                 jfs2       8       16      2    open/syncd    /home
hd10opt             jfs2       6       12      2    open/syncd    /opt
hd11admin           jfs2       1       2       2    open/syncd    /admin
lg_dumplv           sysdump    8       16      1    open/syncd    N/A
livedump            jfs2       2       4       2    open/syncd    /var/adm/ras/l
ivedump
fwdump              jfs2       1       2       2    open/syncd    /var/adm/ras/p
latform
fslv01              jfs2       8       8       1    open/syncd    /opt/db2_09_01
loglv01             jfslog     1       2       2    open/syncd    N/A

# mklvcopy fslv01 2
# syncvg -l fslv01
# lsvg -l rootvg
rootvg:
LV NAME             TYPE       LPs     PPs     PVs  LV STATE      MOUNT POINT
hd5                 boot       1       2       2    closed/syncd  N/A
hd6                 paging     4       8       2    open/syncd    N/A
hd8                 jfs2log    1       2       2    open/syncd    N/A
hd4                 jfs2       8       16      2    open/syncd    /
hd2                 jfs2       36      72      2    open/syncd    /usr
hd9var              jfs2       3       6       2    open/syncd    /var
hd3                 jfs2       16      32      2    open/syncd    /tmp
hd1                 jfs2       8       16      2    open/syncd    /home
hd10opt             jfs2       6       12      2    open/syncd    /opt
hd11admin           jfs2       1       2       2    open/syncd    /admin
lg_dumplv           sysdump    8       16      1    open/syncd    N/A
livedump            jfs2       2       4       2    open/syncd    /var/adm/ras/l
ivedump
fwdump              jfs2       1       2       2    open/syncd    /var/adm/ras/p
latform
fslv01              jfs2       8       16      2    open/syncd    /opt/db2_09_01
loglv01             jfslog     1       2       2    open/syncd    N/A 

Confirm your boot image is good and mirrored, if not alt_disk_copy will fail:
# lslv -m hd5
hd5:N/A
LP    PP1  PV1               PP2  PV2               PP3  PV3
0001  0001 hdisk0            0001 hdisk1

Identify the disk to move

Before alt_disk is executed, it is good prudence to identify physically the disk that will be removed. Depending on how your disks are placed, use either the hot-swap smit utility or smit diag to identify the disk location using the menu selections:
smit diag
task selection
identify /attention indicator

Make sure you know which is hdisk0 and hdisk1. A useful tip here is to put a small sticker of each drive with their corresponding hdisk names, so you can be sure you do not remove the wrong disk. In this demonstration, we will initially be moving hdisk1 to the new hardware, so first locate hdisk1 location code, using:
# lscfg -vp |grep -w hdisk1
  hdisk1           U787F.001.DPM0Y7F-P1-T10-L4-L0   16 Bit LVD SCSI Disk Drive (
18200 MB)

Now using smit diag, use the above hdisk1 location code to match up with the device location code you want to identify. Once the hdisk1 light comes on, label it, for reference.
Next, do the following:
  • run bosboot
  • unmirrorvg rootvg
  • reducevg rootvg to remove hdisk1
# bosboot -a
# unmirrorvg rootvg hdisk1
0516-1246 rmlvcopy: If hd5 is the boot logical volume, please run 'chpv -c <disk
name>'
        as root user to clear the boot record and avoid a potential boot
        off an old boot image that may reside on the disk from which this
        logical volume is moved/removed.
0516-1804 chvg: The quorum change takes effect immediately.
0516-1144 unmirrorvg: rootvg successfully unmirrored, user should perform
        bosboot of system to reinitialize boot records.  Then, user must modify
        bootlist to just include:  hdisk0.
# reducevg rootvg hdisk1
# lspv
hdisk0          00c23bed7c1b3d4b                    rootvg          active
hdisk1          00c23bedf2976238                    None
hdisk2          00525c6a888e32cd                    apps_vg         active

Start the alt_disk_copy

Now we can clone hdisk1 from the current AIX in rootvg which is hdisk0. The format for the alt_disk_copy is:
alt_disk_copy -Od hdisk1

Where:
  • O, described earlier, removes all user defined ODM entries.
  • d is the destination disk when the cloned rootvg disk is to go; in this example, it is hdisk1.
You can also specify bootlist options, but I prefer to control this myself as part of the checklist during the migration. Listing 1 below contains the full output from running the alt_disk_copy command.


Listing. 1 alt_disk output

# alt_disk_copy -Od hdisk1
Calling mkszfile to create new /image.data file.
Checking disk sizes.
Creating cloned rootvg volume group and associated logical volumes.
Creating logical volume alt_hd5
Creating logical volume alt_hd6
Creating logical volume alt_hd8
Creating logical volume alt_hd4
Creating logical volume alt_hd2
Creating logical volume alt_hd9var
Creating logical volume alt_hd3
Creating logical volume alt_hd1
Creating logical volume alt_hd10opt
Creating logical volume alt_hd11admin
Creating logical volume alt_lg_dumplv
Creating logical volume alt_livedump
Creating logical volume alt_fwdump
Creating logical volume alt_fslv01
Creating logical volume alt_loglv01
Creating logical volume alt_lv00
Creating /alt_inst/ file system.
/alt_inst filesystem not converted.
        Small inode extents are already enabled.
Creating /alt_inst/admin file system.
/alt_inst/admin filesystem not converted.
        Small inode extents are already enabled.
Creating /alt_inst/home file system.
/alt_inst/home filesystem not converted.
        Small inode extents are already enabled.
Creating /alt_inst/opt file system.
/alt_inst/opt filesystem not converted.
        Small inode extents are already enabled.
Creating /alt_inst/opt/db2_09_01 file system.
/alt_inst/opt/db2_09_01 filesystem not converted.
        Small inode extents are already enabled.
Creating /alt_inst/storix file system.
Creating /alt_inst/tmp file system.
/alt_inst/tmp filesystem not converted.
        Small inode extents are already enabled.
Creating /alt_inst/usr file system.
/alt_inst/usr filesystem not converted.
        Small inode extents are already enabled.
Creating /alt_inst/var file system.
/alt_inst/var filesystem not converted.
        Small inode extents are already enabled.
Creating /alt_inst/var/adm/ras/livedump file system.
/alt_inst/var/adm/ras/livedump filesystem not converted.
        Small inode extents are already enabled.
Creating /alt_inst/var/adm/ras/platform file system.
/alt_inst/var/adm/ras/platform filesystem not converted.
        Small inode extents are already enabled.
Generating a list of files
for backup and restore into the alternate file system...
Backing-up the rootvg files and restoring them to the
alternate file system...
Modifying ODM on cloned disk.
Building boot image on cloned disk.
Resetting all device attributes.
NOTE: The first boot from altinst_rootvg will prompt to define the new
system console.
Resetting all device attributes.
NOTE: The first boot from altinst_rootvg will prompt to define the new
system console.
forced unmount of /alt_inst/var/adm/ras/platform
forced unmount of /alt_inst/var/adm/ras/platform
forced unmount of /alt_inst/var/adm/ras/platform
forced unmount of /alt_inst/var/adm/ras/livedump
forced unmount of /alt_inst/var/adm/ras/livedump
forced unmount of /alt_inst/var
forced unmount of /alt_inst/var
forced unmount of /alt_inst/usr
forced unmount of /alt_inst/usr
forced unmount of /alt_inst/tmp
forced unmount of /alt_inst/tmp
forced unmount of /alt_inst/storix
forced unmount of /alt_inst/opt/db2_09_01
forced unmount of /alt_inst/opt/db2_09_01
forced unmount of /alt_inst/opt
forced unmount of /alt_inst/opt
forced unmount of /alt_inst/home
forced unmount of /alt_inst/home
forced unmount of /alt_inst/admin
forced unmount of /alt_inst/admin
forced unmount of /alt_inst
forced unmount of /alt_inst
Changing logical volume names in volume group descriptor area.
Fixing LV control blocks...
Fixing file system superblocks...
Bootlist is set to the boot disk: hdisk1 blv=hd5

# lspv
hdisk0          00c23bed7c1b3d4b                    rootvg          active
hdisk1          00c23bedf2976238                    altinst_rootvg

After executing alt_disk_copy, unless otherwise specified, the default action is to set its bootlist to the disk alt_disk it resides on; in this case, it is hdisk1. We need to err to caution and make sure host alpha will still reboot back to hdisk0 in case we have to backout of the migration. So change the bootlist to hdisk0:
# bootlist -m normal hdisk0

Then shut down host alpha.

At this point, we could have kept host alpha up and dynamically remove the disk by using:
# rmdev -dl hdisk1 

However, eventually we will need to shut host alpha down to remove the remaining rootvg hdisk. So we might as well shut it down now.

Booting the cloned disk

In this scenario, we are moving the current hardware cards from host alpha and inserting them into host bravo. Host alpha and bravo are currently down.
  • Remove the network cable and the SAN fibre cables, if present, along with the fibre cards and insert these cards on the host bravo; then plug the cables in.
  • On host bravo remove the existing, if present, internal boot disks as we will be replacing these from host alpha.
  • On host alpha remove, hdisk1 and insert it into host bravo in the location that was previously populated with the boot disks.
  • Bring up host bravo; upon boot up, go into the SMS menu.
When host bravo comes, it will display the firmware/SMS menu prompts. Hit 1 to enter SMS menu, as shown below in Figure 1.


Figure 1. SMS
Screen shot of the SMS menu 

Go to the boot order list and select the disk to boot up on. There should only be one disk to boot up. Figure 2 shows the newly cloned disk to boot up on.


Figure 2. SMS boot list
Screen shot of the SMS boot list 

Upon booting off that disk, the AIX kernel starts to load as shown in Figure 3. The disk comes up and loads AIX.


Figure 3. Booting up
Screen shot of the AIX kernel booting up 

You are then prompted to define the system console, select 1 for this console, as shown in Figure 4. The console definition has been reset, because it is a ODM user defined attribute.


Figure 4. Identify new console
Screen shot of the system console 

Once AIX is booted up, log in and check your disk:
# lspv
hdisk0          00c23bedf2976238                    rootvg          active

Notice that the formally named hdisk1 on host alpha is now hdisk0 on host bravo. Change the bootlist to boot of this disk, until the migration is complete:
# bootlist -m normal hdisk0

Configure the network card to the IP that was used on host alpha and the card speed, if required. Confirm you are connected onto the network, test to ensure that you can ping outside your gateway, and ensure you can connect to the DNS via any of the following commands:
nslookup
dig
host

Confirm that you can connect to the host bravo via telnet/ssh from a remote session. You may have to start manually ssh on host bravo as this may not be running:
# startsrc -s sshd

Bring in the other rootvg disk

If all is OK at this point, we can bring in the other rootvg disk from host alpha:
  • Remove the last boot disk (hdisk0) from host alpha.
  • Insert the disk in host bravo; this disk is now hdisk1.
  • Run cfgmgr to discover the disk.
We are not mirroring the disk just yet. First, we need to make sure we get all the SAN disks discovered. If we have issues with this, we can take the newly insert disk back to the original box in case we need to back out of the migration.
If bravo comes up with old_rootvg, just remove the definition with:# alt_rootvg_op -X old_rootvg




Review hardware attributes and bring in the VGs

On host bravo, check for any changes that may need to be done from the listings taken from the output of the aio, sys0, scsi/fibre card(s). Adjust these setting, either via smit or the chdev command.

Discover the WWNs for the fibre cards. This is obtained looking at the output from the lscfg -vp command and searching for the SAN cards fcs0, fcs1, etc. Once obtained, use these to re-zone in the SAN disks from the switch, then import the VGs. If you have more than one SAN VG across different switches, then I recommend only leaving in the cable for the switch that holds one of the VGs. Pull the disks in using cfgmr; then import that VG. Once imported, plug in the other fibre cable and re-run cfgmgr and import that VG. The reason for this is if you do not, all the disks will come down the fibre paths. When you import the VGs, all the disks will be imported onto that one VG, which is probably not what you want. (You do not get this issue with scsi raid controllers that have more than one VG).

If you have problems with importvg, be sure to check out the cables attached. You may have to run varyonvg afterwards, as AIX does not automatically varyonvg if it gets issues with the importvg.
Next, mount the file-systems.
# mount -a

Check to ensure that all file-systems are mounted and all LVs are open.
# lsvg -l <vg name>

Uncomment the changes that was made to the inittab.
Refresh iniitab, so it is re-read.
# init q

Now start the applications up and test.

Mirror up

If all looks good at this point and the sanity checks are good, mirror up the other disk. You need to use the force option when bringing it into rootvg.
# extendvg -f rootvg hdisk1 
# mirrorvg rootvg hdisk1

Oh no, it's all gone terribly wrong!

If the migration or move fails, remove the second (boot) disk from host bravo. Remember this should have not been put into rootvg on host bravo until all the applications are tested OK. So this disk still holds the ODM setting from host alpha, so you are good to go for a back-out process. Using the procedures described in the article about moving the cards/cables, simply do it in reverse.

In some situations, it maybe the case the disk will be shown with the alt_disk tag still associated with it. Simply remove this tag before bringing it into rootvg and mirroring up.
# alt_rootvg_op -X altinst_rootvg

Conclusion
I have highlighted just one method of a hardware migration. Though this has not been a step-by-step guide, it does provide one way you can approach a migration. There are different variations you can employ to do a hardware migration or move using alt_disk_copy. The alt_disk_copy utility is a good tool to use when you wish to migrate to new hardware, and the machines are located in the same location room.


Monday, 22 April 2013

Software Installation & Maintenance- AIX

Software States:

When a software or an update is first installed, it is in the APPLIED state. It can be later commited or rejectd.

APPLIED state

  • Provide opportunity to test the software
  • Enable to go back to the previous version in case of any problem
  • Enable to commit software at a later stage
  • Requires more disk
  • Prevents future re-installation of product

COMMITED state

  • Requires less disk space
  • Permits future upgrade
  • Prevents from easily going back to previous version
Reject action removes the APPLIED software and go back to the previous commited version

List the installed filesets/fileset updates

To list all the installed software
 # lslpp -l
To display the maintenance level and state of a fileset
 # lslpp -l bos.net.nfs.client
Lists installed software using ':' as the delimeter
 # lslpp -Lc 
To display the names of all the files of fileset bos.perf
 # lslpp -f  bos.perf
To find out which fileset a file belongs to
 # lslpp -w /usr/sbin/nfsd 
To list installation history of filesets
 # lslpp -ha
To the filesets that do not have the required prerequisites or are not completely installed
 # lslpp -v 

Install filesets / software

installp command is used to install the software. The options are
        -a  Install filesets in APPLIIED state
        -c  Commit filesets  
        -r  Reject filesets which are in APPLIED state
        -u  Uninstall filesets
        -C  Cleanup failed installtion
        -g  To Install or Uninstall dependencies
        -x  To expand file systems if there is not enough space
        -d <device>    Device or directory which contains  
                       the software
        -f <filename>  User created file which has a list of 
                       software to be installed or deleted
Emaples:
To list all installable software in media /dev/cd0
 installp [-L|-l] -d /dev/cd0    
To cleanup all failed installtion
 installp -C                     
To install bos.net software (apply and commit) package with all pre-requisites from directory /tmp/net
 installp -acgx -d /tmp/net bos.net 
To commit teh applied updates
 installp -cgx all
To remove bos.net package
 installp -ug bos.net
instfix coomand is used to install a fix or set of fixes. It is also used to find out if a fix is installed on a system.
To find out whether a Fix is installed or not
 # instfix -i -k <APAR Number>
To list all the fixes that are installed on your system
 # instfix -i -v 
To list filesets which are lesser than the specified maintenance level
 # instfix -ciqk 5100-04_AIX_ML | grep ":-:"
To install all filesets associated with fix Ix38794 from the tape
 # instfix  -k Ix38794  -d /dev/rmt0
To Display the entire list of fixes present on the media
 # instfix -T -d /dev/cd0
To confirm the AIX preventive maintenance level on your system
 # instfix -i | grep ML
 All filesets for 5.0.0.0_AIX_ML were found.
 All filesets for 5.1.0.0_AIX_ML were found.
 All filesets for 5.1.0.0_AIX_ML were found.
 All filesets for 5100-01_AIX_ML were found.
 All filesets for 5100-02_AIX_ML were found.
To verify that all filesets have all required requisites and are completely installed
 #lppchk -v
oslevel command is used to find out the version and maintenance level of AIX
To see the current OS and Maintenance level
# oslevel
 # oslevel -r     - To see the current maintenance level
 # oslevel -s     - To see the current service pack level
 # oslevel -l 4.1.2.0  -  To determine the file sets that are below level 4.1.2.
 # oslevel -g     - To determine the file sets that are later than the current maintenance level
 # oslevel -rq    - To list all known recommended maintenance levels on the system 
Updating the software to the latest level
01. Using smit
    # smit update_all
02. To update all filesets in a system using command line
    
a. Create the list of filesets installed
       # lslpp -Lc | awk -F: '{print $2}'| tail -n +2 > /tmp/lslpp    
b. Update the softwares using installp command
       # installp -agxYd /dev/cd0 -e /tmp/<exclude_list> -f /tmp/lslpp
Another way of updating all the filesets
 # /usr/lib/instl/sm_inst installp_cmd  -acgNXY -d <localtion_of_updates> -f '_update_all'
For not committing and saving all replaced files
 # /usr/lib/instl/sm_inst installp_cmd  -agX -d <localtion_of_updates> -f '_update_all'
To list all the installed efixes on a system
 # emgr -l
To install a efix IY93496.070302.epkg.Z in /mnt directory
 # emgr -e /mnt/IY93496.070302.epkg.Z

inutoc

The inutoc command creates the .toc file in Directory. If a .toc file already exists, it is recreated with new information. The inutoc command adds table of contents entries in the .toc file for every installation image in Directory.

The installp command and the bffcreate command call this command automatically upon the creation or use of an installation image in a directory without a .toc file

To create a .tocfile for the /tmp/images directory, enter:
 # inutoc /tmp/images

bffcreate

The bffcreate command creates an installation image file in backup file format (bff) to support software installation operations. It creates an installation image file from an installation image file on the specified installation media

To create an installation image file from the bos.net software package on the tape in the /dev/rmt0 tape drive and use /var/tmp as the working directory, type:
 # bffcreate  -d /dev/rmt0.1 -w /var/tmp bos.net

Friday, 19 April 2013

Installation specific commands in AIX


lslpp -l                              To see the details of installed file sets

lslpp -ha bos.net.*             To list the installation history of all file set in bos.net packages

lslpp -f bos.rte                   To list the files in the bos.rte package

lslpp -w /etc/hosts
            To list the file set which contain /etc/hosts file (parent fileset)

lslpp -p bos.net.nfs.server  To list the pre requisites for bos.net.nfs.server file set 

lslpp -d                To show dependancies of fileset
          
installp -L -d /dev/rmt0.1  To list the installable products on the device rmt0

installp -aX -d /dev/rmt0.1 bos.net   To install all filesets within bos.net and expands file system if it requires

installp -u bos.net       To remove bos.net

installp -r                      To reject the applied software

installp -c -f                  
To commit the applied fileset

installp -C                     To cleanup an incomplete installation

lppchk -c                      To check the fileset items and verifies that the checksum and filesize are consistent with SWVPD

lppchk -v                      verify that all filesets have required requisites and are completely installed

instfix -k IX9999 -d /dev/rmt0.1 To install the file set associated with fix IX9999 from rmt0

instfix -ik IX9999         To verify fix IX9999 installed