Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

For some reason I cannot access my website anymore.

So, I tried to restart Apache and got the following errors:

rm: cannot remove /var/run/httpd.pid: Read-only file system.

rm: cannot remove /var/lock/subsys/httpd: Read-only file system.

Unfortunately, I haven't heard back yet from the hosting provider.

But what could I have actually done wrong that I am seeing this error now? And what does it even mean? Why's the file system only read-only? I haven't even logged in to the server recently, and the last time I checked my website was working.

Any help would be greatly appreciated.

Edit:

cat /proc/mounts outputs the following:

enter image description here

share|improve this question
    
yea, it's readonly. Contact the service provider. You can try "mount /dev/VolGroup00/var /var -oremount,rw" to see if you can mount it read/write while waiting for a reply. –  cjc Sep 8 '11 at 19:29
    
Alright, will do. And thanks for your help, cjc! –  user94142 Sep 8 '11 at 19:31
add comment

1 Answer

up vote 2 down vote accepted

Check mount - your filesystem has likely been remounted read-only due to errors.

This probably needs to be dealt with by the hosting provider.

Edit: My mistake - as the warning states, it doesn't have current info; what do you get from cat /proc/mounts?

share|improve this answer
    
Hey, thanks for the quick reply, Shane! I updated my answer, unfortunately I have no clue what that even means lol, do you have any idea what the reason could be why the filesystem has been remounted to read-only? I couldn't find anything specific on Google. –  user94142 Sep 8 '11 at 19:22
    
Again, updated. Thanks alot for your help. I really appreciate it. –  user94142 Sep 8 '11 at 19:25
    
@krysis Looks like / and /var remounted themselves read-only; you could try to remount them read-write remotely, but if there's an issue with the filesystem (as there is likely to be) then they'll probably need an offline fsck; I'd recommend getting your hosting company involved to assist. –  Shane Madden Sep 8 '11 at 19:29
    
Will do. And thanks again for your help, Shane! I just really wonder what I did that this happened. I just hope they aren't charging too much for it. lol –  user94142 Sep 8 '11 at 19:32
    
@krysis If it's a VM, a temporary loss in connectivity to the storage may be the culprit; unfortunately, your logs probably aren't going anywhere other than /var (ie a remote syslog server) so there's not really any good way to take a look back. –  Shane Madden Sep 8 '11 at 19:37
show 2 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.