Operating System - Linux
1829054 Members
2893 Online
109986 Solutions
New Discussion

Re: unwritable /tmp on RedHat 7.2

 
Ilia Dyoka
Occasional Contributor

unwritable /tmp on RedHat 7.2

Hi All.
I have HP Netserver LP2000r (512 Mb RAM ) wuth RedHat 7.2. System has default kernel 2.4.7-10. On system works Apache+PHP+MySQL ans Samsung Contact + AVP (Anti Virus). Afrer 42 days of uptime I have noted that /tmp has bacame unwritable. And even ls /tmp has hung. kill -9 on ls /tmp has failed.
Only reset has helped.
What should I do i such situation ?

[root@main root]# ll -d /tmp
drwxrwxrwt 11 root root 102400 Jun 5 12:00 /tmp

[root@main root]# df
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/md0 3573520 2645468 746524 78% /
none 224108 0 224108 0% /dev/shm
/dev/sdc1 26233060 9847168 15053304 40% /big
/dev/sdd1 8744304 5554980 2745132 67% /small

D'oka Illia


5 REPLIES 5
Jerome Henry
Honored Contributor

Re: unwritable /tmp on RedHat 7.2

At the time you did this df and ll -d, you had rebooted, didn't you ?
Could be that your tmp is filled in that time, you could add your cron table a job to empty it everyday from the files generated you do not need anymore... Do yo see this already active in your cron ?
J
You can lean only on what resists you...
Francisco J. Soler
Honored Contributor

Re: unwritable /tmp on RedHat 7.2

Hi,
You could try a fsck to the / partition.

When the problem is solved you should build a partition for /tmp directory.

Frank.
Linux?. Yes, of course.
Caesar_3
Esteemed Contributor

Re: unwritable /tmp on RedHat 7.2

Hello

The one of the good things to do is make difrent partitions for directorys that grove without control on them so when the /tmp will be difrent partition the bigest problem that you will get is that is no more space in the /tmp partition but your system will continue to work fine.

Also you must check if some programs write swap files and they take all the space.

You can write a script that will check all the directorys for log files, core and other junk and will remove it, be carfull

Caesar
Ilia Dyoka
Occasional Contributor

Re: unwritable /tmp on RedHat 7.2

Hi.
I have found out that /tmp was occupied by process in D state (uninterruptable sleep). Thats why no one could read (write) /tmp. What I shoud do with such process.

D'oka Illia
Caesar_3
Esteemed Contributor

Re: unwritable /tmp on RedHat 7.2

Hello!

You should check what's this procces,
who run it, who his father (PPID).
If this will help you understand what's
this procces good if not,
next check in man or help, check your
syslog, mail, dmesg to may have some info.
If not then try to kill it whit KILL
signal and see what's hapend if he didn't
die you will nead to reboot.
After the reboot check if it's running again
and the problem is came back if do
try to understand who run it, may be
he dameged or you need to upgrate it.

Caesar