Cleaning Up /var/sadm

unix

    Next

  • 1. Sun Fire V240
    HI , I have Sun Fire V240 Server with 2*73 GB and 2*146 GB hot swappable hard drives , According Sun Documentation --> Mixing of drives is permitted in the combinations: 1 x 73-GB and 1 x 146-GB 2 x 73-GB and 2 x 146-GB Does it mean i can not have Hard Drive other than capacity 73-GB and 146-GB ? What if I want to add 200 or more GB capacity hard drive ? How do i add more capacity storage to this server ? Please Help. Thanks in Advance .
  • 2. Jumpstart
    Is it possible, under Solaris 9 or 10, to do Jumpstart Installation of x86 client from SPARC Jumpstart server or vice versa? Thanks
  • 3. openldap MS NetMeeting howto HELP
    Good day all, I am not sure if you can help me , I've spent a great deal of time searching and reading anything about this topic to help me get this openldap and netmeeting working together. my goal is to get netmeeting connected to ldap server and have the users' info listed under the address book. i've installed openldap on a solaris 9 intel box and i can see it's running and listening on port 389. now i placed netmeeting.schema along with the other schema files and the slapd.conf and slapd2.conf placed under /etc/openldap first of all , openldap is version openldap-2.3.17 ,ndk 1.2 and perl get Net::LDAP ok. I can't patch the core.schema # patch core.schema < core.schema.patch Looks like a unified context diff. Hunk #1 failed at line 1. Hunk #2 failed at line 119. Hunk #3 failed at line 142. Hunk #4 failed at line 493. 4 out of 4 hunks failed: saving rejects to core.schema.rej done and if I comment out the lines EQUALITY caseIgnoreMatch from netmeeting.schema the following lines seem to be working ok. : /usr/local/libexec/slapd -f /usr/local/etc/openldap/slapd.conf -u nobody /usr/local/libexec/slapd -h ldap://localhost:2345/ - f /usr/local/etc/openldap/slapd2.conf and netstat confirms that the two test clients are connected to ldap. I still can not see the two clients on the address list ? Can you help thanks for your time.

Cleaning Up /var/sadm

Postby jseymour » Fri, 28 Nov 2003 13:50:26 GMT

I like to install patches so I can back them out, but /var/sadm is
now taking up more space in /var than anything else.  So I was
wondering if I could safely remove the backout stuff once I was
convinced the system was stable.

The most definitive answer I could find was this, from Casper Dik,
back in April of 1998:

     http://www.**--****.com/ %40uk-usenet.uk.sun.com
    
Does Casper's advice (at that time) of

    rm -r /var/sadm/pkg/*/save/*
    
still apply as of Solaris 7?

The reason I ask is that he also talks about "backoutpatch"s in that
message, and these don't seem to exist anymore?  So apparently 
something's changed since then?

TIA,
Jim
-- 
Jim Seymour                    | PGP Public Key available at:
                               |  http://www.**--****.com/ 
                               |
                               |  http://www.**--****.com/ 

Re: Cleaning Up /var/sadm

Postby Chapter33 » Sat, 29 Nov 2003 05:17:39 GMT




Hi Jim,

Yes it does apply to Solaris 7 and beyond, but if you only want to
delete backout stuff after you're sure everything is ok, then I
wouldn't do a blanket delete of the lot.  I would delete files in
those directories that were older than a certain number of days, e.g.
60 days as follows:

    find /var/sadm/pkg/*/save -type f -mtime +60 -ls

...to list the files that will be deleted

    find /var/sadm/pkg/*/save -type f -mtime +60 -exec rm -f {} +

...to delete them.

Backout patches do still exist in Solaris 7, see the patchrm(1M) man
page.

Best regards,
Mark.

Re: Cleaning Up /var/sadm

Postby Olive72 » Mon, 02 May 2011 00:31:34 GMT

Excellent Tip 

find /var/sadm/pkg/*/save -type f -mtime +60 -exec rm -f {} +



Similar Threads:

1.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:

--------8<-----------------

|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
    patches.

    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.

---------------->8---------------------------

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 !


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

 According to the solaris FAQ:--------8<-----------------|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
patches.    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.---------------->8---------------------------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 newpatch, you should go back to the previous
version before installing ?Ex: Original package = blabla-01Apply 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 !


3./var/sadm/pkg is very huge

Hello.

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
/var/sadm/pkg/SUNWzfsu/save)?

Thanks,

Alexander Skwar

4./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


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

not sure if anyone will have any use for this, but here goes.
(i got this as a side effect.)

i wanted to know what characters appeared in file names NORMALLY,
not everything that was possible.

nawk '{print $1}' /var/sadm/install/contents > scratch

take scratch, ignore / and newline, and count the characters.
ignore = since that serves to indicate links.  ignore # since
that occurs only as an artifact of the contents file.
remember that things like "usr" will get counted a lot.
here's what i got.  i did notice the tilde, which looks like a
packaging mistake.  i tracked it down:

/usr/share/lib/mailx/mailx.help
/usr/share/lib/mailx/mailx.help.~

SUNWcsu package.  but the two files are indeed quite
different, so i think it's not a mistake.

287074	s
224890	a
203628	e
190887	r
179342	o
179100	p
162660	i
155725	t
141892	n
140474	l
140236	.
131468	m
120406	c
81012	u
78606	S
74962	b
70963	d
66863	U
63377	W
59706	v
52406	g
50227	N
49836	h
49076	2
40985	f
39950	6
37067	3
31540	_
29449	k
26785	-
26317	1
23642	w
22806	x
22763	0
22096	C
15593	4
12734	j
12081	9
11736	T
11595	X
11346	7
10921	y
10081	E
10076	5
9697	8
8247	R
6931	D
6709	+
6621	V
5759	A
5395	I
5330	M
5150	F
5055	B
4412	P
3863	L
3134	O
2587	z
2575	%
2366	J
2295	G
1915	H
1598	q
1591	Z
1123	$
1108	K
673	,
262	Y
220	Q
125	:
82	@
1	~

@ usually, but not always, occurs in /dev or /devices.  (only 3,
all in /usr)
"," usually occurs in combination with "SUNW", in /usr/platform
and java primarily.


one frequency alphabet for ordinary english i found:

etoanrishcdlfmugypwbvkxjqz

though, of course, i don't have character counts.

j.
-- 
Jay Scott		512-835-3553		 XXXX@XXXXX.COM 
Head of Sun Support, Sr. Operating Systems Specialist
Applied Research Labs, Computer Science Div.                   S224
University of Texas at Austin

6. /var/sadm/pkg

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

8. /var/sadm/spool



Return to unix

 

Who is online

Users browsing this forum: No registered users and 69 guest