LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 03-09-2011, 12:08 PM   #1
blainemiller
Member
 
Registered: Dec 2003
Posts: 78

Rep: Reputation: 1
crontab -e read-only filesystem error


Hello...

When I try to edit teh crontab with the crontab -e command I get the following:

/tmp/crontab.XXXXz56XMg: Read-only file system...

mount command shows all filesystems as (rw)

The server is redhat 4.7, vanilla install. How do I edit the crontab? Rebooting the server doesn't help and there is adequate space for usage on the server per df -h...

I appreciate your help as I need to change the root crontab as soon as possible. Everything I've seen on the 'Net has been inconclusive or ineffective.

Thanks!

Blaine
 
Old 03-09-2011, 12:15 PM   #2
Reuti
Senior Member
 
Registered: Dec 2004
Location: Marburg, Germany
Distribution: openSUSE 11.4
Posts: 1,319

Rep: Reputation: 252Reputation: 252Reputation: 252
Is /tmp mounted from another server? Even when it's mounted rw on the client side, it could be exported as ro.
 
Old 03-09-2011, 12:26 PM   #3
jcalzare
Member
 
Registered: Aug 2009
Location: Chicago
Distribution: CentOS
Posts: 114

Rep: Reputation: 34
There may be a filesystem issue. You will see that error sometimes when there is corruption requiring an fsck. You can edit the crontab directly by editing /var/spool/cron/username, but you may need to restart crond.

Also, try to touch /tmp/test or something to see if you can write to /tmp as root.
 
Old 03-09-2011, 04:29 PM   #4
blainemiller
Member
 
Registered: Dec 2003
Posts: 78

Original Poster
Rep: Reputation: 1
I get the same filesystem (ro) error when I do a touch or try to restart crond...

Only difference now is that crond is apparently unable to start again as well...

How would I do an fsck on this system?

Thanks!


Blaine
 
Old 03-09-2011, 04:35 PM   #5
sang_froid
Member
 
Registered: Oct 2006
Posts: 179

Rep: Reputation: 15
Can you post the output of "df -h" and "df -i" command ?

Also the contents of /etc/fstab..



Quote:
Originally Posted by blainemiller View Post
Hello...

When I try to edit teh crontab with the crontab -e command I get the following:

/tmp/crontab.XXXXz56XMg: Read-only file system...

mount command shows all filesystems as (rw)

The server is redhat 4.7, vanilla install. How do I edit the crontab? Rebooting the server doesn't help and there is adequate space for usage on the server per df -h...

I appreciate your help as I need to change the root crontab as soon as possible. Everything I've seen on the 'Net has been inconclusive or ineffective.

Thanks!

Blaine
 
Old 03-09-2011, 04:36 PM   #6
jcalzare
Member
 
Registered: Aug 2009
Location: Chicago
Distribution: CentOS
Posts: 114

Rep: Reputation: 34
Yeah, it pretty much sounds like your filesystem is cooked. If you want to run fsck, first you need to find out which device /tmp resides on. Just type mount and it will show where everything is mounted. It may or may not be on a separate device from /, if you don't see a separate entry for /tmp, then the device is the same as the one used for /. Then, you'll want to boot off a live cd, or installation DVD and go to recovery mode. From there, run fsck -y -C /dev/sda4 or whatever device /tmp resides on. You want to do this off installation media because you do not want to run fsck on a mounted filesystem. So, for hte same reason, do not allow the installation media to attempt to automatically mount your drives (it will usually ask first).

I'd suggest making backups of anything important before you run fsck, because there is always a chance that you'll get some data loss.
 
Old 03-09-2011, 05:21 PM   #7
blainemiller
Member
 
Registered: Dec 2003
Posts: 78

Original Poster
Rep: Reputation: 1
Thanks for everyone's help... I'm going to go ahead and scrub this system and reload it from scratch. It's only a VM, so it shouldn't be too tedious. There was nothing of importance on it datawise and reloading the applications resident on the server while tedious, is more doable than trying to continue trouble shooting this mess...

I thank you all and will mark this as resolved...

Blaine
 
Old 03-09-2011, 05:32 PM   #8
Reuti
Senior Member
 
Registered: Dec 2004
Location: Marburg, Germany
Distribution: openSUSE 11.4
Posts: 1,319

Rep: Reputation: 252Reputation: 252Reputation: 252
Well, in this case: maybe the file for the virtual file system on the real host is owned by someone else than the user of the VM.
 
  


Reply

Tags
crontab


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
Read-only filesystem error s_federici Linux - Server 7 09-13-2010 10:30 PM
Attempt to read block from filesystem resulted in short read while trying to the_ultimate_samurai Linux - Hardware 6 06-02-2010 08:09 PM
Raid disk problem : Attempt to read block from filesystem resulted in short read ElmPie Linux - General 5 08-26-2008 05:21 AM
error mounting ext3 filesystem... mount: /dev/hdd1: can't read superblock versaulis Linux - Software 5 11-26-2006 08:34 PM
my linux error : Couldn't open /dev/null (read-only filesystem) Darick Ang Linux - General 3 10-28-2003 01:27 PM


All times are GMT -5. The time now is 03:43 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