/var/sadm/pkg is very huge



  • 1. rsync disaster
    I made a major goof, I was trying to speed up copies of data to a DR server by using rsync, and I screwed up the master filesystem. I thought that rsync was unidirectional vice bidriectional. rsync -avz -e ssh local_dir remote_host:/remote_dir It first copied everything down to the remote server that it lacked, then brought back everything that the remote server had that the local server did not (file system at DR site was month old). What a mess...... Is there a way to force rsync to just push in one direction? Or am I better off using rdist? Ughhhhh.
  • 2. companion cd and b69
    Hi, has anybody tried to install the solaris 9 companion cd on a solaris express installation (especially build b69)? Is this a good or a bad idea (TM)? Any experiences or comments on trying this? BTW: Is there a possiblity to install all blastwave packages in the correct order automatically or do I have to buy the DVD or do it by hand? Thanks. Cheers, Tom
  • 3. Tarring up Oracle files?
    I thought I heard at one point that making tar files of various Oracle data renders them unusable, something about Oracle data having "holes" in the files and using tar on them collapses these "holes" or something to this effect... Does anyone know about this? A previous admin set up some jobs to shut down Oracle and tar up the directories but the dbas have never been successful at restoring a databae this way and I suspect this has something to do with it. Does this sound familiar to anyone or am I off my rocker? (well I probably am anyway but thats beside the point...! ) TIA
  • 4. Why when the time changed backwards, there were many TIME_WAIT sockets
    Several days ago I encountered a very very strange thing. I set one of my servers' time backward to sometime in year 2003 with rdate. The server has a lot of TCP connections at that time. However, several hours later, I found that there were many many sockets with the state TIME_WAIT and no local ports available. I know of the TIME_WAIT is used for retransmit the FIN2 ack to the peer party and it should only be kept in a timer, which in many systems is about twice the timer for retranssion. But after I checked I found that TCP timers should be counted by a "tick" rather than the system time. But the "tick" should not be affected by the system time. So I wonder why so many TIME_WAIT sockets cannot be cleaned in this case. Thanks in advance!

/var/sadm/pkg is very huge

Postby Alexander Skwar » Tue, 21 Aug 2007 22:39:13 GMT


I noticed that my /var/sadm/pkg is rather big. It's currently about 1.7g.
Can I deleted no longer required "save" directories from there (like


Alexander Skwar

Re: /var/sadm/pkg is very huge

Postby Richard B. Gilbert » Tue, 21 Aug 2007 23:00:14 GMT

Yes, you can.  CAN!!  I would suggest keeping copies somewhere.  Just 
deleting this stuff, without backup, does not seem wise to me.  OTOH, I 
see no need to clutter up your /var with them.  If you can burn them to 
CD/DVD, that should provide sufficient backup.

Re: /var/sadm/pkg is very huge

Postby Tim Bradshaw » Wed, 22 Aug 2007 01:11:18 GMT

Only if you do not ever want to back out those patches.


Re: /var/sadm/pkg is very huge

Postby Publicus Nomen » Wed, 22 Aug 2007 02:19:40 GMT

In the /var/sadm directory are files called obsolete.Z.  These can be
deleted and return a large amount of space.

# find /var/sadm/pkg -name obsolete.Z -exec rm {} \;

After this you can _still_ backout patches if necessary.

Sun InfoDoc 14295 explains this and a lot more, but it's only available to
contract customers :-(

Geoff Lane, Airstrip One

Today's Excuse:  disks spinning backwards - toggle the hemisphere jumper.

Re: /var/sadm/pkg is very huge

Postby Dave Miner » Wed, 22 Aug 2007 03:23:57 GMT

Also, if you delete the save/pspool files, you'll end up unable to 
create zones.


Re: /var/sadm/pkg is very huge

Postby Huge » Thu, 23 Aug 2007 16:37:35 GMT

I ran amok in /var/sadm/pkg in the past to regain space, and so much stuff
stopped working that I restored it from backup ...

I'd find another way, if I were you.

                 "Religion poisons everything."
            [email me at huge {at} huge (dot) org <dot> uk]

Similar Threads:

1./var/sadm/pkg direcotry Q

Since the pkginfo files in the /var/sadm/pkg/pkg_name is not being touched
if i remove /var/sadm/pkg/pkg_name/save dir, removing the save direcotory is
not going to effect when i run pkgrm or patchrm?  or is the pkginfo files
being called only when i run the command pkginfo, showrev -p and
patchadd -p?

what is the save dir for anyway?

****PLEASE REMOVE "_SPAM_SUCKS" before reply


If /var/sadm/pkg is inadvertently evacuated,

is the machine effectively headed for a reinstall?


3.pkg - recreated /var/sadm/install/contents

For some unknown reason, /var/sadm/install/contents is missing
on a couple of our systems, making pkginfo and friends useless.
A web search has not turned up any method for recreating the

So, is there a magic set of commands that I can run to
repopulate that ugly beast?


For example; if an RPM database gets corrupt on a linux system.

rm -f /var/lib/rpm/__db*
rpm -vv --rebuilddb

4.for huge "recommended" patch, not enough room in /var/sadm/patch

Not enough room in /var/sadm/patch, the install-script

But on other partitions and disks I have *lots* of
space available.  Just not on the root partition,
which contains /var/sadm/patch (among much else,
of course).

Might this work.

Rename /var/sadm/patch to eg /var/sadm/patch2-original,
then create a patch dir in some partition that had
logs of space, and then make /var/sadm/patch
a symlink to there.

Or should I symlink either higher up the var/sadm tree,
or symlink *several* of those directories?

And is there any reason to *copy* those directories
to where I'm going to symlink to, so that if there's
already some contents, they'll still be "there"?

(That install-script doesn't explicitly check for
this trick -- I hope not.)


Or is there maybe some better way to do surmount this not-enough-disk pbm?


Of course I do down to single-user before doing
the   ./install_cluster,

but any reason I can't leave everything else

I mean, in recent years, has anyone *ever* gotten
hurt by doing that?   (If so, please say how, so we
can all get wised-up on this, uh, danger.)



5.Repost: Solaris Live Upgrade: questions about /var/sadm

Sorry for the report, seems like my news reader misbehaved (Ah, MSFT!)

 According to the solaris FAQ:


|3.40) Why does installing patches take so much space in /var/sadm?

    All the files that are replaced by a patch are stored under
    /var/sadm/patch/<patch-id>/save so the patch can be safely
    backed out.  Newer patches will save the old files
    under /var/sadm/pkg/<pkg>/save/<patch-id>/undo.Z, for each package

    You can remove the <patchdir>/save directory provided you also
    remove the <patchdir>/.oldfilessaved file.  Newer patches will not
    install a .oldfilessaved file.

    Alternatively, you can install a patch w/o saving the old
    files by using the "-d" flag to installpatch.

|3.41) Do I need to back out previous versions of a patch?

    No, unless otherwise stated in the patch README.
    If the previous patch installation saved the old
    files, you may want to reclaim that space.

    Patches can be backed out with (Solaris 2.6+):
     patchrm <patch-id>

    or in earlier releases:

     /var/sadm/patch/<patch-id>/backoutpatch <patch-id>

    Backoutpatch can take an awful long time, especially when the
    patch contained a lot of files.  This is fixed in later versions
    of backoutpatch.


Prior to doing the live upgrade, I would like to minimize the size of my
root partition
(containing /var in my case) Can I safely remove all patches (not just the
save directories)
from /var/sadm/patches or will live upgrade do it automatically ?

I presume that after a solaris upgrade, the liste of installed patches on
the system will be NULL ?

Another last point, does "back out patch" mean to go back to the state
BEFORE the patch was applied ?
I don't understand the 3.41 paragraph. What does it mean ? It seems to mean
that whenever you apply a new
patch, you should go back to the previous version before installing ?

Ex: Original package = blabla-01

Apply patch blabla-02  (BlaBla-01 saved)

You now want to apply patch blabla-03.

Does question 3.41 ask: "if you need to install patch blabla-03 you should
first back ou to blabla-01 ?"

If so, what do you do if the README tells you that you have to, but you
REMOVED the save directory ?

Thanks !

6. Solaris Live upgrade: questions about /var/sadm/patch

7. Cleaning Up /var/sadm

8. frequency alphabet for files in /var/sadm/install/contents

Return to unix


Who is online

Users browsing this forum: No registered users and 42 guest