Smarter install script for patch clusters?

From: Lars Hecking (lhecking@nmrc.ucc.ie)
Date: Tue Dec 03 2002 - 15:07:20 EST


 Hopefully someone from Sun is reading this list :-)

 I was going to upgrade an old SS10 with a SUN1.05 (1GB) disk to
 Solaris 8 02/02. After End User plus OpenGL, I end up with

Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c0t3d0s0 123231 28668 82240 63% /
/dev/dsk/c0t3d0s6 593446 431580 102522 81% /usr
(swap 256MB, no /export/home)

 Trying to install the current Recommended patch cluster, the installer
 told me I don't have enough disk space to save old files:

Insufficient space in /var/sadm/patch to save old files.
Space required in bytes: 125292
Space available in bytes: 94562

 So I removed all patches from patch_order that are already installed,
 and also removed the corresponding patch directories. Still no joy:

Insufficient space in /var/sadm/patch to save old files.
Space required in bytes: 118153
Space available in bytes: 94560

 However, after moving /var/sadm/patch (which was empty save .mu_applied)
 aside and linking it to a fs with enough free space, the patch cluster
 applied fine, and it turns out that /var/sadm/patch itself occupies less
 than 1MB of disk space, so I removed the link and copied the patch directory
 back to /var/sadm.

Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c0t3d0s0 123231 62543 48365 57% /
/dev/dsk/c0t3d0s6 593446 452058 82044 85% /usr

 Doing the math, the patch install has taken 57353kB, a lot less than
 118153kB as the install script suggested.

 Now, I was wondering where the cluster install script can be made more
 intelligent, as it is obviously possible to install the cluster within
 these disk space constraints. Currently, it simply uses the size of the
 patch cluster itself as an estimate, and compares it to the free space
 on the filesystem with holds /var/sadm/patch:

        BASESIZE=`du -sk $PATCHDIR | cut -f1`
        SUPPLEMENT_SIZE=`expr $BASESIZE / 2`
        bytes_avail=`df -b /var/sadm/patch | tail -1`
        bytes_avail=`echo $bytes_avail | sed 's/.*\ //'`
        if [ ${SUPPLEMENT_SIZE} -gt ${bytes_avail} ]; then

 Yes, I realise that this is a sufficiently obscure problem :-)
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:25:24 EDT