Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am not a Database Admin but have to take care of this request. The PostgreSQL Server crashed during an update. Now I am unable to start it again.

The process id dead. When I am trying to stop the server. I get this message

m: cannot remove `/var/run/': Read-only file system
rm: cannot remove `/var/lock/subsys/postgresql': Read-only file system

When I try to start the server, the following message is coming

Starting postgresql service: /etc/init.d/postgresql: line 183: /var/lib/pgsql/pgstartup.log: Read-only file system

Any help would be appreciated.

share|improve this question
Are you starting the database as superuser? What are the permissions on the log file? – Khaled Jan 25 '11 at 6:46
Yes, I am starting as Superuser and the logfile has rw permission for root – Chakra Jan 25 '11 at 7:02
What's the output of 'mount'? – Cakemox Jan 25 '11 at 7:20
It is possible that your /var partition is mounted as read-only. – Khaled Jan 25 '11 at 7:48
There was some problem with the file system.A hard reboot solved the problem – Chakra Jan 25 '11 at 8:14
up vote 1 down vote accepted

When the crash is related to a storage failure, even momentarily, the kernel sometimes chooses to remount the file system read-only to prevent further damage. You can undo that using

mount -o remount,rw /whatever

Also check the errors option on the mount man page about this behavior.

A reboot is of course also an option to clean this up.

share|improve this answer

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.