From owner-freebsd-fs Fri Jul 12 23:24:43 2002 Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 196A537B400 for ; Fri, 12 Jul 2002 23:24:41 -0700 (PDT) Received: from mail3.dreamscape.com (mail3.dreamscape.com [206.64.128.213]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5033943E42 for ; Fri, 12 Jul 2002 23:24:40 -0700 (PDT) (envelope-from krentel@dreamscape.com) Received: from dreamscape.com (sA14-p49.dreamscape.com [209.217.195.49]) by mail3.dreamscape.com (8.9.3+blt/8.9.3) with ESMTP id CAA22764 for ; Sat, 13 Jul 2002 02:24:33 -0400 (EDT) Received: from blue.mwk.domain (localhost [127.0.0.1]) by dreamscape.com (8.11.1/8.11.1) with ESMTP id g6D6Mt501210 for ; Sat, 13 Jul 2002 02:22:57 -0400 (EDT) (envelope-from krentel@blue.mwk.domain) Message-Id: <200207130622.g6D6Mt501210@dreamscape.com> To: freebsd-fs@freebsd.org Subject: Is linux dump broken? Date: Sat, 13 Jul 2002 02:22:55 -0400 From: "Mark W. Krentel" Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org A thousand pardons for asking a Linux question here. But I'm seeing a serious problem with the Linux dump and I need someone to compare how Freebsd handles this and restore sanity to my world. Basically, the Linux dump doesn't handle mounted partitions correctly. You can dump a mounted partition, but writes since the last incremental don't show up until the partition is unmounted. It's a file system cache problem, dump doesn't notice in-memory changes to the file system until they're flushed to disk. And I don't mean writing to a file during the dump. You can reproduce the problem with dump, write, dump, restore. (And actually, it's writes without O_TRUNC that are missed.) I was incredulous. I asked about this on dump-users on sourceforge and got the following answer: And the inconsistency is normal, because both dump and the kernel accesses the raw disk structures directly, without synchronisation. This is a known problem, due to dump's design, which was no never run dump on mounted filesystems. Unless you either umount the filesystem first or use some kind of filesystem snapshots (LVM etc), you cannot guarantee that your files were in a consistent state. That's why you should check your backup with restore -C each time. So, my questions are: (1) Is this supposed to work? If a write completes before dump is started, is dump required to see the change, even if it's still in memory? My contention is yes, or else dump is seriously broken. (2) Does it work in Freebsd? My tests suggest yes, but maybe I haven't found the hardest counter example. (3) What's up with Linux? Did they not port dump correctly, or does ext2 make this impossible? Thanks, --Mark To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message