Posted on 4 Comments

Does your host flush?

While investigating a friend’s report of ext3/InnoDB corruption in a Ubuntu VirtualBox guest, when his OS X host machine crashed, I discovered that by default, VirtualBox does not do anything about IDE Flush Cache commands. The natural implication of this, which I have been able to reproduce, is that your journaled and transactional guest systems cannot maintain integrity if the host crashes. (For longer reasoning see that forum post.) It’s as if you were running them on broken hardware.
This can corrupt InnoDB – which under normal circumstances recovers fine from crashes. You can imagine what it could do to MyISAM 🙂
So this post is just a headsup – even if you’re only doing development in VB – unless you want to risk nasty surprises, I strongly recommend you disable the IgnoreFlush option in VirtualBox. See “Responding to guest IDE flush requests,” in the VirtualBox manual.
This issue may also affect other virtualisation hosts.
While investigating a friend’s report of ext3/InnoDB corruption in a Ubuntu VirtualBox guest, when his OS X host machine crashed, I discovered that by default, VirtualBox does not do anything about IDE Flush Cache commands. A risk of this is that your journaled and transactional guest systems risk corruption if the host crashes. (For longer reasoning see that forum post.) It’s as if you were running them on broken hardware.
Even if you’re only doing development in VB – to reduce the chance of a nasty surprise, I recommend you disable the IgnoreFlush option in VirtualBox. See “Responding to guest IDE flush requests,” in the VirtualBox manual.
This issue may also affect other virtualisation hosts.
Posted on 4 Comments

4 thoughts on “Does your host flush?

  1. Hmmm, the link seems to be wrong. The correct one seems to be:

    http://www.virtualbox.org/manual/UserManual.html#id2531504

    Thanks for the great info!

    1. Thanks for the headsup. I’ve fixed the link.

  2. I actually heard somewhere that OS X also doesn’t really flush…

Comments are closed.