0

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/postmaster.8053.pid': 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.

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

1 Answer 1

1

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .