From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Siebert, Aaron" Newsgroups: gmane.os.tru64.managers Subject: SUMMARY: FSYNC and hardware interoperability Date: Thu, 27 Feb 2003 16:20:23 -0700 Sender: tru64-unix-managers-owner@ornl.gov Message-ID: <4E2CE3FB9E1B744482F6669A9AE2F72E7B8E58@NSTAREXCH1.windows.nagrastar.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: main.gmane.org 1046388028 24300 80.91.224.249 (27 Feb 2003 23:20:28 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 27 Feb 2003 23:20:28 +0000 (UTC) Return-path: Original-Received: from sws1.ctd.ornl.gov ([160.91.22.101]) by main.gmane.org with smtp (Exim 3.35 #1 (Debian)) id 18oXK9-0006Jc-00 for ; Fri, 28 Feb 2003 00:20:21 +0100 Original-Received: (qmail 28879 invoked by uid 5); 27 Feb 2003 23:20:30 -0000 Original-Followup-To: poster Precedence: bulk Original-Received: (qmail 28866 invoked by uid 49493); 27 Feb 2003 23:20:30 -0000 Original-Received: from aaron.siebert@nagrastar.com by sws1 by uid 49491 with qmail-scanner-1.14 (clamscan: 0.54. spamassassin: 2.50-cvs. Clear:SA:0(-0.7/5.0):. Processed in 0.435435 secs); 27 Feb 2003 23:20:30 -0000 Original-Received: from unknown (HELO emroute1.cind.ornl.gov) (160.91.4.119) by 0 with SMTP; 27 Feb 2003 23:20:29 -0000 Original-Received: from emroute1.cind.ornl.gov (localhost [127.0.0.1]) by emroute1.cind.ornl.gov (PMDF V6.1-1 #30669) with ESMTP id <0HAZ00G6RQ64DT@emroute1.cind.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Thu, 27 Feb 2003 18:20:29 -0500 (EST) Original-Received: from windows.nagrastar.com (nstarexch1.windows.nagrastar.com [208.46.80.200]) by emroute1.cind.ornl.gov (PMDF V6.1-1 #30669) with ESMTP id <0HAZ0003PQ5ZLY@emroute1.cind.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Thu, 27 Feb 2003 18:20:24 -0500 (EST) Original-To: tru64-unix-managers@ornl.gov X-MIMEOLE: Produced By Microsoft Exchange V6.0.6249.0 Thread-Topic: SUMMARY: FSYNC and hardware interoperability Thread-Index: AcLesZP94OyqvVAjR9aAfLY2ksQ0zAAAiXCA content-class: urn:content-classes:message X-MS-Has-Attach: X-MS-TNEF-Correlator: Xref: main.gmane.org gmane.os.tru64.managers:3474 X-Report-Spam: http://spam.gmane.org/gmane.os.tru64.managers:3474 Thanks the infamous Thomas Blinn and Alan Rollow. Please see responses to the original question. Tom Blinn There is no way, in full generality, to assure that when the operating system (ANY operating system) tells a set of hardware to do something, it has really been done, but in general, if you turn off any kind of write buffering in the disks (or RAID controllers), you will usually get a real "sync" from this. But some devices say they've written the data to permanent storage (something not susceptible to, say, power failure) when they haven't -- in other words, they lie. What level of certainty do you need, and what level of investigation are you willing to do to assure that things are really working? For most commercial purposes, "fsync()" is as close as you're going to get. Alan Rollow All the synchronous write hooks (fsync(2), O_SYNC, etc) depend on the underlying hardware not lying when it says the data is written. With enough different ways for these subsystems to implement caching, there's little hope for the operating system to be able to know all the ways of turning it off. So, if a subsystem supports write-back caching, the operating system has little hope of knowing that and therefore little hope of being able to turn it off. If you don't trust the storage subsystem's promise that data in the cache is at least as available and safe as on media, you need to find a way to get the caching turned off at the subsystem level. Bare SCSI disks can support a fairly standardized way of letting a host know they support write caching. Some operating systems and subsystems may blindly turn this off, since they're not inclined to trust it either. But, the more interesting subsystem caching implementations aren't likely to be so easily controlled. -----Original Message----- From: Siebert, Aaron=20 Sent: Thursday, February 27, 2003 3:43 PM To: tru64-unix-managers@ornl.gov Subject: FSYNC and hardware interoperability Managers, This question applies to most UNIX platforms including Tru64. We have a need to ensure that data is written to disk. We are planning to use the fsync command to ensure that the data was written. However, we are concerned that at the hardware level, intelligent caching may have some way to disguise if the data was actually written to disk or is waiting to be committed. Basically, our understanding is that executing the fsync command ensures that the data has been committed to disk regardless of the hardware/controller/disk application. Can anyone confirm this or does anyone have any suggestions? Thanks Aaron Siebert IT Systems Engineer Nagrastar Desk: 303-706-5492 Fax: 303-706-5719 Aaron.Siebert@Nagrastar.com=20