From owner-freebsd-geom@FreeBSD.ORG Tue Jan 23 08:45:49 2007 Return-Path: X-Original-To: freebsd-geom@FreeBSD.ORG Delivered-To: freebsd-geom@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AC80516A401; Tue, 23 Jan 2007 08:45:49 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [83.120.8.8]) by mx1.freebsd.org (Postfix) with ESMTP id 17AD613C43E; Tue, 23 Jan 2007 08:45:48 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (pahevu@localhost [127.0.0.1]) by lurza.secnetix.de (8.13.4/8.13.4) with ESMTP id l0N8Jxiu003877; Tue, 23 Jan 2007 09:20:05 +0100 (CET) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.13.4/8.13.1/Submit) id l0N8Jxrm003876; Tue, 23 Jan 2007 09:19:59 +0100 (CET) (envelope-from olli) Date: Tue, 23 Jan 2007 09:19:59 +0100 (CET) Message-Id: <200701230819.l0N8Jxrm003876@lurza.secnetix.de> From: Oliver Fromme To: freebsd-hackers@FreeBSD.ORG, freebsd-geom@FreeBSD.ORG, vd@FreeBSD.ORG, xride@x12.dk, silby@silby.com In-Reply-To: <20070122083727.GA61615@qlovarnika.bg.datamax> X-Newsgroups: list.freebsd-hackers User-Agent: tin/1.8.2-20060425 ("Shillay") (UNIX) (FreeBSD/4.11-STABLE (i386)) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Tue, 23 Jan 2007 09:20:05 +0100 (CET) Cc: Subject: Re: Where to start? X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-geom@FreeBSD.ORG, vd@FreeBSD.ORG, xride@x12.dk, silby@silby.com List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jan 2007 08:45:49 -0000 Vasil Dimov wrote: > Mike Silbersack wrote: > > Soeren Straarup wrote: > > [...] > > > I'm looking for a project. > > [...] > > I'd like to see the ability to run gjournal without reformatting. > > If you could create a dummy file inside the filesystem, then use > > that area for the journal, it might be possible. I'm sure that > > would let a lot more people see if journalling is right for them. > > I am not sure about gjournal internals but what if a system crash > occurs in the middle of a transaction and the fs gets corrupted and > the data, necessary to fix it is in the journal, but you cannot > access the journal because the file, which contains the journal, > is on a corrupted fs? I think you should still be able to mount the file system read-only, even if it's not "clean", so there's no problem locating the journal file. Particularly, note that the journal file should probably be located in the root of the file system, and it will have a constant size and should be allocated from the start (i.e. it never grows nor changes allocation), which means there is no way that its meta data could be damaged. On the other hand, _if_ the file system is so seriously busted that the journal file could not be located or used anymore, then it's probably a sign of physical damage, and in that case the journal wouldn't be able help you anyway. Journalling is only able to fix things after "regular" crashes. Disclaimer: I'm not a GEOM code expert. Someone please correct me if I'm wrong. BTW, I've just got an idea. Wouldn't it be possible to set up a "journal file" in a similar manner as you set up a swap file? That is, you create a sufficiently large file with dd(1) from /dev/zero, then run vnconfig(8) to create an md(4) device for it, then -- instead of running swapon(8) -- you enable journalling, using that file for the journal. I'm aware that this doesn't currently work out of the box, and there's a hen-and-egg problem during boot when fsck+mount is to be run. But I think it should be possible to make it work without too much trouble. Best regards Oliver PS: I've set reply-to to the freebsd-geom list. I think it is more appropriate than -hackers. -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing Dienstleistungen mit Schwerpunkt FreeBSD: http://www.secnetix.de/bsd Any opinions expressed in this message may be personal to the author and may not necessarily reflect the opinions of secnetix in any way. "C++ is the only current language making COBOL look good." -- Bertrand Meyer