alloc: /: file system full
I have a file system full message, which is pretty obvious why,
df -k
Filesystem - kbytes used - avail - capacity - Mounted on
/dev/dsk/c0t0d0s0-103588 - 95669-0 -100%-/
/dev/dsk/c0t0d0s6-527457 - 366602 - 108110 - 78%-/usr
/dev/dsk/c0t0d0s7 -3323412 - 894874 - 2395304 - 28% - /mnt/new
/dev/dsk/c0t1d0s0 - 4134252 - 3974579 - 118331 - 98% - /export/home
swap-295352 - 16 - 295336 -1% -/tmp
Problem is that I keep freeing up disk space by removing stuff from /var/adm and /var/log, this included the xferlog, messages, etc, etc. Something keeps using up the space and I can't see where. Now I have got nothing left to delete. Main problem is (for some reason) a website that needs to upload graphics has failed, as soon as they attempt to upload a pic we get the 'file system full message'.
But something keeps using up the space, or its not being released as it should be.Its not the /var folder - its only using 4Mb.
I have used du to add up the disk space in the directories in the / partition, and the main culprits are
/kernel 15Mb
/lib 37Mb
/opt 23Mb
/bin 8Mb
Is there anything in these dirs I can move/get rid of without messing up the system.
Anyone have any ideas?
[1288 byte] By [
jonharris1] at [2007-11-25 23:21:18]

# 1
Nothing in your left (without more detail) can be "cleaned up". You should also search for core files and delete them. You didn't show how much space /var is chewing up in /. That's probably your main problem or maybe you have your "web area" under / as a subdirectory.
/var should always be seperate on production servers unless you have a large / file system - which you don't. Even with a large /, I would still seperate /var. If you can't split off /var (or you "web area"), then you are going to have to play symbolic links games to fix this.
The graphics upload process shouldn't be uploading anything into / or /var (IMHO).
IMHO, you should have something setup like this:
/<www or apache or html or mywebsite or whatever>
-OR-
/usr/local/<www or apache or html or mywebsite or whatever>
conf <<<- apache configuration goes here
etc
cgi-bin <<<- nuf said
docroot <<<- statis contact goes here
images <<<- Images get uploaded here
var <<<- Web logs go here - requires you to roll the logs are appropriate
In either case, make this a seperate parition (soft or physical) or it could just be under /usr/local assuming the second. This makes moving, managing, updating, etc your web site localized to one location on your system. The web server software would live somewhere like /usr/local/apache2 or whatever. Now you can update your software without having to worry about your website content / configuration because its seperate from the software.
# 2
Deleting a file will not free its space as long as the file is open. This would not be surprising with log files in /var/adm and /var/log. A reboot is a drastic but effective way to see if you can really get that space back. If you need to avoid rebooting, you can try as root running
pfiles /proc/* > /tmp/pfiles.out
and then look to see if any process has an open file that is very large. Searching for the inode number with the ncheck command can then tell you where, if anywhere, the file is linked into the directory tree. If it is not in the tree, you can get the space back by killing and restarting the process.
Richard
# 3
Sean
Thanks for your reply.
The apache files are off the /export/home partition, which is ok for space.
I agree that the file upload process should not require use of the / partition. Problem is that I don't know how to move it :-(
The actual pictures are stored in blob files in Mysql. I found the mysql.server script and added the
--tmpdir=/tmp to the mysqld line - but it didn't make any difference. The partition Mysql in is also OK for space.
It must be something to do with the buffer location in perl (the upload page uses embedded perl)
I don't enough about perl to know how do move its tmp folder.
Thanks
Jon
# 5
Jon,
Sounds like you're on the right track with the Perl embedded code. I know Perl but since you have a custom app, well, there isn't any advise I can give.
Also you guys should careful using /tmp as a image upload area. I'm not sure how much space the images require but using /tmp for this seems risky to me. /tmp should be used for VERY transient small files. This is simply a suggestion based on the fact that your tweak didn't seem to work for you.
Good luck :)