LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 03-02-2010, 05:39 AM   #1
roctaiwan
LQ Newbie
 
Registered: Jul 2009
Posts: 4

Rep: Reputation: 0
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

Last edited by roctaiwan; 03-02-2010 at 05:40 AM.
 
Old 03-02-2010, 05:40 AM   #2
evo2
Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,591

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

Code:
mount
Evo2.
 
Old 03-02-2010, 05:59 AM   #3
geovg
Member
 
Registered: Mar 2010
Posts: 40

Rep: Reputation: 1
Quote:
Originally Posted by roctaiwan View Post
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.
 
Old 03-03-2010, 03:56 AM   #4
roctaiwan
LQ Newbie
 
Registered: Jul 2009
Posts: 4

Original Poster
Rep: Reputation: 0
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 View Post
It appears that for some reason it was mounted read only. Can you please post the output of:

Code:
mount
Evo2.
 
Old 03-03-2010, 04:00 AM   #5
roctaiwan
LQ Newbie
 
Registered: Jul 2009
Posts: 4

Original Poster
Rep: Reputation: 0
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 View Post
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.
 
Old 03-03-2010, 04:13 AM   #6
evo2
Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,591

Rep: Reputation: 1244Reputation: 1244Reputation: 1244Reputation: 1244Reputation: 1244Reputation: 1244Reputation: 1244Reputation: 1244Reputation: 1244
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.
 
Old 03-03-2010, 04:13 AM   #7
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,563
Blog Entries: 29

Rep: Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179
<Duplicate post deleted>
 
Old 03-03-2010, 04:13 AM   #8
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,563
Blog Entries: 29

Rep: Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179
Quote:
Originally Posted by roctaiwan View Post
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
 
Old 03-04-2010, 07:24 AM   #9
roctaiwan
LQ Newbie
 
Registered: Jul 2009
Posts: 4

Original Poster
Rep: Reputation: 0
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 View Post
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.
 
  


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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't login, says tmp directory full but tmp file is empty! Could be linked to MySQL? bethanlowder Fedora 7 09-25-2009 08:17 AM
mkdir: cannot create directory `test': Read-only file system punt Linux - General 2 04-16-2005 10:58 PM
cannot create directory `/mnt/win_d/MP3': Read-only file system PapaJac Mandriva 11 03-04-2004 06:25 AM
cannot create directory `/mnt/win_d/MP3': Read-only file system PapaJac Mandriva 0 03-02-2004 05:09 PM
"mkdir: cannot create directory `foo': Read-only file system" on FAT32 maddes Linux - Hardware 1 11-26-2003 07:19 PM


All times are GMT -5. The time now is 03:11 AM.

Main Menu
Advertisement
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