Monday, April 20, 2020

New lpp_source creation using the old lpp_source in aix?

New lpp_source creation using the old lpp_source in aix?


The below steps clearly explain, how to create a new lpp_source with the help of existing lpp_source.
Here, I am planning to create a lpp_source for AIX 71TL05SP02 using the old lpp_source AIX71 TL04SP05.


Download the AIX 7.1.5.2 patch files (*.bff) from aix fixcentral and keep it on our server.
===========================================================================================
cd /patching/aix7152    --> (Here we can keep the AIX 7.1.5.2 path files (.bff) format))
inutoc .
ls -l .toc

Create a separate filesytem for the lppsource
==============================================
mklv -y lpplv -t jfs2 migrationvg 120
crfs -v jfs2 -d lpplv -A yes -m /export/lpp_source/aix7152_lppsource -a logname=INLINE -a logsize=245
mount /export/lpp_source/aix7152_lppsource

 Copy all the files from the current lpp_source which is aix7145_lppsource to the new created FS
================================================================================================
cp -rp /export/lpp_source/aix7145_lppsource* /export/lpp_source/aix7152_lppsource
cd /export/lpp_source/aix7152_lppsource/installp/ppc
chown root:system *
chmod 644 *

Define the new lpp_source directory as an lpp_source resource
==============================================================
nim -o define -t lpp_source -a server=master -a location=/export/lpp_source/aix7152_lppsource aix7152_lppsource

 Upgrade the lpp_source using the patch directory as a source of patches
=======================================================================
nim -o update -a packages=all -a source=/patching/aix7152 aix7152_lppsource
cd /export/lpp_source/aix7152_lppsource/installp/ppc
chown root:system *
chmod 644 *

 Remove the duplicate software and any superseded updates from new lpp_source
=============================================================================
nim -o lppmgr -a lppmgr_flgs="-bu -x -r -e" aix7152_lppsource
lsnim -l aix7152_lppsource  (** check the "Rstate" equals "Ready for use" and "simages" equals "yes"**)


**NOW UPGRADE THE SERVER USING THE NEWLY CREATED LPP_SOURCE and MAKE SURE ALL THE FILESETS ARE IN CONSISTENT STATE**


 Create SPOT from LPP_SOURCE
===========================
 Define spot
============
nim -o define -t spot -a server=master -a locatioin=/export/spot --a source=aix7152_lppsource aix7152_spot
lsnim -l aix7152_spot

Check if bos.alt_disk_install.rte is in spot
===========================================
nim -o showres aix7152_spot|grep -i bos.alt_disk_install.rte

Execute only if bos.alt_disk_install.rte not in spot
=====================================================
nim -o cust -a lpp_source=aix7152_lppsource -a filesets=bos.alt_disk_install.rte aix7152_spot

Check bos.alt_disk_install.rte installed now in spot
=====================================================
nim -o showres aix7152_spot|grep -i bos.alt_disk_install.rte