I have a VPS and today I noticed apache was not running, I got in SSH, the httpd status says:
[root@adrimail ~]# service httpd status
httpd dead but pid file exists
Tried to restart it and I get this:
[root@adrimail ~]# service httpd restart
rm: cannot remove `/var/run/httpd.pid': Read-only file system [FAILED]
rm: cannot remove `/var/lock/subsys/httpd': Read-only file system
rm: cannot remove `/var/run/httpd.pid': Read-only file system
Starting httpd: (30)Read-only file system: httpd: could not open error log file /etc/httpd/logs/error_log.
Unable to open logs
I was wondering what can cause these errors, it works after restart, but I feel it is kind of unresponsive.
Is the error related to the upper node storage settings or can it be something caused from my end ?! I didn't do any work on server recently though.
Host says they cannot see any boot errors and they are OK with it but I am worried.
Talk to your host.
Typically, a filesystem goes read only when it detects some type of major issue in the hardware. Since you have a VPS, this would pretty much mean your hosts's machine is having some type of issue.
dmesg
might have some information as to why it happened, but otherwise this is something your host needs to fix. 'We dont see any boot errors' is not an acceptable answer here, you need to ask them to determine why your VPS suddenly went read only.I would first check that /var isnt the only read only file system?
It sounds like it could be and I have had this problem before
This would make sense if /var was under its own filesystem mountpoint.
Run the "debugfs" command on your mount-point for /dev/partioncode (probably /dev/sdaX)
This will tell you if you have a bad or corrupted file system.
Also check your fstab file + log files for any irregularities, (signs of attack).
The last point of call is to boot the server, whilst looking at the serial console (every VPS provider should provide this), and you should see a message about /var being re-mounted in "read only"
It was a hardware problem at my host. In the last reply the host said that problem that caused the read-only file system was "a timeout with the storage platform".