WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

Re: [Xen-users] How (not) to destroy a PostgreSQL db in domU on powerfai

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-users] How (not) to destroy a PostgreSQL db in domU on powerfail
From: Matthieu Patou <mat+Informatique.xen@xxxxxxxxx>
Date: Wed, 04 Mar 2009 12:59:52 +0300
Delivery-date: Wed, 04 Mar 2009 02:00:39 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <200903040344.58562@xxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <200902241021.57609@xxxxxx> <7207d96f0903031715o417887fqf2d5b9d9881b2e76@xxxxxxxxxxxxxx> <200903040302.33659@xxxxxx> <200903040344.58562@xxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1b3pre) Gecko/20090227 Shredder/3.0b3pre
On 03/04/2009 05:44 AM, Michael Monnerie wrote:
On Mittwoch 04 März 2009 Michael Monnerie wrote:
On Mittwoch 04 März 2009 Fajar A. Nugraha wrote:
Is your domU filesystem (/path/root20090113.xvd ?) located on top
of LVM? If yes, then AFAIK LVM does not honor write-barriers.
Indeed. LVM is bad? I've read LVM is suggested in order to have an
easier backup with snapshots. But if the result is that your XEN domU
gets destroyed on a power outage - damn LVM.

Can someone confirm that LVM does not honor write-barriers?

http://lkml.org/lkml/2008/5/16/390
http://hightechsorcery.com/2008/06/linux-write-barriers-write-caching-
lvm-and-filesystems

If I understand correctly, turning off disk cache write cache should be
enough to be save, even when using LVM. Is it really XEN that messed the
disk, or something else? Could the Areca controller driver do something
wrong? I'd really love to get a stable and data-secure system, as you
might understand.

mfg zmi
Mike,
It's quite strange, I am running xen with xfs and lvm since a couple of time and I had some server crash (not power cable failure but still). It's well known that lvm do not honors barriers (as ext3 as well by default until last year: http://lkml.org/lkml/2008/5/16/390) so it means that you are not completely sure that metadata are written before the real data are modified, they can still be in the cache and if it vanish (due to power outage on not battery backed controller) then you're on your own. But if you have a battery backed cache then it should be ok, that is to my understanding (I can be wrong). It can be that your battery is dead or not working correctly (or your controller not using it ...), the other option is that some metadata haven't leaved the os cache (read: the domU has written the information to the disk but either dom0 or the hypervisor is mainlining is caching data for backend device) and in this case it's normal to face problem.


It would be very interesting to have more information from xfs team.

Matthieu.

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users