LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 12-14-2003, 03:32 PM   #1
rob19
Member
 
Registered: Mar 2003
Location: New Zealand
Distribution: Red Hat Linux 8 & 9
Posts: 32

Rep: Reputation: 15
Question /tmp wiped automatically?


I have a RH9 standard distro running KDE. I have setup a RAID 0 across two IDE drives resulting in a /tmp that has 350GB capacity. I am using samba to share this to Windows users. Copying files from Windows over to the Linux share is fine. However, for some reason /tmp seems to automatically wipe most of the files each night. Is this normal?

I have checked the crontab by running:
crontab -l

but it lists no scheduled tasks for root.

The Windows user is not deleting the files and has even disconnected the mapped drive one evening to eliminate that as a problem. Can anyone explain how best to fix this problem?
 
Old 12-14-2003, 05:46 PM   #2
Shade
Senior Member
 
Registered: Mar 2003
Location: Burke, VA
Distribution: RHEL, Slackware, Ubuntu, Fedora
Posts: 1,418
Blog Entries: 1

Rep: Reputation: 46
/tmp is used for system temporary files, a little like swap, but more with data caching I believe. It's not meant for user files.

Don't use it for shares, create a separate directory.

I use /share

And share it with nfs / smb.

Messing with /tmp has been known to screw with gnome/kde installations...

At least from what I've experienced once or twice and read.

-Shade
 
Old 12-14-2003, 06:15 PM   #3
Faecal
Member
 
Registered: Sep 2002
Location: York, UK
Distribution: Debian Sid
Posts: 215

Rep: Reputation: 30
Yes, it is normal for tmp to get wiped like this. Some distros come set to wipe it daily, some weekly or on reboot. As the previous poster mentioned, you shouldn't put anything in tmp that you'd be worried about vanishing without warning.

Tasks like this generally aren't in the superuser's crontab: they're in /etc/crontab. In most situations, /etc/crontab contains a series of run-parts commands which execute all the scripts in a few directories like cron.daily, cron.weekly etc. You'll probably find a script in /etc/cron.daily which is cleaning up /tmp for you.
 
Old 12-14-2003, 07:15 PM   #4
rob19
Member
 
Registered: Mar 2003
Location: New Zealand
Distribution: Red Hat Linux 8 & 9
Posts: 32

Original Poster
Rep: Reputation: 15
Yes, under /etc/cron.daily directory is a file called tmpwatch. This is the culprit.

I have removed this file for the time being but was wondering if it was possible to set the RAID 0 to use something such as /video instead of /tmp? Or would I have to format the whole drive and reinstall Linux to setup the RAID again?
 
Old 12-14-2003, 09:00 PM   #5
teval
Member
 
Registered: Jul 2003
Location: Toronto, Canada
Distribution: Gentoo
Posts: 720

Rep: Reputation: 30
What tmp actually is usually is a ramdisk.
You'll see if defined as a tmpfs in your /etc/fstab file. That means all the info is kept in your ram, and is just mapped onto a folder. Every time your ram looses it's data (reboot) tmp will be automatically cleaned since it's data is gone.
You can change that from tmpfs to a normal partition easily, or just delete that line and it'll go under the / (root) partition.

It's always possible to change things, reinstalling all of linux should never happen
I think your problem is easily solved by mounting what's currently mounted as tmp with a new name. Create the directory in / first. Haven't used raid before though, but give it a try.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
kde, /tmp, /var/tmp and all that garba Linux - Software 4 06-17-2005 12:31 PM
Why was the relocated /tmp write permission automatically reset (lost)? wirawan0 Mandriva 2 06-26-2004 07:33 PM
"/tmp/sv001.tmp/setup.bin" error while installing OO1.1.0 Choey Linux - Software 0 09-16-2003 04:52 PM
Numerous scb_*.tmp files in /tmp dburk Programming 3 08-18-2003 04:28 PM
Newbie question - /tmp /var/tmp Mr happy Linux - Security 3 01-27-2003 01:03 PM


All times are GMT -5. The time now is 01:04 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration