From owner-freebsd-current@FreeBSD.ORG  Fri Jun 23 19:20:50 2006
Return-Path: <owner-freebsd-current@FreeBSD.ORG>
X-Original-To: freebsd-current@freebsd.org
Delivered-To: freebsd-current@freebsd.org
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 8186816A492;
	Fri, 23 Jun 2006 19:20:50 +0000 (UTC)
	(envelope-from dmitry@atlantis.dp.ua)
Received: from postman.atlantis.dp.ua (postman.atlantis.dp.ua [193.108.47.1])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 0BF6743D82;
	Fri, 23 Jun 2006 19:20:48 +0000 (GMT)
	(envelope-from dmitry@atlantis.dp.ua)
Received: from smtp.atlantis.dp.ua (smtp.atlantis.dp.ua [193.108.46.231])
	by postman.atlantis.dp.ua (8.13.1/8.13.1) with ESMTP id k5NJKi2q063958; 
	Fri, 23 Jun 2006 22:20:44 +0300 (EEST)
	(envelope-from dmitry@atlantis.dp.ua)
Date: Fri, 23 Jun 2006 22:20:44 +0300 (EEST)
From: Dmitry Pryanishnikov <dmitry@atlantis.dp.ua>
To: freebsd-current@freebsd.org
In-Reply-To: <200606231546.k5NFklED021340@lurza.secnetix.de>
Message-ID: <20060623221142.C68891@atlantis.atlantis.dp.ua>
References: <200606231546.k5NFklED021340@lurza.secnetix.de>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
Cc: pjd@freebsd.org
Subject: Re: Journaling UFS with gjournal.
X-BeenThere: freebsd-current@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Discussions about the use of FreeBSD-current
	<freebsd-current.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-current>, 
	<mailto:freebsd-current-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-current>
List-Post: <mailto:freebsd-current@freebsd.org>
List-Help: <mailto:freebsd-current-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-current>,
	<mailto:freebsd-current-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 23 Jun 2006 19:20:50 -0000


Hello!

On Fri, 23 Jun 2006, Oliver Fromme wrote:
> > If your existing file system needs its last sector, then it wont work. If it
> > does not need it, then it might work (although fsck does not check for a
> > raw-device shrinkage - I think)...
>
> It has no way to check it.  If the last sector of the
> partition happens to be part of file data, overwriting
> it with gjournal meta data will lead to a corrupted
> file, and fsck(8) has no way to notice that, of course.

  It seems to me that badsect(8) is the way to go. Just try to declare the last
sector as bad. fsck then (after marking and unmounting) will tell you whether
this sector is used in another file (if so, you could just copy relevant data
and delete the file while keeping just created BAD/nnnnn file covering the
last sector). badsect+fsck will do all consistency checks for you.

Sincerely, Dmitry
-- 
Atlantis ISP, System Administrator
e-mail:  dmitry@atlantis.dp.ua
nic-hdl: LYNX-RIPE