[Top] [All Lists]

Re: XFS filesystem corruption

To: stan@xxxxxxxxxxxxxxxxx
Subject: Re: XFS filesystem corruption
From: Julien FERRERO <jferrero06@xxxxxxxxx>
Date: Fri, 8 Mar 2013 11:17:42 +0100
Cc: Ric Wheeler <rwheeler@xxxxxxxxxx>, Emmanuel Florac <eflorac@xxxxxxxxxxxxxx>, xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=hjg1ThwYW8WZCIwPFh1Dk4WQFMMawcBK9pE2jHdyUq8=; b=TkmV11p4Gf18BbZ8OtL1t9lIa5FlgrkYIzgh/WTITcvHNQB+9M+OJm/uxQmWRcsnRP xRxNkiN+yXkB5TTgkQra2v2HJWpGPGSsrdITHnA2ySINnhCRQ30g1w9R3jgbgn6vykVI wiqCY/h+W59bWCqU0soPkkZwfGyEq7JlRh/xDkzGBbnIjRw6QpZv2Hg7fdlW/Nuk0Ly1 y9xwAYLj3z7VCStzq2wWyPhw/qRB6ufXlpoeSLJ/I0dNyOlZ+5duiNbh5DrR89z5WikR roWtiIoBfxC3qvwt65cujjkQQd1a8I9mTS6UDp1CWf93/myv57F+YtpqvmTk3QAy/5tm /iXA==
In-reply-to: <5139A3B6.3040805@xxxxxxxxxxxxxxxxx>
References: <CAPcwv6wZJSBtgF-L6KNSn6N6Y+wUZJFXdbcg+zYRwoaB2sDdjw@xxxxxxxxxxxxxx> <20130306161519.2c28d911@xxxxxxxxxxxxxx> <CAPcwv6wqv0b_CPqDpBfOwVDg23uBi=tpGQSy9XuH2uWS5oVMWQ@xxxxxxxxxxxxxx> <20130306232100.6286f640@xxxxxxxxxxxxxx> <5137CD46.6070909@xxxxxxxxxx> <5139A3B6.3040805@xxxxxxxxxxxxxxxxx>
> Something that none of us mentioned WRT write barriers is that while the
> filesystem structure may avoid corruption when the power is cut, files
> may still be corrupted, in conditions such as any/all of these:
> 1.  unwritten data still in buffer cache
> 2.  drive caches are enabled
> 3.  BBWC not working properly
> If the techs are determined to hard cut power because they don't have
> the time or the knowledge to do a clean shutdown, it may be well worth
> your time/effort to write a script and teach the field techs to execute
> it, before flipping the master switch.  Your simple script would run as
> root, or you'd need to do some sudo foo within, and would contain
> something like:
> #! /bin/sh
> sync
> echo 2 > /proc/sys/vm/drop_caches
> echo "Ready for power down."
> This will flush pending writes in buffer cache to disk, and assumes of
> course that drive caches are disabled, and/or that BBWC, if present, is
> functioning properly.  It also assumes no applications are still
> actively writing files, in which case you're screwed regardless.  It's
> not a perfect solution and there's no guarantee you won't suffer file
> corruption, but this greatly increases your odds against it.

Thank you, that's the plan indeed. Educating our customer, and
minimize failure with such script / recommendation.

<Prev in Thread] Current Thread [Next in Thread>