On Wed, Sep 22, 2010 at 07:14:43AM -0700, Orvar Korvar wrote:
> There was a guy doing that: Windows as host and OpenSolaris as guest
> with raw access to his disks. He lost his 12 TB data. It turned out
> that VirtualBox dont honor the write flush flag (or something
> similar).

VirtualBox has an option to honor flushes.

Also, recent versions of ZFS can recover by throwing out the last N
transactions that were not committed fully.

> In other words, I would never ever do that. Your data is safer with
> Windows only and a Windows raid solution.
> 
> Use OpenSolaris as host instead, and Win as guest.

I don't think your advice is correct.  If you're going to run production
services on VirtualBox VMs then you should enable cache flushes in VBox:

http://www.virtualbox.org/manual/ch12.html#id2692517

"
To enable flushing for IDE disks, issue the following command:

VBoxManage setextradata "VM name"
      "VBoxInternal/Devices/piix3ide/0/LUN#[x]/Config/IgnoreFlush" 0

The value [x] that selects the disk is 0 for the master device on the
first channel, 1 for the slave device on the first channel, 2 for the
master device on the second channel or 3 for the master device on the
second channel.

To enable flushing for SATA disks, issue the following command:

VBoxManage setextradata "VM name"
      "VBoxInternal/Devices/ahci/0/LUN#[x]/Config/IgnoreFlush" 0

The value [x] that selects the disk can be a value between 0 and 29.
"

IMO VBox should have a simple toggle for this in either its disk or vm
manager UI.  And the flush commands should be honored by default.  What
VBox could do is have some radio buttons or checkboxes for indicating
the purpose of a given VM, and then derive default flush behavior from
that (e.g., test and gaming VMs need not honor flushes, dev VMs might,
and prod VMs do).

Nico
-- 
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to