Re: Patch cleanup all? (594 Views)
Reply
Trusted Contributor
jerrym
Posts: 134
Registered: ‎02-12-2008
Message 1 of 10 (602 Views)

Patch cleanup all?

I have a new server 11.11 that I would like to cleanup the /var/adm/sw/save patch dir.

I ran cleanup -c 1 and ran cleanup -s. I started with 783 patches in save and now there

are still 461 left. How do you clean all of them out?  I have no intention of backing out patches

on a new server. Or am I missing something here with why these patches are still there.

 

Acclaimed Contributor
Dennis Handly
Posts: 25,274
Registered: ‎03-06-2006
Message 2 of 10 (601 Views)

Re: Patch cleanup all?

>I ran cleanup -c 1

 

You would probably need to use "-c 0" to get rid of all of them.  You may want to do this very selectively or you won't be able to backout any patches.

Acclaimed Contributor
James R. Ferguson
Posts: 21,184
Registered: ‎07-06-2000
Message 3 of 10 (598 Views)

Re: Patch cleanup all?

Hi:

 

If you truly want to remove the roll-back information for all patches, do:

 

# swmodify -x patch_commit=true \*

 

In point of fact, I do this after I am satisfied that an earlier patch session hasn't yielded any problems and just before starting another (e.g. with a QPK bundle).

 

Regards!

 

...JRF...

Trusted Contributor
jerrym
Posts: 134
Registered: ‎02-12-2008
Message 4 of 10 (594 Views)

Re: Patch cleanup all?

[ Edited ]

Well,   swmodify -x patch_commit=true \*  removed them all. But I got a lot of these

error messages:

 

.

.

.

ERROR:   Cannot commit the patch fileset "PHSS_39077.UX-SPA-U-MSG" in
         the target "/" because its patch state is not "applied" or
         "superseded".
ERROR:   Cannot commit the patch fileset "PHSS_39077.UX-TCH-B-MSG" in
         the target "/" because its patch state is not "applied" or
         "superseded".
ERROR:   Cannot commit the patch fileset "PHSS_39077.UX-TCH-E-MSG" in
         the target "/" because its patch state is not "applied" or
         "superseded".
ERROR:   Cannot commit the patch fileset "PHSS_39077.UX-TCH-U-MSG" in
         the target "/" because its patch state is not "applied" or
         "superseded".

Acclaimed Contributor
Dennis Handly
Posts: 25,274
Registered: ‎03-06-2006
Message 5 of 10 (588 Views)

Re: Patch cleanup all?

>ERROR:   Cannot commit the patch fileset "PHSS_39077.UX-SPA-U-MSG"  because its patch state is not "applied" or  "superseded".

 

What does this show: swlist -l fileset -a state -a patch_state PHSS_39077

I assume the -s in "cleanup -s -c 0" may fix it?

Hmm, you said you did "cleanup -s".

Exalted Contributor
Steven E. Protter
Posts: 33,806
Registered: ‎08-15-2002
Message 6 of 10 (583 Views)

Re: Patch cleanup all?

Shalom,

 

You can not commit a patch that is in the wrong state.

 

swverify <patch name>

swconfig <patch name>

 

You may need to run swremove on the patch or swinstall -x reinstall=true

 

Be careful wit that last one.

 

SEP

Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Trusted Contributor
jerrym
Posts: 134
Registered: ‎02-12-2008
Message 7 of 10 (579 Views)

Re: Patch cleanup all?

[ Edited ]

Dennis, 0 is not a valid number for cleanup -c.

 

 nothing shown for

 

 # swlist -l fileset -a state -a patch_state PHSS_39077                
# Initializing...
# Contacting target "mabank"...

#

Trusted Contributor
jerrym
Posts: 134
Registered: ‎02-12-2008
Message 8 of 10 (578 Views)

Re: Patch cleanup all?

Now your scaring me Steven. In the logs. The last patch was:

 

ERROR:   Cannot commit the patch fileset "PHSS_39077.UX-TCH-U-MSG" in
         the target "/" because its patch state is not "applied" or
         "superseded".

.

.

 

But it was committed afterwords. ??


* Committing the patch fileset "PHSS_39077.UX-TCH-U-MSG".

 

 

 

 # swverify PHSS_39077.UX-TCH-U-MSG

=======  07/13/11 15:43:03 CDT  BEGIN swverify SESSION
         (non-interactive) (jobid=mabank-0042)

       * Session started for user "root@mabank".

       * Beginning Selection
       * Target connection succeeded for "mabank:/".
       * Software selections:
             PHSS_39077.UX-TCH-U-MSG,l=/,r=1.0,a=HP-UX_B.11.11_32/64,v=HP,fr=1.0,fa=HP-UX_B.11.11_32/64
       * Selection succeeded.


       * Beginning Analysis
       * Session selections have been saved in the file
         "/.sw/sessions/swverify.last".
       * The analysis phase succeeded for "mabank:/".
       * Verification succeeded.


NOTE:    More information may be found in the agent logfile using the
         command "swjob -a log mabank-0042 @ mabank:/".

=======  07/13/11 15:43:09 CDT  END swverify SESSION (non-interactive)
         (jobid=mabank-0042)

 

 

 

 # swconfig PHSS_39077.UX-TCH-U-MSG

=======  07/13/11 15:43:41 CDT  BEGIN swconfig SESSION
         (non-interactive) (jobid=mabank-0043)

       * Session started for user "root@mabank".

       * Beginning Selection
       * Target connection succeeded for "mabank:/".
       * Software selections:
             PHSS_39077.UX-TCH-U-MSG,l=/,r=1.0,a=HP-UX_B.11.11_32/64,v=HP,fr=1.0,fa=HP-UX_B.11.11_32/64
       * Selection succeeded.


       * Beginning Analysis
       * Session selections have been saved in the file
         "/.sw/sessions/swconfig.last".
       * "mabank:/":  1 filesets have already been configured.
       * Analysis succeeded.


NOTE:    More information may be found in the agent logfile using the
         command "swjob -a log mabank-0043 @ mabank:/".

=======  07/13/11 15:43:47 CDT  END swconfig SESSION (non-interactive)
         (jobid=mabank-0043)

 

 

 

Acclaimed Contributor
James R. Ferguson
Posts: 21,184
Registered: ‎07-06-2000
Message 9 of 10 (574 Views)

Re: Patch cleanup all?

Hi (again):


jerrym wrote:

Well,   swmodify -x patch_commit=true \*  removed them all. But I got a lot of these

error messages:.

ERROR:   Cannot commit the patch fileset "PHSS_39077.UX-SPA-U-MSG" in
         the target "/" because its patch state is not "applied" or
         "superseded".
ERROR:   Cannot commit the patch fileset "PHSS_39077.UX-TCH-B-MSG" in
         the target "/" because its patch state is not "applied" or
         "superseded".
ERROR:   Cannot commit the patch fileset "PHSS_39077.UX-TCH-E-MSG" in
         the target "/" because its patch state is not "applied" or
         "superseded".
ERROR:   Cannot commit the patch fileset "PHSS_39077.UX-TCH-U-MSG" in
         the target "/" because its patch state is not "applied" or
         "superseded".


I suspect that this patch was *already* commited.  To satisfy yourself that all is well, you could do:

 

# swverify \*

 

Regards!

 

...JRF...

Acclaimed Contributor
Dennis Handly
Posts: 25,274
Registered: ‎03-06-2006
Message 10 of 10 (563 Views)

Re: Patch cleanup all?

>nothing shown for

 

I would expect something like:

# PHSS_37902
  PHSS_37902.LIBIO77-CAT                configured     applied

...

The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.