PostgreSQL Killed My Harddrive


The harddrive died in the server that dumps our firewall’s syslog output into a nice PostgreSQL database for easy reporting. PostgreSQL didn’t do anything evil in order to kill the drive, but because it syncs data to the harddrive for safety, it kept my ancient server’s harddrive spinning 247.

I should mention this was my fault. I really should have turned fsync off to let the server cache the trickle of ICMP packets that keep our firewall awake all night. Instead the old Quantum Fireball Plus LM harddrive wrote every byte right as it came in.

Luckily the harddrive still worked enough that I could attach it to another computer via a IDE-USB adapter and copy off any data I wanted to keep.

Below are the SMART statistics for the drive as collected by smartmontools and munin. As I was able to retrieve data off the disk, I would say SMART did its job even if it didn’t give me much warning.

Images were lost in a blog transition circa 2017. Sorry!