From owner-freebsd-fs@FreeBSD.ORG Tue Jun 20 08:58:00 2006 Return-Path: X-Original-To: freebsd-fs@FreeBSD.ORG 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 78D3416A47D for ; Tue, 20 Jun 2006 08:58:00 +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 7394143D6E for ; Tue, 20 Jun 2006 08:57:59 +0000 (GMT) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (sxeryj@localhost [127.0.0.1]) by lurza.secnetix.de (8.13.4/8.13.4) with ESMTP id k5K8vqQa052502 for ; Tue, 20 Jun 2006 10:57:57 +0200 (CEST) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.13.4/8.13.1/Submit) id k5K8vqh9052501; Tue, 20 Jun 2006 10:57:52 +0200 (CEST) (envelope-from olli) Date: Tue, 20 Jun 2006 10:57:52 +0200 (CEST) Message-Id: <200606200857.k5K8vqh9052501@lurza.secnetix.de> From: Oliver Fromme To: freebsd-fs@FreeBSD.ORG In-Reply-To: X-Newsgroups: list.freebsd-fs User-Agent: tin/1.8.0-20051224 ("Ronay") (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, 20 Jun 2006 10:57:57 +0200 (CEST) Cc: Subject: Re: Journaling UFS with gjournal. X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-fs@FreeBSD.ORG List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2006 08:58:00 -0000 Niki Denev wrote: > [long quote snipped] > I wonder if it's possible to use gjournal on > existing file system with the journal on a vnode/(swap?) backed md(4) device? > (i want to test on a existing installation without free unpartitioned space) I think it should be possible. First umount the file system, then create an md(4) device with mdconfig(8), then specify the /dev/md* device as the journal provider to gjournal, and finally mount the file system again with the "gjournal" option. However, note that you should use a vnode-backed md(4) device only. If you use a malloc(9)-backed or swap- backed one, you will lose the journal upon a crash or power failure, defeating the whole purpose of gjournal. It is probably a good idea to put the backing file for the md(4) device on a different file system than the one being journaled. > And if it is possible, how can i do this for the root filesystem? i'll need the md(4) > device before mounting of the root fs which seems hard/impossible? > What's going to happen if my root mount is gjournal labeled and has gjournal option in > fstab but at boot time the journal GEOM provider does not exist? I guess that doesn't currently work, but it shouldn't be too difficult to implement. Pawel, please correct me if I'm wrong. - First, the kernel mounts the root file system read- only, which should always work, no matter if it is dirty or clean, or if it was gjournalled before or not. - Then -- as usual -- the kernel starts /sbin/init which runs /etc/rc (assuming going multi-user mode), which starts the rcNG framework. - In the course of performing the rcNG stuff, an md(4) device for the gjournal has to be configured (just similar to the way md(4) devices are configured for /tmp and other such file systems). - After that, the root file system is re-mounted (-u) with the gjournal and read-write options. With proper rcNG ordering it should work fine. > When finished, this will certainly make FreeBSD much more competitive :) Definitely. Best regards Oliver -- 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. One Unix to rule them all, One Resolver to find them, One IP to bring them all and in the zone to bind them.