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.

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.

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
1  
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
add comment

1 Answer 1

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
add comment

Your Answer

 
discard

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.