HOWTO: Update a NIM server
Written by Michael Felt   

Updating NIM

Note: this is an article that I will continue to update. RL teaches me that I prepare "parts" and do not publish, as I wait/look for time to finish the missing "parts" Roughly speaking there are two NIM update paths - especially for lpp_sources and spots:

  • New resources
  • Update existing resources

This article assumes you have looked at my HOWTO: Install a NIM Server article already.

Add a new LPP Source and SPOT from a DVD

There is a script on the next page you can copy/paste to a notepad and then save as a script. It will have a background looking like this.

echo "An example script in a highlighted area!"
The key parts of the script is to look at current oslevel, and guess at DVD oslevel by looking for bos.rte.install and building a "DVDLEVEL" string that can be used for creating the logical volums and filesystems for an lpp_source and a spot.

Based on this data I will work on creating a set of commands to update a DVD lpp_source to a level that can be updated via SUMA and/or an ftp download from Fix Central. This will be "coming soon".

Update an existing lpp_source using SUMA and bff_create

-- scripted ideally. "Coming soon".


Click next (the right one!) for the script to create an new lpp_source and spot from an installable DVD.

# Copyright 2012 Michael Felt, all rights reserved
# Create a nim lpp_source from an install DVD CD
OSLEVEL=`oslevel -s | cut -c 1-2,6-7,9-10`
DVDLEVEL=`installp -d /dev/cd0 -L | grep bos.rte.install | awk -F: ' { print $3 } ' | \
     awk -F. ' { print $1 $2 "0" $3 "0" $4 }' | sort | tail -1`
while [ "x$LEVEL" == "x" ]; do
        if [ $DVDLEVEL -ne $OSLEVEL ]; then
                echo "should new lpp_source be set according to DVD or OS? : (O/D)"\\c
                read choice
                case "$choice" in
                        LEVEL=$OSLEVEL ;;
                        LEVEL=$DVDLEVEL ;;
        lsvg -o
        echo --- using volume group vgNim ---
        echo --- need to add selection script ---

echo "AIXTOOLS and ROOTVG.NET script to assist with NIM installation based on host's oslevel"
echo ========== -- getting current software levels
echo ========== -- choose existing volume group

echo ========== -- create logical volumes
mklv -t jfs2 -y lv${LEVEL} ${VG} 4G
[[ $? -ne 0 ]] && echo $0: cannot make logical volume, exiting && exit -1
mklv -t jfs2 -y lv${LEVEL}s ${VG} 2G
[[ $? -ne 0 ]] && echo $0: cannot make logical volume, exiting && exit -1

echo ========== -- create filesystems...
crfs -v jfs2 -d lv${LEVEL} -m /export/${LEVEL} -A yes -u nim
[[ $? -ne 0 ]] && echo $0: cannot filesystem /export/${LEVEL}, exiting && exit -1
mount /export/${LEVEL}

crfs -v jfs2 -d lv${LEVEL}s -m /export/${LEVEL}/spot_${LEVEL} -A yes -u nim
[[ $? -ne 0 ]] && echo $0: cannot filesystem /export/${LEVEL}spot_${LEVEL}, exiting && exit -1
mount /export/${LEVEL}/spot_${LEVEL}

lsvg -l ${VG}

echo ========== -- create NIM lpp_source and spot from DVD
nim -o define -t lpp_source -a server=master -a source=/dev/cd0 -a location=/export/${LEVEL}/lpp lpp_${LEVEL}
[[ $? -ne 0 ]] && echo $0: nim lpp_source create failed, exiting && nim -o remove lpp_${LEVEL} && exit -1
bffcreate -d /dev/cd0 -q -t /export/${LEVEL}/lpp -v -S -X openssh.base openssh.msg.en_US

nim -o define -t spot -a server=master -a source=lpp_${LEVEL} -a location=/export/${LEVEL} spot_${LEVEL}
[[ $? -ne 0 ]] && echo $0: nim spot create failed && nim -o remove spot_${LEVEL} && exit -1