From owner-freebsd-stable Tue Jul 23 22:13:53 2002 Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BDFCD37B40A for ; Tue, 23 Jul 2002 22:13:50 -0700 (PDT) Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8B26F43E65 for ; Tue, 23 Jul 2002 22:13:49 -0700 (PDT) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (localhost [127.0.0.1]) by apollo.backplane.com (8.12.5/8.12.4) with ESMTP id g6O5DlCV025900; Tue, 23 Jul 2002 22:13:47 -0700 (PDT) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.12.5/8.12.4/Submit) id g6O5Dljx025899; Tue, 23 Jul 2002 22:13:47 -0700 (PDT) (envelope-from dillon) Date: Tue, 23 Jul 2002 22:13:47 -0700 (PDT) From: Matthew Dillon Message-Id: <200207240513.g6O5Dljx025899@apollo.backplane.com> To: "Mark W. Krentel" Cc: freebsd-stable@FreeBSD.ORG Subject: Re: 4.6-RC: Glacial speed of dump backups References: <200207240505.g6O550534455@dreamscape.com> Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG : :Matthew Dillon wrote: :> The filesystem wasn't idle and you didn't sync, so of course dump :> screwed up! It would probably screw up on a FreeBSD box too. : :What's not idle? The file system is mounted, but there are no writes :to it during the dump. This and other tests run fine in Freebsd, even :without syncs (but of course I'd use sync in a real application). In :Linux, even a loop of "while true ; do sync ; sleep 1 ; done" run for :20 minutes makes no difference. : :There is something very different between Linux and Freebsd here, I :just don't know what it is. : :--Mark A filesystem which you have just written to is not idle. You have to sync a couple of times to be sure all the data's gotten to the platter, or wait a sufficiently long enough that the filesystem syncer comes along and does it for you (which would be within 60 seconds for FreeBSD). This is an almost universal trueism. Now FreeBSD's dump program does in fact do a sync() itself, right in its main(). This is probably why you didn't see the problem w/ FreeBSD. If FreeBSD's dump program did not do that sync() your test would probably not have worked. If linux's sync() does not sync the filesystem then it's a bug in linux's sync(). For Linux, just to make sure it's a synchronization problem, try unmounting the filesystem and then dumping it while it is unmounted. If that works then it sounds to me like Linux's sync() command is broken. However, if even unmounting the filesystem does not fix dump, then it sounds like a mismatch between the filesystem and the dump program. -Matt Matthew Dillon To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message