c0d0t0s0 "/" shows 100% in solaris 9. need help

Hi,

I am having a problem with disk capacity. When i do df -h, i get the following output.

> df -h
Filesystem size used avail capacity Mounted on
/dev/dsk/c0t0d0s0 940M 940M 0K 100% /
/dev/dsk/c0t0d0s6 4.8G 2.0G 2.7G 44% /usr
/proc 0K 0K 0K 0% /proc
mnttab 0K 0K 0K 0% /etc/mnttab
fd 0K 0K 0K 0% /dev/fd
/dev/dsk/c0t0d0s5 4.7G 2.5G 2.1G 55% /var
swap 10G 376K 10G 1% /var/run
swap 512M 8.6M 503M 2% /tmp
/dev/dsk/c0t0d0s4 19G 4.3G 14G 23% /opt
/dev/dsk/c0t3d0s7 33G 25G 7.2G 78% /users
/dev/dsk/c0t0d0s7 98M 4.3M 84M 5% /export/home
shakti:/shiva_backups
101G 68G 28G 71% /shakti_bkup
parvati:/var/mail/ 135G 26G 102G 21% /var/mail
/dev/dsk/c0t1d0s7 29G 18G 11G 63% /results
/dev/dsk/c0t2d0s7 33G 14G 19G 42% /data
parvati:/var/shiva_backups
135G 26G 102G 21% /parvati_bkup

i want to reduce the 100%, can someone help me with this? where the folders to view to see the usuage for that disk alone.?

thanks

Very few files in root should change. Assuming that this is a recent problem, a list of data files that changed in past couple of days should do it.

find / -mount -type f -mtime -2 -print

It will probably be something like /dev/imaginary/tape/drive

Actually, you might just be having a problem with how small you / filesystem is. According to your output it is only 940 MB. But the full install of Solaris 9 is bigger than that.

I see that you did split off /var, /opt, and /user on their own which probably helps with that. Still, 940MB is pretty small for the root filesystem.

See what the find command Perderabo shows you. If that doesn't turn up enough stuff for you to delete just increase the mtime to get older files. But you may end up finding there just isn't much that can be deleted and the problem is you can't fit the OS comfortably onto that small of a filesystem.

# df -k / /usr /var /opt /tmp
Filesystem            kbytes    used   avail capacity  Mounted on
/dev/md/dsk/d0        494235  146570  298242    33%    /
/dev/md/dsk/d4       2030747 1544711  425114    79%    /usr
/dev/md/dsk/d5       1525647  294576 1170046    21%    /var
/dev/md/dsk/d6       1525647  302419 1162203    21%    /opt
swap                 4677792      56 4677736     1%    /tmp
#

I have a full install of Solaris 9 and my root is 484 MB total. Currently 33% are in use. Most of the 298 MB that are free are not likely to be used. What do you think might go there? I would argue that 940 MB is much too big.

You could look for files in the '/' filesystem that are very large and remove them if they are not required. You can use find:

cd /; find . -size +50000000c -xdev -exec ls -l {} \;

This will give you a listing of files in the / filesystem that are above 50MB in size.

hey,

i probably didnt get what you were saying, i am sorry for that.. i tried to get a list of files above 50 mb.. there too many of them.. heres a sample...
crw------- 1 root sys 126, 0 Oct 1 2003 ./devices/pci@1f,4000/ebus@1:devctl
crw------- 1 root sys 50, 0 Oct 1 2003 ./devices/pci@1f,4000/scsi@3:devctl
crw------- 1 root sys 50, 1 Oct 1 2003 ./devices/pci@1f,4000/scsi@3:scsi
crw------- 1 root sys 50, 64 Oct 1 2003 ./devices/pci@1f,4000/scsi@2:devctl
crw------- 1 root sys 50, 65 Oct 1 2003 ./devices/pci@1f,4000/scsi@2:scsi
crw-rw-rw- 1 root sys 20, 0 Oct 1 2003 ./devices/pci@1f,4000/ebus@1/se@14,400000:a
crw-rw-rw- 1 root sys 20,65536 Oct 1 2003 ./devices/pci@1f,4000/ebus@1/se@14,400000:0,hdlc
crw------- 1 5 uucp 20,131072 Oct 1 2003 ./devices/pci@1f,4000/ebus@1/se@14,400000:a,cu
crw-rw-rw- 1 root sys 20, 1 Oct 1 2003 ./devices/pci@1f,4000/ebus@1/se@14,400000:b
crw-rw-rw- 1 root sys 20,65537 Oct 1 2003 ./devices/pci@1f,4000/ebus@1/se@14,400000:1,hdlc
crw------- 1 5 uucp 20,131073 Apr 19 2004 ./devices/pci@1f,4000/ebus@1/se@14,400000:b,cu
brw-rw-rw- 1 root sys 36, 0 Oct 1 2003 ./devices/pci@1f,4000/ebus@1/fdthree@14,3023f0:a
brw-rw-rw- 1 root sys 36, 1 Oct 1 2003 ./devices/pci@1f,4000/ebus@1/fdthree@14,3023f0:b
brw-rw-rw- 1 root sys 36, 2 Oct 1 2003 ./devices/pci@1f,4000/ebus@1/fdthree@14,3023f0:c
crw------- 1 root sys 131, 0 Oct 1 2003 ./devices/pci@1f,4000/ebus@1/SUNW,envctrl@14,600000:envctrl0
brw-r----- 1 root sys 32, 0 Oct 1 2003 ./devices/pci@1f,4000/scsi@3/sd@0,0:a
brw-r----- 1 root sys 32, 1 Oct 8 09:47 ./devices/pci@1f,4000/scsi@3/sd@0,0:b
brw-r----- 1 root sys 32, 2 Oct 1 2003 ./devices/pci@1f,4000/scsi@3/sd@0,0:c
brw-r----- 1 root sys 32, 3 Oct 1 2003 ./devices/pci@1f,4000/scsi@3/sd@0,0:d
brw-r----- 1 root sys 32, 4 Oct 1 2003 ./devices/pci@1f,4000/scsi@3/sd@0,0:e
brw-r----- 1 root sys 32, 5 Oct 1 2003 ./devices/pci@1f,4000/scsi@3/sd@0,0:f
brw-r----- 1 root sys 32, 6 Oct 1 2003 ./devices/pci@1f,4000/scsi@3/sd@0,0:g
brw-r----- 1 root sys 32, 7 Oct 1 2003 ./devices/pci@1f,4000/scsi@3/sd@0,0:h
crw-r----- 1 root sys 32, 0 May 18 08:28 ./devices/pci@1f,4000/scsi@3/sd@0,0:a,raw
crw-r----- 1 root sys 32, 1 Oct 1 2003 ./devices/pci@1f,4000/scsi@3/sd@0,0:b,raw
crw-r----- 1 root sys 32, 2 Oct 1 2003 ./devices/pci@1f,4000/scsi@3/sd@0,0:c,raw

i couldnt get the print out as desired for # find / -mount -type f -mtime -2 -print
i know i writing some parameters wrong.
/etc/shadow
/etc/logadm.conf
/etc/lp/printers/lj6mpc/faultMessage
/etc/skip/randseed
/etc/.pwd.lock
/etc/rmtab
/.dt/sessions/lastsession
/.dt/startlog
/.dt/sessionlogs/shiva_DISPLAY=:0
/.dt/Trash/.trashinfo
/.Xauthority
/.TTauthority

also, there are abot 5 files like messages0, messages1 in /var/adm, which occupy some space. could i get rid of them. or what abot the root mail, which no one uses, the mail folder shows lot of space taken up. how do i get rid of these.. will it help

thanks once again.

Umm.. in the command
find / -mount -type f -mtime -2 -print

that 2 is a number of days. It would have worked had it been run promptly. :stuck_out_tongue:

And no, /var is a separate filesystem. Cleaning that up will not help /.

guess i am dodging lot of traffic. any other ways to check and repair this problem. what the mail?

Hmmm. Obviously splitting off those separate filesystems has a way bigger effect than I thought. At the last job where I had to build lots of Solaris 9 systems we only used /, swap, and /export/home - and our / ended up being well over a gig in size. I guess most of that stuff must be under /usr and /var. Thanks for clearing that up and pointing out my mistake.

Maybe there is a core dumping problem, where core files are being dumped in the root partition?

Since timestamps are useless, file sizes will have to do. Something like blowtorch's command. It is amazing that on Sun, special files are matching that size option. HP-UX does not do that. But blowtorch's command is easily fixed...
cd /; find . -type f -size +50000000c -xdev -exec ls -l {} \;

I still think the size is too big. But if the problem is a single very large file, this will find it.

hey,

i rebooted the system. remounted all the nf mounts.. and it dropped to 44%... well, thats good...but still dont know the cause.. couldnt be a mount issue, as i check those before. thanks guys for all ur help