From owner-freebsd-geom@FreeBSD.ORG Tue Jan 23 14:18:24 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 B229E16A407; Tue, 23 Jan 2007 14:18:24 +0000 (UTC) (envelope-from anderson@freebsd.org) Received: from mh1.centtech.com (moat3.centtech.com [64.129.166.50]) by mx1.freebsd.org (Postfix) with ESMTP id 7B58F13C4DB; Tue, 23 Jan 2007 14:18:24 +0000 (UTC) (envelope-from anderson@freebsd.org) Received: from [10.177.171.220] (neutrino.centtech.com [10.177.171.220]) by mh1.centtech.com (8.13.8/8.13.8) with ESMTP id l0NE33PF039427; Tue, 23 Jan 2007 08:03:03 -0600 (CST) (envelope-from anderson@freebsd.org) Message-ID: <45B6159B.8050703@freebsd.org> Date: Tue, 23 Jan 2007 08:03:07 -0600 From: Eric Anderson User-Agent: Thunderbird 1.5.0.9 (X11/20070121) MIME-Version: 1.0 To: Oliver Fromme References: <200701231010.l0NAAcp6017303@lurza.secnetix.de> In-Reply-To: <200701231010.l0NAAcp6017303@lurza.secnetix.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.88.4/2480/Tue Jan 23 05:21:51 2007 on mh1.centtech.com X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=8.0 tests=BAYES_00 autolearn=ham version=3.1.6 X-Spam-Checker-Version: SpamAssassin 3.1.6 (2006-10-03) on mh1.centtech.com Cc: vd@freebsd.org, silby@silby.com, xride@x12.dk, freebsd-geom@freebsd.org Subject: Re: Where to start? X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list 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 14:18:24 -0000 On 01/23/07 04:10, Oliver Fromme wrote: > Vasil Dimov wrote: > > [discussion moved from freebsd-hackers@ to freebsd-geom@] > > Oliver Fromme wrote: > > > 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. > > [...] > > > > With gjournal not only the metadata is journaled but also the actual > > data (e.g. files' contents). So writes to the journal file (which is a > > "regular file" on the FS) should bypass the journaling stuff. Otherwise > > they will get journaled themselves and it will end up in an endless > > loop. > > Right. That's a point I forgot. The journal file would > be required to have its data be exempt from being journaled. > That's probably not trivial to implement, I'm afraid (but > I could be wrong). > > > This thing still looks to me like roping your chest to your leg (instead > > of to an unmovable object) in order to avoid falling, but I might be > > wrong... > > True, it's certainly not a clean nor efficient solution. > But Mike has a valid point that it would enable people to > turn on journaling on existing file systems, without the > need for repartitioning or adding a disk. It would be a > nice way to _quickly_ set up journaling, for testing > purposes, or simply for curiosity. Why not disable swap, use the swap partition as the new journaling device, and then enable vn-backed swap for the system? > BTW, I think in Solaris you can also add journaling to an > existing UFS partition on the fly, without the need for > newfs or adding space. (Provided that there is enough > free space inside the existing file system, of course.) Sure - many journaling fs have that ability. There's been several attempts in the past to add journaling to our UFS2, without completion. Eric