Received: with ECARTIS (v1.0.0; list linux-xfs); Tue, 15 Oct 2002 11:47:55 -0700 (PDT) Received: from zeus-e8.americas.sgi.com ([198.149.7.250]) by oss.sgi.com (8.12.5/8.12.5) with SMTP id g9FIlntG032236 for ; Tue, 15 Oct 2002 11:47:50 -0700 Received: from daisy-e185.americas.sgi.com (daisy-e185.americas.sgi.com [128.162.185.214]) by zeus-e8.americas.sgi.com (SGI-8.9.3/americas-smart-nospam1.1) with ESMTP id NAA38166; Tue, 15 Oct 2002 13:47:44 -0500 (CDT) Received: from jen.americas.sgi.com (jen.americas.sgi.com [128.162.187.49]) by daisy-e185.americas.sgi.com (SGI-8.9.3/SGI-server-1.8) with ESMTP id NAA59913; Tue, 15 Oct 2002 13:47:43 -0500 (CDT) Received: by jen.americas.sgi.com (8.11.6/SGI-client-1.7) id g9FIjDX11928; Tue, 15 Oct 2002 13:45:13 -0500 Subject: Re: Gaurenteed file write?? From: Steve Lord To: Greg Freemyer Cc: xfs mailing list In-Reply-To: <20021015180506.NXFR22240.imf13bis.bellsouth.net@Mother2> References: <20021015180506.NXFR22240.imf13bis.bellsouth.net@Mother2> Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Ximian Evolution 1.0.8 Date: 15 Oct 2002 13:45:13 -0500 Message-Id: <1034707513.1783.54.camel@jen.americas.sgi.com> Mime-Version: 1.0 X-archive-position: 983 X-ecartis-version: Ecartis v1.0.0 Sender: linux-xfs-bounce@oss.sgi.com Errors-to: linux-xfs-bounce@oss.sgi.com X-original-sender: lord@sgi.com Precedence: bulk X-list: linux-xfs On Tue, 2002-10-15 at 13:03, Greg Freemyer wrote: > All, > > I have an iteration counter that I update every night. > > echo $ITERATION > /backup/iteration > > Recently this file was reset to 0. > > I suspect it was a case of the "zero filled file". > > For this specific file and shell script, what extra logic can I add that would give me the highest likelihood of a successful disk write. > > i.e. Would sync; sync; increase my odds of always successfully writing this file out? > > TIA > Greg Freemyer > > Write a little program which opens a file and calls fsync on it. sync should do it too. Steve -- Steve Lord voice: +1-651-683-3511 Principal Engineer, Filesystem Software email: lord@sgi.com