1833758 Members
2133 Online
110063 Solutions
New Discussion

swinstall analysis

 
Daedalus_1
Advisor

swinstall analysis

Hi

I've downloaded a script (see attachment) from HP which is used to generate depot base on patch files. It call some commands like swcopy, swpackage which will make use of "/tmp".

However, my machine got around 65Mb /tmp disk space only.

Is there any other get-around?


Thank & regards
Daedalus
8 REPLIES 8
G. Vrijhoeven
Honored Contributor

Re: swinstall analysis

Hi Daedalus,

The script does not use /tmp but $PWD = current dir for files, so if you move the tree to an other place you can execute the script there. The depot will be created in $PWD/depot.

HTH,

Gideon
Bharat Katkar
Honored Contributor

Re: swinstall analysis

Hi,
This srcipt creates depot for you in the directory where you are. Now what you do is use "bdf" command to look out for space and Switch yourself to the convenient directory and execute this script.
Hope that helps.
Regards,
You need to know a lot to actually know how little you know
Daedalus_1
Advisor

Re: swinstall analysis

However, when I run the script when temp has only 35MB(the directory where i extract the depot has more than 1 GB disk space). The following error message appeared.

/*****************************************
vxfs: mesg 001: vx_nospace - /dev/vg00/lvol4 file system full (1 block extent)
No space left on device
ERROR: PHSS_26945.depot checksum is 28264 should be 35428
ERROR: wc results of PHSS_26945.depot are 41341 150578 11305984 should be 144673 595501 60037120
/*****************************************
MarkSyder
Honored Contributor

Re: swinstall analysis

The default location for depots is /var/adm/sw. It's probably a good idea to set this up as a separate filesystem in its own logical volume so it doesn't fill /var.

Once you've done this:

cd /var/adm/sw

then run the script.

Mark Syder (like the drink but spelt different)
The triumph of evil requires only that good men do nothing
Eric Antunes
Honored Contributor

Re: swinstall analysis

Hi Daedalus,

I noticed that in your script may be is missing the following line:

SD_LIST=

After:

#
# Temporary values
#
PID=$$
#PSF=depot$PID.psf
PSF=depot.psf

## HERE:
SD_LIST=

#
# Upon exit...
#
#trap 'rm -f $PSF; exit' 0 1 2 15

Hope this will help!

Regards,

Eric
Each and every day is a good day to learn.
Daedalus_1
Advisor

Re: swinstall analysis

Some more new findings on the problem.

I found where exactly in the script promp out error message. It is when the script running the PHSS_* files by calling a shell.

(e.g>/bin/sh PHSS_XXXXX)

Which patch files will result on error? It depends on how much /tmp size we got. When there's around 50 MB. Only running PHSS_26945 will result error.


Here's a example when I run the line on the command prompt alone.

when only 50MB in /tmp
/***********************************
root@myhost:>bdf /tmp
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol4 491520 435276 53727 89% /tmp
root@et9:/QATeam2/hp_patch>/bin/sh PHSS_26945
x - PHSS_26945.text
x - PHSS_26945.depot [compressed]


vxfs: mesg 001: vx_nospace - /dev/vg00/lvol4 file system full (1 block extent)
No space left on device
ERROR: PHSS_26945.depot checksum is 14426 should be 35428
ERROR: wc results of PHSS_26945.depot are 140311 566932 57585664 should be 144673 595501 60037120
root@myhost:>
/***********************************


When /tmp got 73MB
/***********************************
root@myhost:>bdf /tmp
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol4 491520 413809 73853 85% /tmp
root@et9:/QATeam2/hp_patch>/bin/sh PHSS_26945
x - PHSS_26945.text
x - PHSS_26945.depot [compressed]
root@myhost:>
/***********************************
Sridhar Bhaskarla
Honored Contributor

Re: swinstall analysis

Hi Daedalus,

If you don't specify the -d option with the script, then it will create the depot in the current working directory. So, find out a filesystem where you have enough space (say /apps1 ) and then specify it with the script. For ex.,

./create_depot -d /apps1/depot

It will create the depot at /apps1/depot location. Find it out by issuing the command

'swlist -l depot'.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Ermin Borovac
Honored Contributor

Re: swinstall analysis

I think this error occurs because unsharing of the patch file (sh PHSS_26945) creates some temporary files in /tmp.

Towards the end of PHSS_26945 file, there are following two lines.

uncompress /tmp/compress$$
mv /tmp/compress$$ PHSS_26945.depot

This temporary file (compress$$) is probably too big for /tmp and therefore you are getting the error.

You can use the following awk script to replace references to /tmp with TMPDIR.

$ cat addTMPDIR.awk
/..@EOF/ {scan_off=1}
/^@EOF/i {scan_off=0}
/unpacker <<.@eof./ {scan_off=1}
{
if(scan_off != 1) {
gsub ("/tmp", "$TMPDIR")
}
print $0
}

$ cp PHSS_26945 PHSS_26945.orig
$ awk -f addTMPDIR.awk PHSS_26945.orig > PHSS_26945

Repeat this procedure for every patch that's causing the problem.

Before you run the script to create the depot again make sure you define TMPDIR to a directory with sufficient free space.

$ export TMPDIR=