Useful Snippets


This blog is used to collect useful snippets related to Linux, PHP, MySQL and more. Feel free to post comments with improvements or questions!

Are your smart devices spying on you? Make better purchasing choices and find products that respect your privacy at

RSS Latest posts from my personal blog

Most viewed posts

Subscribe to RSS feed

Increasing write timeout on a hard drive / block device

Stanislav KhromovStanislav Khromov

I was having issues with my CentOS system a Hetzner VQ Server. It turned out the virtualization caused some device (hard drive) writes to timeout, which put the file system into read-only mode. Consecutively the machine would crash and upon reboot no services would start as they couldn’t write to their log files.

Here is how to fix it:

echo 180 > /sys/block/sda/device/timeout

Remember to change sda to your device. If you have multiple devices (sda, sdb etc) the command needs to be run separately for each of them.

The command will only last until reboot. To set it at startup, read this article.

Source 1
Source 2

Web Developer at Aftonbladet (Schibsted Media Group)
Any opinions on this blog are my own and do not reflect the views of my employer.
Twitter Profile
Visit my other blog

Comments 0
There are currently no comments.