On Tue, Feb 17, 2009 at 09:59:54AM +0100, Michael Monnerie wrote:
> Now I'm sure that the following configuration can destroy a PostgreSQL
> 8.3.5 database:
> * Linux host with XEN, XFS filesystem with "nobarrier", RAID controller
> with battery backed cache.
> * XEN vm with XFS filesystem with "nobarrier" with postgresql
> * your daughter with 3.5 years switching off the power supply of the
> I guess one shouldn't use "nobarrier" on a XEN XFS domU machine.
> Would that help? I'd like to enter this in the FAQ, as people (including
> me) will be very upset to loose data, or destroy databases.
I'm not even sure the Xen driver implements barriers. I haven't done
much with Xen, but with the default kvm/qemu config I can completely
wreck ext3 and XFS filesystems. If using these virtualization solutions
make sure you do not cache the virtual block device in the host
pagecache, and that in doubt the write cache of the disk is turned off
as barriers most likely won't work through the virtualization stack.