Re: [foxboro] /opt partition size
- From: "Corbera, Angel" <angel.corbera@xxxxxxxxxxxxxxxx>
- To: "'foxboro@xxxxxxxxxxxxx'" <foxboro@xxxxxxxxxxxxx>
- Date: Mon, 21 Mar 2005 08:10:46 -0500
You might want to try my HH:
HH#: HH1044
IA INFO: acg0401
File: UNIX
Release: any
Date: April 30, 2004
Subject: Partition full problem
Source: Personal experiments
Problem: How to find the directory or file filling up a hard drive
partition.
Solution:
1) If /opt partition is full, continue in multiuser mode.
If /root, /var or /usr partition is full, shutdown station
and continue in single user mode.
It is important that no stations are left 'rmounted'.
(Remember a WP51 always mounts its AW host)
2) Use the 'du' command to create a report file with the size of all
directories of the partition that is full.
Create report file in a partition different from the one that is full.
Suggested locations: /usr or /tmp (avoid /opt)
/usr has been used on examples below.
3) Sort lines in report by size, in reverse order.
4) Look for non-familiar names at the beginning of the list, or abnormal
size.
Typical culprits are:
- Core files
- Applications installed on wrong partition or directory
- Big files in /dev, because the real device was not present (printer, tape
drive, etc)
(Check: /dev/LPxx-nn, /dev/tape2, /dev/rst9, etc)
- Optical drives that are not mounted and working properly
(They are usually mounted in directory /both)
- Big log files in /var
Partitions Refresher:
AW/AP51 = /, /var, /usr, /opt
WP51 (v7.x) = /, /var, /usr, /opt
WP51 = /, /usr, /opt
AP20 = /, /tmp, /usr
Below are 3 examples, with samples of several station types.
1) /var partition (or /usr, or /opt) is full, on a 51 station
2) /root partition is full, on a 51 station
3) /root partition is full, on AP20
=================================================================
1) /var PARTITION IS FULL (51 station)
Use a similar procedure if /usr or /opt is full.
If /opt partition is full, remember you NEED to be in multiuser mode.
If /root partition is full, see example 2 and 3 below.
3AWE01# cd /var
3AWE01# du > /usr/list
File /usr/list has number of blocks used for each subdirectory under /var.
3AWE01# cd /usr
3AWE01# sort -n -r +0 list > list1
File /usr/list1 has directories under /var, sorted by size, in reverse order
3AWE01# more list1
24500 .
12624 ./adm
9394 ./adm/sa
9162 ./sadm
4186 ./sadm/install
3832 ./sadm/pkg
962 ./sadm/patch
928 ./tmp
516 ./lp
514 ./lp/logs
...
Identify the culprit directory from the list:
- It could be a non-familiar directory name
- Or a known directory with abnormal size, because it has big file(s)
- Known growing files:
/var/adm/wtmpx, utmpx; /var/tmp/online.log, /var/cron/log,
/var/mail/uucp,
Do not just delete those files, try instead:
wtmpx: Be sure there are no users; cd /var/adm ; cp /dev/null wtmpx
utmpx: Be sure there are no users; cd /var/adm ; cp /dev/null utmpx
online.log: cd /var/tmp ; tail -100 online.log > zzz ; ln zzz online.log
; rm zzz
uucp: crontab -r uucp ; echo " " > /var/cron/log ; rm
/var/mail/uucp
messages: cd /var/adm; tail -100 messages > zzz ; ln zzz messages ; rm
zzz
- It is always easier if you compare report against a list from a good box.
After you found the problem remember to remove report file:
3AWE01# cd /usr
3AWE01# rm list list1
=================================================================
2) ROOT PARTITION IS FULL (51 station)
The procedure is similar but need an additional last step, for AP20,PW:
- List all directories under root
- Sort resulting list by size, in reverse order
- REMOVE lines for other partitions (/var, /usr and /opt)
On Solaris, you can use "du -d" to list directories only from an
specific partition.
Remember to rumount any other station, and better if you can
take the station to SINGLE USER.
If not at single user, you might overlook any hidden files (see HH831).
This example is for an AW51B.
Example:
4AWB01# rmount
3AWE01: mounted on /rem/3AWE01
4AWB01# rumount 3AWE01
4AWB01# rmount
4AWB01# cd /
4AWB01# /usr/bin/du -d / > /usr/list
NOTE: The option "-d" is valid only for command "/usr/bin/du", on
Solaris.
(Be patient. It might take a few minutes)
(It might take FOREVER if you forgot to rumount remote stations!)
4AWB01# cd /usr
4AWB01# sort -n -r list > list1
4AWB01# more list1
2105600 .
1041665 ./proc
16256 ./dev
12338 ./kernel
6260 ./sbin
4548 ./platform
4404 ./kernel/fs
3952 ./etc
3658 ./kernel/drv
3624 ./platform/sun4m
2470 ./platform/sun4m/kernel
2260 ./dev/md
1736 ./dev/md/shared
1718 ./etc/fs
1392 ./kernel/misc
1108 ./platform/sun4m/kernel/drv
1106 ./etc/fs/nfs
874 ./platform/sun4u
872 ./platform/sun4u/kernel
692 ./kernel/strmod
678 ./platform/sun4u/kernel/drv
620 ./etc/lib
list1 has directories under root ONLY, and NOT from other partitions.
-----------------
If you didn't use option -d, list1 will have directories from ALL
partitions
and you will need to remove those extra lines. See below:
4AWB01# more list1
2105600 .
1041665 ./proc
568168 ./usr
445248 ./opt
289210 ./opt/fox
198270 ./usr/fox
193582 ./usr/openwin
160098 ./opt/fox/ami_space
94040 ./usr/openwin/lib
73710 ./usr/fox/ia16
...
Removing lines from other partitions:
4AWB01# egrep -v './var|./usr|./opt' list1 > list2
Result list2 will have only lines for /root
On 51F and 51G, use: egrep -v './var|./usr|./opt|./proc' list1 > list2
On WP51: egrep -v './opt|./usr' list1 > list2
NOTE: If you left rmounted the AW host of a WP51, you might want to
remove all lines that have: ./rem/AWLBUG
with: grep -v './rem/AWLBUG' list2 > list3
--------------------------
For an AW51E, the list look like this:
6AWE01# more list2 (51E, v6.5.1)
8103150 .
4277353 ./proc
17554 ./kernel
6664 ./platform
6592 ./kernel/drv
6562 ./platform/sun4u
6532 ./kernel/fs
6340 ./sbin
5390 ./platform/sun4u/kernel
4152 ./etc
3064 ./dev
2260 ./dev/md
1908 ./platform/sun4u/kernel/drv
1736 ./dev/md/shared
1718 ./etc/fs
1602 ./kernel/drv/sparcv9
1394 ./kernel/misc
1106 ./etc/fs/nfs
730 ./kernel/strmod
672 ./etc/lib
528 ./tmp
522 ./dev/md/shared/3
522 ./dev/md/shared/2
522 ./dev/md/shared/1
394 ./windows
392 ./platform/sun4u/kernel/misc
324 ./kernel/sys
290 ./etc/fs/ufs
274 ./etc/fs/hsfs
260 ./dev/md/shared/3/rdsk
260 ./dev/md/shared/3/dsk
260 ./dev/md/shared/2/rdsk
260 ./dev/md/shared/2/dsk
260 ./dev/md/shared/1/rdsk
260 ./dev/md/shared/1/dsk
260 ./dev/md/rdsk
260 ./dev/md/dsk
252 ./etc/mail
218 ./etc/lp
150 ./TT_DB
140 ./etc/init.d
110 ./etc/lp/interfaces
96 ./etc/security
96 ./dev/pts
...
--------------------------
For an AW51D, the list look like this:
3AWD01# more list2 (AW51D, v6.2.1)
634715 .
16150 ./kernel
7428 ./kernel/fs
6462 ./platform
6360 ./platform/sun4u
6260 ./sbin
5801 ./proc
5188 ./platform/sun4u/kernel
4840 ./etc
4430 ./kernel/drv
3214 ./dev
2260 ./dev/md
1898 ./platform/sun4u/kernel/drv
1736 ./dev/md/shared
1718 ./etc/fs
1392 ./kernel/misc
1106 ./etc/fs/nfs
708 ./kernel/strmod
620 ./etc/lib
522 ./dev/md/shared/3
522 ./dev/md/shared/2
522 ./dev/md/shared/1
418 ./windows
392 ./platform/sun4u/kernel/misc
336 ./etc/lp
322 ./kernel/sys
290 ./etc/fs/ufs
274 ./etc/fs/hsfs
260 ./dev/md/shared/3/rdsk
260 ./dev/md/shared/3/dsk
260 ./dev/md/shared/2/rdsk
260 ./dev/md/shared/2/dsk
260 ./dev/md/shared/1/rdsk
260 ./dev/md/shared/1/dsk
260 ./dev/md/rdsk
260 ./dev/md/dsk
138 ./etc/init.d
134 ./etc/lp/printers
130 ./etc/lp/interfaces
98 ./dev/rmt
98 ./dev/pts
96 ./etc/security
90 ./etc/fox
...
--------------------------
For an AW51G, the list look like this:
AW51G1# more list2 (51G Sun Blade 2000, v7.1)
8638807 .
42774 ./kernel
40670 ./platform
23550 ./platform/sun4u
23174 ./kernel/drv
21384 ./platform/sun4u/kernel
15804 ./sbin
14704 ./kernel/drv/sparcv9
7179 ./etc
7120 ./kernel/fs
6964 ./platform/sun4u/kernel/drv
6316 ./kernel/misc
6042 ./platform/SUNW,Ultra-Enterprise-10000
5794 ./platform/sun4u/kernel/sparcv9
4832 ./platform/sun4u/kernel/drv/sparcv9
4446 ./platform/SUNW,Sun-Fire
4412 ./platform/SUNW,Sun-Fire-15000
4344 ./platform/SUNW,Ultra-Enterprise-10000/kernel
4062 ./kernel/fs/sparcv9
3622 ./kernel/misc/sparcv9
2748 ./platform/SUNW,Sun-Fire/kernel
2714 ./platform/SUNW,Sun-Fire-15000/kernel
2626 ./etc/fs
2548 ./platform/sun4u/kernel/misc
1858 ./platform/SUNW,Sun-Fire-15000/kernel/sparcv9
1842 ./platform/SUNW,Sun-Fire/kernel/sparcv9
1724 ./kernel/strmod
1714 ./platform/SUNW,Ultra-Enterprise-10000/kernel/sparcv9
1666 ./etc/fs/nfs
1432 ./platform/sun4u/kernel/misc/sparcv9
1238 ./platform/sun4u/kernel/cpu
1182 ./kernel/sys
970 ./kernel/strmod/sparcv9
960 ./platform/SUNW,Ultra-Enterprise
958 ./platform/SUNW,Ultra-Enterprise/kernel
924 ./platform/SUNW,Ultra-Enterprise/kernel/drv
836 ./platform/SUNW,Ultra-Enterprise-10000/kernel/drv
826 ./dev
704 ./kernel/sys/sparcv9
672 ./platform/sun4u/kernel/cpu/sparcv9
538 ./windows
530 ./platform/SUNW,Ultra-Enterprise/kernel/drv/sparcv9
516 ./kernel/misc/kgss
514 ./etc/lib
482 ./etc/fs/ufs
462 ./platform/SUNW,Ultra-Enterprise-10000/kernel/drv/sparcv9
450 ./etc/fs/hsfs
390 ./platform/SUNW,Sun-Fire-15000/kernel/drv
384 ./platform/SUNW,Sun-Fire-15000/kernel/drv/sparcv9
354 ./platform/SUNW,Sun-Fire/kernel/cpu
354 ./platform/SUNW,Sun-Fire-15000/kernel/cpu
352 ./tmp
352 ./platform/SUNW,Sun-Fire/kernel/cpu/sparcv9
352 ./platform/SUNW,Sun-Fire-15000/kernel/cpu/sparcv9
346 ./platform/SUNW,Sun-Fire/kernel/drv
342 ./platform/SUNW,Sun-Fire/kernel/drv/sparcv9
292 ./platform/SUNW,Ultra-Enterprise-10000/kernel/cpu
274 ./kernel/misc/kgss/sparcv9
272 ./etc/init.d
250 ./etc/lp
238 ./platform/SUNW,Ultra-250
238 ./etc/mail
236 ./platform/SUNW,Ultra-250/kernel
218 ./platform/SUNW,Ultra-250/kernel/drv
214 ./platform/SUNW,Netra-T12
212 ./platform/SUNW,Ultra-4
--More--(24%)
--------------------------
For an AW51F, the list look like this:
AW51F1# more list2 (51F Sun Blade 150, v7.1)
6429565 .
42956 ./kernel
39448 ./platform
23356 ./kernel/drv
22328 ./platform/sun4u
20162 ./platform/sun4u/kernel
15804 ./sbin
14886 ./kernel/drv/sparcv9
7395 ./etc
7120 ./kernel/fs
6316 ./kernel/misc
6042 ./platform/SUNW,Ultra-Enterprise-10000
5794 ./platform/sun4u/kernel/sparcv9
5742 ./platform/sun4u/kernel/drv
4446 ./platform/SUNW,Sun-Fire
4412 ./platform/SUNW,Sun-Fire-15000
4344 ./platform/SUNW,Ultra-Enterprise-10000/kernel
4062 ./kernel/fs/sparcv9
3622 ./kernel/misc/sparcv9
3610 ./platform/sun4u/kernel/drv/sparcv9
2748 ./platform/SUNW,Sun-Fire/kernel
2714 ./platform/SUNW,Sun-Fire-15000/kernel
2626 ./etc/fs
2548 ./platform/sun4u/kernel/misc
1858 ./platform/SUNW,Sun-Fire-15000/kernel/sparcv9
1842 ./platform/SUNW,Sun-Fire/kernel/sparcv9
1724 ./kernel/strmod
1714 ./platform/SUNW,Ultra-Enterprise-10000/kernel/sparcv9
1666 ./etc/fs/nfs
1432 ./platform/sun4u/kernel/misc/sparcv9
1238 ./platform/sun4u/kernel/cpu
1182 ./kernel/sys
970 ./kernel/strmod/sparcv9
960 ./platform/SUNW,Ultra-Enterprise
958 ./platform/SUNW,Ultra-Enterprise/kernel
924 ./platform/SUNW,Ultra-Enterprise/kernel/drv
892 ./dev
836 ./platform/SUNW,Ultra-Enterprise-10000/kernel/drv
704 ./kernel/sys/sparcv9
672 ./platform/sun4u/kernel/cpu/sparcv9
538 ./windows
530 ./platform/SUNW,Ultra-Enterprise/kernel/drv/sparcv9
516 ./kernel/misc/kgss
514 ./etc/lib
482 ./etc/fs/ufs
462 ./platform/SUNW,Ultra-Enterprise-10000/kernel/drv/sparcv9
450 ./etc/fs/hsfs
390 ./platform/SUNW,Sun-Fire-15000/kernel/drv
384 ./platform/SUNW,Sun-Fire-15000/kernel/drv/sparcv9
354 ./platform/SUNW,Sun-Fire/kernel/cpu
354 ./platform/SUNW,Sun-Fire-15000/kernel/cpu
352 ./platform/SUNW,Sun-Fire/kernel/cpu/sparcv9
352 ./platform/SUNW,Sun-Fire-15000/kernel/cpu/sparcv9
346 ./platform/SUNW,Sun-Fire/kernel/drv
342 ./platform/SUNW,Sun-Fire/kernel/drv/sparcv9
292 ./platform/SUNW,Ultra-Enterprise-10000/kernel/cpu
288 ./tmp
278 ./etc/init.d
274 ./kernel/misc/kgss/sparcv9
238 ./platform/SUNW,Ultra-250
238 ./etc/mail
236 ./platform/SUNW,Ultra-250/kernel
224 ./etc/lp
218 ./platform/SUNW,Ultra-250/kernel/drv
214 ./platform/SUNW,Netra-T12
212 ./platform/SUNW,Ultra-4
--More--(24%)
After problem is solved, remove report files:
4AWB01# cd /usr
4AWB01# rm list list1 list2 list3
=================================================================
3) ROOT PARTITION IS FULL (AP20 station)
This example is for an AP20, v6.1.1, whose root is full.
# cd /
# du > /usr/list
# cd /usr
# wc list
450 900 10319 list (450 lines = 450 directories)
# more list
1 ./FSD
1 ./etc/log
1446 ./etc
1 ./f0
1 ./f1
634 ./lib
1 ./lost+found
1 ./tmp
2714 ./bin
...
# sort -n -r list > list1
# more list1
115029 .
107594 ./usr
73702 ./usr/fox
20793 ./usr/fox/sp
20245 ./usr/fox/sp/files
16562 ./usr/fox/dd
10627 ./usr/fox/ciocfg
10048 ./usr/fox/hstorian
9392 ./usr/fox/hstorian/bin
...
#
# egrep -v './usr|./tmp' list1 > list2
# more list2
115029 .
2714 ./bin
1446 ./etc
634 ./lib
12 ./dev
9 ./rem
1 ./u0
1 ./rem/r1
1 ./rem/r0
...
After problem is solved, remove report files:
# cd /usr
# rm list list1 list2
======================================================================
APPENDIX:
Typical var directory on WP51:
3WPB01# more list1
7746 .
5796 ./sadm
2834 ./sadm/pkg
2810 ./sadm/install
808 ./adm
500 ./tmp
290 ./cron
236 ./tmp/103627-02.SUNWtoo
232 ./tmp/103627-02.SUNWtoo/files
230 ./tmp/103627-02.SUNWtoo/files/reloc
228 ./tmp/103627-02.SUNWtoo/files/reloc/usr
226 ./tmp/103627-02.SUNWtoo/files/reloc/usr/lib
148 ./saf
134 ./tmp/103627-02.SUNWcsu
130 ./tmp/103627-02.SUNWcsu/files
128 ./tmp/103627-02.SUNWcsu/files/reloc
126 ./tmp/103627-02.SUNWcsu/files/reloc/usr
124 ./tmp/103627-02.SUNWcsu/files/reloc/usr/lib
118 ./sadm/system
106 ./sadm/pkg/SUNWcsu
102 ./spool
88 ./saf/zsmon
======================================================================
-----Original Message-----
From: foxboro-bounce@xxxxxxxxxxxxx
[mailto:foxboro-bounce@xxxxxxxxxxxxx]On Behalf Of Sascha Wildner
Sent: Monday, March 21, 2005 2:48 AM
To: foxboro@xxxxxxxxxxxxx
Subject: Re: [foxboro] /opt partition size
Johnson, Alex (Foxboro) wrote:
> Use du to see how much space each directory is taking:
>
> du -k *
>
> This will list the size of each directory.
The du command's -s flag, e.g.
du -ks *
will show the total size of each directory on the current level only.
This is very convenient to work one's way down to the offending dir if
the files taking up space are scattered among several subdirectories.
--
Regards,
Sascha Wildner
erpicon Software Development GmbH
Neusser Str. 724-726
50737 Köln
Germany
Phone: +49 221 9746069
Fax: +49 221 9746099
eMail: swildner@xxxxxxxxxx
_______________________________________________________________________
This mailing list is neither sponsored nor endorsed by Invensys Process
Systems (formerly The Foxboro Company). Use the info you obtain here at
your own risks. Read http://www.thecassandraproject.org/disclaimer.html
foxboro mailing list: http://www.freelists.org/list/foxboro
to subscribe: mailto:foxboro-request@xxxxxxxxxxxxx?subject=join
to unsubscribe: mailto:foxboro-request@xxxxxxxxxxxxx?subject=leave
_______________________________________________________________________
This mailing list is neither sponsored nor endorsed by Invensys Process
Systems (formerly The Foxboro Company). Use the info you obtain here at
your own risks. Read http://www.thecassandraproject.org/disclaimer.html
foxboro mailing list: http://www.freelists.org/list/foxboro
to subscribe: mailto:foxboro-request@xxxxxxxxxxxxx?subject=join
to unsubscribe: mailto:foxboro-request@xxxxxxxxxxxxx?subject=leave
Other related posts: