Unix Technical Forum

all that stuff in /var/sadm

This is a discussion on all that stuff in /var/sadm within the Sun Solaris Administration forums, part of the Solaris Operating System category; --> My system has about 300 meg of space used by /var/sadm. Can I remove any of this? I've never ...


Go Back   Unix Technical Forum > Unix Operating Systems > Solaris Operating System > Sun Solaris Administration

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-16-2008, 07:33 AM
Rusty Wright
 
Posts: n/a
Default all that stuff in /var/sadm

My system has about 300 meg of space used by /var/sadm. Can I remove
any of this? I've never had to back out a patch. I rarely uninstall
packages.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-16-2008, 07:33 AM
Michael Vilain
 
Posts: n/a
Default Re: all that stuff in /var/sadm

In article <uieeknvnz5h.fsf@socrates.Berkeley.EDU>,
Rusty Wright <rusty@socrates.Berkeley.EDU> wrote:

> My system has about 300 meg of space used by /var/sadm. Can I remove
> any of this? I've never had to back out a patch. I rarely uninstall
> packages.


If you're tight on space, buy more disk and move /var/sadm to it. Put a
soft link to it in /var. Deleting the patch database is considered Bad
Practice(tm). It will make those who come after you curse your name and
the spawn of your loins.

--
DeeDee, don't press that button! DeeDee! NO! Dee...



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-16-2008, 07:33 AM
Casper H.S. Dik
 
Posts: n/a
Default Re: all that stuff in /var/sadm

"Michael Vilain <vilain@spamcop.net>" writes:

>In article <uieeknvnz5h.fsf@socrates.Berkeley.EDU>,
> Rusty Wright <rusty@socrates.Berkeley.EDU> wrote:


>> My system has about 300 meg of space used by /var/sadm. Can I remove
>> any of this? I've never had to back out a patch. I rarely uninstall
>> packages.


>If you're tight on space, buy more disk and move /var/sadm to it. Put a
>soft link to it in /var. Deleting the patch database is considered Bad
>Practice(tm). It will make those who come after you curse your name and
>the spawn of your loins.



You can safely delete the backups from the patched files.

You cannot delete any of the other stuff because it would prevent
patches from being instaslled properly.

Casper
--
Expressed in this posting are my opinions. They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 01-16-2008, 07:33 AM
Neil W Rickert
 
Posts: n/a
Default Re: all that stuff in /var/sadm

"Michael Vilain <vilain@spamcop.net>" writes:
> Rusty Wright <rusty@socrates.Berkeley.EDU> wrote:


>> My system has about 300 meg of space used by /var/sadm. Can I remove
>> any of this? I've never had to back out a patch. I rarely uninstall
>> packages.


>If you're tight on space, buy more disk and move /var/sadm to it. Put a
>soft link to it in /var.


That will fail as soon as you apply a WBEM patch. Use an lofs mount
rather than a soft link.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 01-16-2008, 07:33 AM
Akop Pogosian
 
Posts: n/a
Default Re: all that stuff in /var/sadm

Rusty Wright <rusty@socrates.berkeley.edu> wrote:
> My system has about 300 meg of space used by /var/sadm. Can I remove
> any of this? I've never had to back out a patch. I rarely uninstall
> packages.



Remove all files named obsolete.Z from /var/sadm
e.g:

find /var/sadm -name obsolete.Z | xargs rm


-akop
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 01-16-2008, 07:33 AM
Volker Borchert
 
Posts: n/a
Default Re: all that stuff in /var/sadm

Neil W Rickert wrote:

|>>> My system has about 300 meg of space used by /var/sadm. Can I remove
|>>> any of this? I've never had to back out a patch. I rarely uninstall
|>>> packages.

|>>If you're tight on space, buy more disk and move /var/sadm to it. Put a
|>>soft link to it in /var.

|> That will fail as soon as you apply a WBEM patch. Use an lofs mount
|> rather than a soft link.

Or put /var/sadm onto a separate partition on that new disk,
and just mount that file system onto /var/sadm.

--

"I'm a doctor, not a mechanic." Dr Leonard McCoy <mccoy@ncc1701.starfleet.fed>
"I'm a mechanic, not a doctor." Volker Borchert <v_borchert@despammed.com>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 01-16-2008, 07:33 AM
Rusty Wright
 
Posts: n/a
Default Re: all that stuff in /var/sadm

Thanks for all of the responses. I'm not really tight on space, I
just don't like apparent waste if it's not necessary. I'll just
ignore /var/sadm. I wish Sun would bzip2 those files; that at least
would help a little bit.

Rusty Wright <rusty@socrates.Berkeley.EDU> writes:

> My system has about 300 meg of space used by /var/sadm. Can I remove
> any of this? I've never had to back out a patch. I rarely uninstall
> packages.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 01-16-2008, 07:34 AM
Chris Jones
 
Posts: n/a
Default Re: all that stuff in /var/sadm

Akop Pogosian wrote:
> Rusty Wright <rusty@socrates.berkeley.edu> wrote:
>
>>My system has about 300 meg of space used by /var/sadm. Can I remove
>>any of this? I've never had to back out a patch. I rarely uninstall
>>packages.

>
>
>
> Remove all files named obsolete.Z from /var/sadm
> e.g:
>
> find /var/sadm -name obsolete.Z | xargs rm
>
>
> -akop


Ok... so what *is* the point of all the obsolete.Z files there anyway?
If it's ok to remove them, then what purpose to they serve being there?
I'm considering removing them, but I was hoping somebody could give me
a bit more details on what it really would mean to remove them.

Thanks!

-chris

--
Chris Jones
(to email me, just take out the NOSPAM)

Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B)
This email address may not be added to any commercial mail list with out
my permission. Violation of my privacy with advertising or SPAM will
result in a suit for a MINIMUM of $500 damages/incident, $1500 for repeats.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 01-16-2008, 07:34 AM
Chris Thompson
 
Posts: n/a
Default Re: all that stuff in /var/sadm

In article <ccm6lb$iqt$1@news2.news.larc.nasa.gov>,
Chris Jones <c.r.jonesNOSPAM@larc.nasa.gov> wrote:
>Akop Pogosian wrote:
>> Rusty Wright <rusty@socrates.berkeley.edu> wrote:
>>>My system has about 300 meg of space used by /var/sadm. Can I remove
>>>any of this? I've never had to back out a patch. I rarely uninstall
>>>packages.

>>
>> Remove all files named obsolete.Z from /var/sadm
>> e.g:
>>
>> find /var/sadm -name obsolete.Z | xargs rm

>
>Ok... so what *is* the point of all the obsolete.Z files there anyway?
>If it's ok to remove them, then what purpose to they serve being there?
> I'm considering removing them, but I was hoping somebody could give me
>a bit more details on what it really would mean to remove them.


patchadd(1m) stores the backout apparatus in

/var/sadm/pkg/[package_name]/save/[patch_name]/undo.Z

(Remember that a patch may update multiple packages.)

It it obsoletes another patch, then the coresponding file for the
old patch becomes

/var/sadm/pkg/[package_name]/save/[patch_name]/obsolete.Z

and in addition a small file

/var/sadm/pkg/[package_name]/save/[patch_name]/obsoleted_by

is created naming the obsoleting patch.

(Although I say "undo.Z" and "obsolete.Z" above, they may actually be
"undo" and "obsolete" if compress(1) didn't manage to make them smaller
--- this does occasionally happen.)

patchrm(1m) reverses all this, if it can: it acts on the undo.Z files
and some "obsolete.Z" files may become "undo.Z" again. So in answer
to your question "what *is* the point of all the obsolete.Z files?",
they are needed if you need to back out more than one level of patch.

The clean way of removing the backout data for a patch is to remove
all the directories

/var/sadm/pkg/*/save/[patch_name]

and their contents, rather than just the obsolete.Z files. This makes
it (pretty much) as though you had used the -d option on the original
patchadd.

You may want to do this only for patches applied sufficiently long
ago, or maybe for patches _obsoleted_ sufficiently long ago. I have
a Perl script that munges around /var/sadm (and in particular, reads
the obsoleted_by files) that displays this sort of information. But
there's a snag: for the dates it depends on the mtime's of the undo.Z
and obsolete.Z files.

That was fine until patch 113713-11 came out late last year. That scans
all the undo.Z and obsolete.Z files for something nasty and removes it
if it finds it, updating the mtime in the process. At least subsequent
versions of 113713-xx, although they do the same scan, dont change the
mtimes as the nasty isn't there any longer. (They do change all the
ctimes, so you'll see a spike in the size of incremental dumps of
whatever filing system /var/sadm is in, if you use incremental dumps.)

Chris Thompson
Email: cet1 [at] cam.ac.uk
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 01-16-2008, 07:34 AM
Keg
 
Posts: n/a
Default Re: all that stuff in /var/sadm

Rusty Wright <rusty@socrates.Berkeley.EDU> wrote in message news:<uie4qojjncd.fsf@socrates.Berkeley.EDU>...
> Thanks for all of the responses. I'm not really tight on space, I
> just don't like apparent waste if it's not necessary. I'll just
> ignore /var/sadm. I wish Sun would bzip2 those files; that at least
> would help a little bit.
>
> Rusty Wright <rusty@socrates.Berkeley.EDU> writes:
>
> > My system has about 300 meg of space used by /var/sadm. Can I remove
> > any of this? I've never had to back out a patch. I rarely uninstall
> > packages.


Ugh. bzip. I wish everyone would start using rar, the archiver of the
future. bzip takes to long to compress/decompress for the amount of
compression yielded. (seldom is it better than gzip and always much
slower) bzip is good for download sites that want to squeeze every
last drop out of their bandwidth but it is more a hinderance for the
day-to-day user.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 03:35 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com