I want to update my client to the latest AIX 7.1 service pack (service pack 5 for AIX 7.1) and I wanna get rid of the old « exportfs – mount – smit update_all – umount  » sequence, and use the NIM server for what is has been created for : Network Installation !

Let’s check the oslevel on my lpar :

 # oslevel -s
7100-01-03-1207

I’m two service packs late, the latest one is SP5 .

Checking the status of the nim client

First check your nim services and configure them if necessary (like nimsh):

 # nimclient -l master
master machines master

If the previous doesn’t return anything, then you might need to reconfigure your nim services (enabling nimsh should do the trick) :

 # smit nim_config_services

You can double check by viewing the /etc/niminfo file on the client:

 # cat /etc/niminfo
#------------------ Network Install Manager ---------------
# warning - this file contains NIM configuration information
# and should only be updated by NIM
export NIM_NAME=client_lpar_name
export NIM_HOSTNAME=client_lpar_name.ibm.com
export NIM_CONFIGURATION=standalone
export NIM_MASTER_HOSTNAME=my_nim_master
export NIM_MASTER_PORT=1058
export NIM_REGISTRATION_PORT=1059
export NIM_SHELL="nimsh"
export NIM_MASTERID=00F688F99C99
export NIM_CUSTOM="/../SPOT/usr/lpp/bos.sysmgt/nim/methods/c_script -a location=my_nim_master:/export/nim/scripts/client_lpar_name.script"
export NIM_BOS_IMAGE=/SPOT/usr/sys/inst.images/bos
export NIM_BOS_FORMAT=rte
export NIM_HOSTS=" 127.0.0.1:loopback:localhost 10.10.10.68:client_lpar_name.ibm.com 10.10.10.17:my_nim_master"
export NIM_MOUNTS=" nim_master:/export/um_lpp_source/7100.01.05.1228:/SPOT/usr/sys/inst.images:dir "
export ROUTES=" default:0:10.10.10.254 "

Then, with the following command you can try the connection to the NIM server (whilst verifying if  the lpp_source you’re looking for is available) :

 # nimclient -l -t lpp_source
6100-07-05-1228_lppsrc                     resources       lpp_source
7100-01-05-1228_lppsrc                     resources       lpp_source
7100-00-02-1041_lppsrc                     resources       lpp_source

As we can see, my update is already available as a NIM resource (lpp_source type)

Get the service pack from ISD or Fix Central and create a NIM resource from it

If not, you have to download it from Fix Central, or in my case, I just told my Systems Director’s update manager to download it, and push it to my NIM server :

Rq: if you wann know how to set up your ISD to get updates from fix central, I strongly recommend you to read this article from chmod666.org !

Once downloaded as a directory named « U853092 », you need to create the lpp_source NIM resource in order to use it for this update’s next step :

 # nim -o define -t lpp_source -a source=/export/um_lpp_source/U853092-a server=master -a location=/export/um_lpp_source/7100-01-05-1228 7100-01-05-1228_lppsrc
Preparing to copy install images (this will take several minutes)...

Starting the update

On the client, you can launch the nimclient command with the update_all method (you can also update a single package by specifying « fixes=yourpackage » instead of « fixes=update_all ») :

 # nimclient -o cust -a lpp_source=7100-01-05-1228_lppsrc -a installp_flags=agXYv -a fixes=update_all
BEGIN:Fri Jun 15 14:23:42 2012:061514234212
Command line is:
/usr/sbin/installp -u -e /var/adm/ras/nim.installp -b -f \
/tmp/.workdir.3735634.3670138_1/.genlib.installp.list.3670138
+-----------------------------------------------------------------------------+
 Pre-deinstall Verification...
+-----------------------------------------------------------------------------+
done
WARNINGS
--------
 Problems described in this section are not likely to be the source of any
 immediate or serious failures, but further actions may be necessary or
 desired.
Not Installed
 -------------
 No software could be found on the system that could be deinstalled for the
 following requests:</pre>

[…]

 * * * A T T E N T I O N * * *
 System boot image has been updated. You should reboot the
 system as soon as possible to properly integrate the changes
 and to avoid disruption of current functionality.
installp: bosboot process completed.
+-----------------------------------------------------------------------------+
 Summaries:
+-----------------------------------------------------------------------------+
Installation Summary
--------------------

[blah blah blah , success]

Let’s check it :

 #  oslevel -s
7100-01-05-1228

And you’re done ! No need to umount the exported FS containing the lpp_source, nimclient does it for you.

Share Button
NIM : update your system easily with nimclient
Taggé sur :        

Laisser un commentaire