Bundle creation

A NIM installp bundle is a file that contains the names of filesets that should be installed or removed by a NIM operation.

1. installp bundle file creation, I for filesets, R for RPM :


# cat openssh_server.bnd
I:openssl.base
I:openssl.license
I:openssl.man.en_US
I:openssh.base.server
I:openssh.man.en_US

2. installp bundle creation :

# nim -o define -t installp bundle -a server=master -a location=/export/nim/others/installp_bundle/openssh_server.bnd openssh_server-installp_bundle

3. install the bundle with a cust operation :

# nim -o cust -a lpp_source=7100-02-02-1316-lpp_source -a installp_flags=agXY -a installp_bundle=openssh_server-installp_bundle lpar1

Install a bundle or a fileset from the nim master, get rid of NFS mount to install packages !

# nim -o cust -a lpp_source=my_lpp_source -a installp_flags=agXY -a installp_bundle=my_customized_bundle lpar1

Or if you just want to install a single package, say openssh

# nim -o cust -a filesets=openssh.base -a lpp_source=my_lpp_source lpar1 

Of course, be sure to check that the fileset is included in your lpp_source :

 # nim -o showres my_lpp_source |grep ssh

openssh.base.client 6.0.0.6100 I N usr,root
openssh.base.server 6.0.0.6100 I N usr,root 

Update AIX to the latest Technology Level

From the NIM client :
# nimclient -o cust -a lpp_source=[latest_lpp_source_on_NIM] -a installp_flags=agXYv -a fixes=update_all

Update AIX to the latest Technology Level, on a alternate disk

# /usr/sbin/nim -o alt_disk_install -a source='rootvg'  -a disk='[target_alternate_disk_on_client]'  -a phase='all'  -a fixes="update_all" -a lpp_source='lpp_source61TL9SP4'  -a installp_flags=cNgXY   -a set_bootlist=yes -a debug=yes   -a show_details=yes  [NIM CLIENT] 
 

Update a mksysb from 5.3 to 6.1 (or 7.1) with nimadm

root@nim_master:/root# nimadm -T mksysb_lpar1 -O mksysb_lpar1_61TL8 -s 6100-08-01-1245-spot -l 6100-08-01-1245-lpp_source -j rootvg -Y -N mksysb_lpar1_61TL8
 Initializing the NIM master.
 0042-001 nim: processing error encountered on "master":
 /usr/bin/lslpp: Fileset bos.alt_disk_install.rte not installed.

0505-204 nimadm: SPOT 6100-08-01-1245-spot does not have bos.alt_disk_install.rte installed.
 0505-205 nimadm: The level of bos.alt_disk_install.rte installed in SPOT
 6100-08-01-1245-spot (0.0.0.0) does not match the NIM master's level (7.1.2.0).

Whoops we don’t have an up-to-date bos.alt.disk_install.rte … we need to update the lppsource :

# /root# nim -o cust -a filesets=bos.alt_disk_install.rte -a lpp_source=6100-08-01-1245-lpp_source 6100-08-01-1245-spot
Cleaning up alt_disk_migration on the NIM master. Installing filesets ...

Be sure to check the output from the SPOT installation to verify that all the expected software was successfully installed.

You can use the NIM "showlog" operation to view the installation log file for the SPOT.

+-----------------------------------------------------------------------------

+ Pre-installation Verification...

+-----------------------------------------------------------------------------

+ Verifying selections...done

Verifying requisites...done

Results...

SUCCESSES

---------

Filesets listed in this section passed pre-installation verification and will be installed.

Selected Filesets

-----------------

bos.alt_disk_install.rte 6.1.6.0 # Alternate Disk Installation ...

bos.alt_disk_install.rte 6.1.8.0 # Alternate Disk Installation ...

<< End of Success Section >>

+-----------------------------------------------------------------------------

+ BUILDDATE Verification ...

+-----------------------------------------------------------------------------

Verifying build dates...done

FILESET STATISTICS ------------------

2 Selected to be installed, of which:
2 Passed pre-installation verification
 ----
2 Total to be installed
[.......]
Finished processing all filesets. (Total time: 5 secs).
+-----------------------------------------------------------------------------
+ Summaries:
+-----------------------------------------------------------------------------
+ Installation Summary
--------------------
Name Level Part Event Result
-------------------------------------------------------------------------------
bos.alt_disk_install.rte 6.1.6.0 USR APPLY SUCCESS
bos.alt_disk_install.rte 6.1.6.0 ROOT APPLY SUCCESS
bos.alt_disk_install.rte 6.1.8.0 USR APPLY SUCCESS
bos.alt_disk_install.rte 6.1.8.0 ROOT APPLY SUCCESS
Checking filesets and network boot images for SPOT "6100-08-01-1245-spot".
This may take several minutes ...

root@nim_master:/root# nim -o showres 6100-08-01-1245-spot |grep alt
bos.alt_disk_install.rte 6.1.8.0 A F Alternate Disk Installation
root@nim_master:/root# nim -o check 6100-08-01-1245-spot
root@nim_master:/root# nimadm -T mksysb_lpar1 -O mksysb_lpar1_61TL8 -s 6100-08-01-1245-spot -l 6100-08-01-1245-lpp_source -j rootvg -Y -N mksysb_lpar1_61TL8 Initializing the NIM master.
0505-205 nimadm: The level of bos.alt_disk_install.rte installed in SPOT 6100-08-01-1245-spot (6.1.8.0) does not match the NIM master's level (7.1.2.0).
Cleaning up alt_disk_migration on the NIM master. 

Now we need to update the bos.alt_disk_install to the same AIX release than the NIM server…


root@nim_master:/root# nim -o cust -a filesets=bos.alt_disk_install.rte -a lpp_source=6100-08-01-1245-lpp_source 6100-08-01-1245-spot
root@nim_master:/root# nimadm -T mksysb_lpar1 -O mksysb_lpar1_61TL8 -s 6100-08-01-1245-spot -l 6100-08-01-1245-lpp_source -j rootvg -Y -N mksysb_lpar1_61TL8

 root@nim_master:/root# nim -o cust -a filesets=bos.alt_disk_install.rte -a lpp_source=7100-02-01-1245-lpp_source 6100-08-01-1245-spot
 Installing filesets ...

Be sure to check the output from the SPOT installation
 to verify that all the expected software was successfully
 installed. You can use the NIM "showlog" operation to
 view the installation log file for the SPOT.

[..]

+-----------------------------------------------------------------------------+
 Summaries:
 +-----------------------------------------------------------------------------+

Installation Summary
 --------------------
 Name Level Part Event Result
 -------------------------------------------------------------------------------
 bos.alt_disk_install.rte 7.1.0.1 USR APPLY SUCCESS
 bos.alt_disk_install.rte 7.1.0.1 ROOT APPLY SUCCESS
 bos.alt_disk_install.rte 7.1.2.0 USR APPLY SUCCESS
 bos.alt_disk_install.rte 7.1.2.0 ROOT APPLY SUCCESS

Checking filesets and network boot images for SPOT "6100-08-01-1245-spot".
 This may take several minutes ...

root@nim_master:/root# nim -o check 6100-08-01-1245-spot
 root@nim_master:/root# nimadm -T mksysb_lpar1 -O mksysb_lpar1_61TL8 -s 6100-08-01-1245-spot -l 6100-08-01-1245-lpp_source -j rootvg -Y -N mksysb_lpar1_61TL8
 Initializing the NIM master.
 Verifying alt_disk_migration eligibility.
 Initializing log: /var/adm/ras/alt_mig/mksysb_lpar1_alt_mig.log
 Starting Alternate Disk Migration.

+-----------------------------------------------------------------------------+
 Executing nimadm phase 1.
 +-----------------------------------------------------------------------------+
 Processing target mksysb resource "mksysb_lpar1".
 Restoring /image.data from mksysb image.

+-----------------------------------------------------------------------------+
 Executing nimadm phase 2.
 +-----------------------------------------------------------------------------+
 Creating nimadm cache file systems on volume group rootvg.
 Checking for initial required migration space.
 Creating cache file system /mksysb_lpar1_mm_alt/alt_inst
 Creating cache file system /mksysb_lpar1_mm_alt/alt_inst/home
 Creating cache file system /mksysb_lpar1_mm_alt/alt_inst/opt
 Creating cache file system /mksysb_lpar1_mm_alt/alt_inst/tmp
 Creating cache file system /mksysb_lpar1_mm_alt/alt_inst/usr
 Creating cache file system /mksysb_lpar1_mm_alt/alt_inst/var

+-----------------------------------------------------------------------------+
 Executing nimadm phase 3.
 +-----------------------------------------------------------------------------+
 Syncing mksysb data to cache ...

+-----------------------------------------------------------------------------+
 Executing nimadm phase 4.
 +-----------------------------------------------------------------------------+
 nimadm: There is no user customization script specified for this phase.

+-----------------------------------------------------------------------------+
 Executing nimadm phase 5.
 +-----------------------------------------------------------------------------+
 Saving system configuration files.
 Checking for initial required migration space.
 Setting up for base operating system restore.
 /mksysb_lpar1_mm_alt/alt_inst
 Restoring base operating system.
 Merging system configuration files.
 Running migration merge method: ODM_merge Config_Rules.
 Running migration merge method: ODM_merge SRCextmeth.
 Running migration merge method: ODM_merge SRCsubsys.
 Running migration merge method: ODM_merge SWservAt.
 Running migration merge method: ODM_merge pse.conf.
 Running migration merge method: ODM_merge vfs.
 Running migration merge method: ODM_merge xtiso.conf.
 Running migration merge method: ODM_merge PdAtXtd.
 Running migration merge method: ODM_merge PdDv.
 Running migration merge method: convert_errnotify.
 Running migration merge method: passwd_mig.
 Running migration merge method: login_mig.
 Running migration merge method: user_mrg.
 Running migration merge method: secur_mig.
 Running migration merge method: RoleMerge.
 Running migration merge method: methods_mig.
 Running migration merge method: mkusr_mig.
 Running migration merge method: group_mig.
 Running migration merge method: ldapcfg_mig.
 Running migration merge method: ldapmap_mig.
 Running migration merge method: convert_errlog.
 Running migration merge method: ODM_merge GAI.
 Running migration merge method: ODM_merge PdAt.
 Running migration merge method: merge_smit_db.
 Running migration merge method: ODM_merge fix.
 Running migration merge method: merge_swvpds.
 Running migration merge method: SysckMerge.

+-----------------------------------------------------------------------------+
 Executing nimadm phase 6.
 +-----------------------------------------------------------------------------+
 Installing and migrating software.
 Updating install utilities.
 +-----------------------------------------------------------------------------+
 Pre-installation Verification...
 +-----------------------------------------------------------------------------+
 Verifying selections...done
 Verifying requisites...done
 +-----------------------------------------------------------------------------+
 Executing nimadm phase 7.
 +-----------------------------------------------------------------------------+
 nimadm: There is no user customization script specified for this phase.

+-----------------------------------------------------------------------------+
 Executing nimadm phase 8.
 +-----------------------------------------------------------------------------+
 Creating client boot image.
 bosboot: Boot image is 57344 512 byte blocks.

+-----------------------------------------------------------------------------+
 Executing nimadm phase 9.
 +-----------------------------------------------------------------------------+
 Adjusting client file system sizes ...
 Adjusting size for /
 Adjusting size for /home
 Adjusting size for /opt
 Adjusting size for /tmp
 Adjusting size for /usr
 Adjusting size for /var
 Backing up cache data to mksysb file /root/mksysb_lpar1_61TL8 ...
 +-----------------------------------------------------------------------------+
 Executing nimadm phase 10.
 +-----------------------------------------------------------------------------+
 Unmounting client mounts on the NIM master.
 forced unmount of /mksysb_lpar1_mm_alt/alt_inst/var
 0505-158 nimadm: WARNING, unexpected result from the fuser command.
 umount: Could not find anything to unmount
 umount: Could not find anything to unmount
 0505-158 nimadm: WARNING, unexpected result from the fuser command.
 forced unmount of /mksysb_lpar1_mm_alt/alt_inst/usr
 forced unmount of /mksysb_lpar1_mm_alt/alt_inst/tmp
 forced unmount of /mksysb_lpar1_mm_alt/alt_inst/opt
 forced unmount of /mksysb_lpar1_mm_alt/alt_inst/home
 forced unmount of /mksysb_lpar1_mm_alt/alt_inst
 0505-158 nimadm: WARNING, unexpected result from the umount command.
 0505-215 nimadm: Error removing cache file systems.

+-----------------------------------------------------------------------------+
 Executing nimadm phase 11.
 +-----------------------------------------------------------------------------+
 Defining NIM mksysb resource ...
 New NIM mksysb resource name is "mksysb_lpar1_61TL8"

+-----------------------------------------------------------------------------+
 Executing nimadm phase 12.
 +-----------------------------------------------------------------------------+
 Cleaning up alt_disk_migration on the NIM master.
 Removing nimadm cache file systems.
 Removing cache file system /mksysb_lpar1_mm_alt/alt_inst
 Removing cache file system /mksysb_lpar1_mm_alt/alt_inst/home
 Removing cache file system /mksysb_lpar1_mm_alt/alt_inst/opt
 Removing cache file system /mksysb_lpar1_mm_alt/alt_inst/tmp
 Removing cache file system /mksysb_lpar1_mm_alt/alt_inst/usr
 Removing cache file system /mksysb_lpar1_mm_alt/alt_inst/var

nim_master t# lsnim -l mksysb_lpar1_61TL8
 mksysb_lpar1_61TL8:
 class = resources
 type = mksysb
 comments = Created by nimadm on Mon Feb 4 15:18:39 CET 2013
 Rstate = ready for use
 prev_state = unavailable for use
 location = /root/mksysb_lpar1_61TL8
 version = 6
 release = 1
 mod = 6
 oslevel_r = 6100-05
 alloc_count = 0
 server = master
 creation_date = Mon Feb 4 15:18:42 2013 

Clean up a failed nimadm operation on a lpar

 # nimadm -C -c [LPAR] -s [SPOT] 

If you have a bosboot error at the end of an alt_disk_install or alt_disk_copy

You may need to update bos.alt_disk_install.rte, because some versions are buggy with this operation… update only this fileset on the client, and retry alt_disk_install, it should work.

From the nim master :

# nim -o cust -a filesets='bos.alt_disk_install.rte' -a installp_flags='agXY' -a  lpp_source='lpp_source61TL9SP4' [my nim client]

[..]
Pre-installation Failure/Warning Summary
----------------------------------------
Name                      Level           Pre-installation Failure/Warning
-------------------------------------------------------------------------------
bos.alt_disk_install.rte  6.1.9.0         To be superseded by 6.1.9.30


Installation Summary
--------------------
Name                        Level           Part        Event       Result
-------------------------------------------------------------------------------
bos.rte.install             6.1.9.30        USR         APPLY       SUCCESS
bos.rte.install             6.1.9.30        ROOT        APPLY       SUCCESS
bos.alt_disk_install.rte    6.1.8.15        USR         APPLY       SUCCESS
bos.alt_disk_install.rte    6.1.8.15        ROOT        APPLY       SUCCESS
bos.alt_disk_install.rte    6.1.9.30        USR         APPLY       SUCCESS
bos.alt_disk_install.rte    6.1.9.30        ROOT        APPLY       SUCCESS

Links

Chmod666.org’s NIM cheatsheet

http://aix4admins.blogspot.fr/2011/05/lppsource-lppsource-is-directory.html

Share Button
Small NIM cheatsheet
Taggé sur :            

Laisser un commentaire