SUMMARY: / at 97%

From: Grant Lowe (grant@doctord.com)
Date: Tue Jan 20 1998 - 10:47:43 CST


Hi all.

I would like to thank the following people for their input:

Rob Sandberg, Joel Turoff, Daniel Baker, Rich Pieri, Dan Hubbard,
Christopher M. Conway, Stephen Frost, Matthew Zeier, Tim Carlson, Harary
Levinson, Janet Hoo, Gerald Combs, Daniel Dunn, Chritophe Diarra, James K.
Brigman, Jim Harmon, Art Schoenstadt, Ian T. Collins, Michael Hill, and
David S. Foster.

The suggestions are too numerous to mention. I’ll mention the highlights:
You can probably go after the logs in /var/adm. Try copying /dev/null to
the log files that are too big. Make a backup on a separate partition if
you think you'll need them.
----------------------------------------------------------------------------
------------------------------------
Well, that is your problem: they should not be there. They should either
be on /usr/local or /opt, both of which should be disks/partitions other
than root.
----------------------------------------------------------------------------
------------------------------------
In root, you're going to have other mounted file systems, so I pare down to
only directories:
du -s -k [A-Za-bdekprs]* var | sort -n
(this keeps out /tmp, /usr, /nfs, /local, that sort of thing; you'll need
to adjust it to your local situation) If that shows /var as being the hog,
as it usually (but not always) does, then I cd into var, and then can use
the simpler form from there down, since there are no mounts into that area:
du -s -k * | sort -n
The sort -n sorts from smallest to largest by disk use; the disk use is in
1KB blocks (the -k option).
----------------------------------------------------------------------------
------------------------------------
You should be able to safely move /opt and /var to other filesystems. I'm
not sure what exactly you can delete since I'm not sure what you're using,
only other thing is you can delete and truncate your log files in /var/log
and /var/adm if you want. I would suggest you move /opt to another
filesystem first though, if possible.
----------------------------------------------------------------------------
------------------------------------
Go into /var/adm and remove utmpx utmp wtmpx wtmp and any messages files.
Then kill of utmpd and restart it /usr/lib/utmpd. You'll have to logoff and
log back on to notice the cleanup since utmpd will not release the space of
the files if any incoming ftp/telnet connections are active..Consider
rebuilding your machine with appropriate space ;)
----------------------------------------------------------------------------
------------------------------------
Before you start deleting packages you should probably run a find command
to see what files are taking up a lot of space. I usually run the following
command when I am looking for files to cut back on.
find / -xdev -mtime -30 -type f -size +1000000c -ls | sort -n +6
This looks on / for files modified in the last 30 days that are bigger than
1MB. It then sorts them by file size so you can see what is the biggest.
Usually these are log files. I prefer to truncate them as opposed to
deleting them and hope that the get recreated correctly (cat > filename <
/dev/null).
----------------------------------------------------------------------------
------------------------------------
>From either the / or /var directories, try typing:
du -sk * | sort -n
This will show you the directories that take up the largest amount of space
on the disk.
----------------------------------------------------------------------------
------------------------------------
try:

# cd /var/adm
# ls -l
# rm -i messages.?
# cp /dev/null wtmpx
# cp /dev/null lastlog
# rm -i pacct?
# cd /var/log
# ls -l
# rm -i syslog.?
# cd /var/lp/logs
# ls -l
# rm -i *.?
Other messages were variations on these themes. Thanks for all your help.
You guys are great!

grant



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:12:29 CDT