LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Can't empty the /tmp directory Read-only file system warning (https://www.linuxquestions.org/questions/linux-newbie-8/cant-empty-the-tmp-directory-read-only-file-system-warning-792560/)

roctaiwan 03-02-2010 04:39 AM

Can't empty the /tmp directory Read-only file system warning
 
Does anyone know why files in my /tmp directory are not able to rm even using root login? not only that, I can't even chmod or do anything to files in /tmp directory... it always saying "read only file system" warning

evo2 03-02-2010 04:40 AM

It appears that for some reason it was mounted read only. Can you please post the output of:

Code:

mount
Evo2.

geovg 03-02-2010 04:59 AM

Quote:

Originally Posted by roctaiwan (Post 3882227)
Does anyone know why files in my /tmp directory are not able to rm even using root login? not only that, I can't even chmod or do anything to files in /tmp directory... it always saying "read only file system" warning

Seems that your partition went read-only. You can confirm this by the following.

cd /tmp
touch testfile

If the file is not created, the partition is read-only. Please reboot the system/ run an fsck. That will fix it.

roctaiwan 03-03-2010 02:56 AM

Here is my mount output:

[huang@localhost ~]$ mount
/dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)

did I mount it as read only??


Quote:

Originally Posted by evo2 (Post 3882229)
It appears that for some reason it was mounted read only. Can you please post the output of:

Code:

mount
Evo2.


roctaiwan 03-03-2010 03:00 AM

yeah, I can't create anything on /tmp. I don't remember I did anything that make my /tmp to read only partition... how do you make /tmp partition read only normally?

Quote:

Originally Posted by geovg (Post 3882253)
Seems that your partition went read-only. You can confirm this by the following.

cd /tmp
touch testfile

If the file is not created, the partition is read-only. Please reboot the system/ run an fsck. That will fix it.


evo2 03-03-2010 03:13 AM

According to mount you don't have a separate /tmp partion, so it is probably just a directory in /. mount also reports that / is mounted read-write (not read-only). Can you write to files in /?

For example, as root:
Code:

touch /foo

Evo2.

catkin 03-03-2010 03:13 AM

<Duplicate post deleted>

catkin 03-03-2010 03:13 AM

Quote:

Originally Posted by roctaiwan (Post 3883648)
yeah, I can't create anything on /tmp. I don't remember I did anything that make my /tmp to read only partition... how do you make /tmp partition read only normally?

From your mount output, /tmp is not a partition and all your usual partitions are writeable.

More information needed! Please post the output of
Code:

df -hT /tmp
/bin/ls -dl /tmp


roctaiwan 03-04-2010 06:24 AM

Evo, yes, I can write to /

I solve the problem by restarting my server and do fsck. But I still scratching my head and wondering what was happening.

I only have two partitions, one is for /boot on sda1 and all others are mount on sda2. Since they are all write-able then what was wrong?



Quote:

Originally Posted by evo2 (Post 3883660)
According to mount you don't have a separate /tmp partion, so it is probably just a directory in /. mount also reports that / is mounted read-write (not read-only). Can you write to files in /?

For example, as root:
Code:

touch /foo

Evo2.



All times are GMT -5. The time now is 10:08 AM.