Forum Moderators: bakedjake

Message Too Old, No Replies

Out of space on /tmp

...and don't know how to fix it.

         

trillianjedi

2:24 pm on Aug 21, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Oops, I need some help from a Linux guru ;-)

I've run out of space in my /tmp directory which is causing all manner of problems.

I don't really use this box - it's just for local development. I've got a logfile analyser running on there and X (which won't now boot) and couple of other small apps.

Mandrake 10.0 and a 10 gig disk.

DF reports that "part 1" of my disk is 100% full. Loads of space elsewhere.

Is there a simple way that I can increase /tmp (I assume this is a swapfile or something?) size to bail out of this problem?

Is it indicative of another problem elsewhere on the box?

Thanks,

tJ

trillianjedi

4:46 pm on Aug 21, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



OK, I managed to fix it. Three years worth of old log files. Yup, that'll do it ;-)

Is there an easy way of automating old logfile deletions?

TJ

MamaDawg

5:04 pm on Aug 21, 2005 (gmt 0)

10+ Year Member



You could set up a cron job using "find" to find all logfiles older than a certain date and remove them...

trillianjedi

5:49 pm on Aug 21, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks MamaDawg.

I'm stuffed now anyway I think - X refuses to let me login - looks like a reformat and reinstall job now.

Annoying really - I expect that of Windows, but you don't expect to get caught short with Linux this way.

Must have deleted a log file that it's not happy about.

TJ

StupidScript

6:09 pm on Aug 22, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hmmm ... on all of my Linux boxes of varying stripes, the first partition is the boot partition, the second is the data partition and the third is the swap partition.

Is/was your /tmp directory located on the first partition?

trillianjedi

6:27 pm on Aug 22, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yes, looks like /tmp was on the first partition.

Is that a bad idea?

TJ

wheel

10:48 pm on Aug 22, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Maybe not bad, but I like to keep /usr, /var, root, /tmp, and /home all in seperate partitions. I've had similiar space issues with a partition filling up and the partitions prevented anything serious from seizing up. So yes, you should put data stuff in seperate partitions.

trillianjedi

12:17 pm on Aug 23, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



OK, I'm going to be reinstalling this box anyway (hardly anything on it, so quicker to just wipe and reinstall than try and fix it).

From the setup, how would I tell the installer that I want the /tmp in it's own partition, or do I have to do that post-install?

Thanks,

TJ

wheel

2:14 pm on Aug 23, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You'll get the option to partition your hard drive early on during the install with Mandrake. (you might consider moving to mandrake 10.2 while you're at it).

When you get to that section, choose 'custom partitions'. Then click on the 'advanced' button, then choose 'autoallocate'. It'll ask you what type of system you're setting up (simple, with /usr, or server). Choose 'server'. I choose server for everything, even for use as a desktop.

That'll partition into:
/
/tmp
swap
/var
/usr
/home

which works pretty well. Programs go into /usr, logs and stuff into /var, and data into /home.

You can then resize each partitions a bit. Mandrake tends to make /var as big as /home which I don't feel is needed. I set /usr in the range of 4-6 gigs, /var the same, then put the rest of the space into /home.

trillianjedi

2:20 pm on Aug 23, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks Wheel.

With a 10 gig drive, given this machine is really just my sandbox, any suggestions as to what the ideal partition sizes should be?

I don't need anything on there other than the FTP server, apache and a compiler.

Also, can I stop the damn thing logging everything to /var/log from the get go? I really don't need the logging, I only mock up stuff on it.

Thanks,

TJ

bcc1234

2:47 pm on Aug 23, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Just use one partition for swap and the other one for /.
You don't need anything else for a testing box.

danny

11:54 pm on Aug 26, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You never know when you're going to want the logs!

Logrotate should be configured to rotate them automatically and only keep so many weeks or months worth.

If /tmp was filling up, that's not going to be a logging problem - logs are written to /var/log.