Ano-Tech Computers
Enter keyword:

Gentoo: SCSI disk on VMware guest goes into read-only
Problem:
In a heavily loaded VMware environment, we have a Gentoo Linux server which goes into read-only mode after a few days. Attempts to remount the disk fails with the message normally seen when mounting CD-ROMs etc: /dev/hda3 is not writeable, mounting as read-only. The only solution seems to be rebooting the server on a regular basis.
 
Solution:
This error is normally caused by a kernel bug (reportedly in the 2.6.20 thru 2.6.22 kernels), triggered by heavy IO load in a VMware environment.

There are three possible workarounds, these may be combined:
1) Include the mount option 'barrier=0' in /etc/fstab
2) Change error-handling behaviour with 'tune2fs -e continue /dev/sda'
3) Increase fault-tolerance for the device with 'echo "60"> /sys/block/sda/device/timeout' during startup

Note that the real solution is ofcourse to upgrade the kernel. You may also want to look into the IO performance issue that is triggering the problem in the first place.
 
Discuss this solution
Did this article solve your problem? Yes No Did not apply

We welcome anyone who is willing to contribute to this public knowledge base, contact siteadmin@atc.no if you have information you would like to share. The idea is not to replace the commercial support sites, but to publish those hard-to-find solutions you've found yourself looking for over and over again.

Show all articles