From owner-freebsd-current@FreeBSD.ORG Mon May 17 14:02:14 2010 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5F21F1065678 for ; Mon, 17 May 2010 14:02:14 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) by mx1.freebsd.org (Postfix) with ESMTP id A972D8FC13 for ; Mon, 17 May 2010 14:02:12 +0000 (UTC) Received: from mail.cicely.de ([10.1.1.37]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id o4HE2A4o093875 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 17 May 2010 16:02:11 +0200 (CEST) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (cicely7.cicely.de [10.1.1.9]) by mail.cicely.de (8.14.3/8.14.3) with ESMTP id o4HE27B8033122 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 17 May 2010 16:02:07 +0200 (CEST) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (localhost [127.0.0.1]) by cicely7.cicely.de (8.14.2/8.14.2) with ESMTP id o4HE273L014774; Mon, 17 May 2010 16:02:07 +0200 (CEST) (envelope-from ticso@cicely7.cicely.de) Received: (from ticso@localhost) by cicely7.cicely.de (8.14.2/8.14.2/Submit) id o4HE27hs014773; Mon, 17 May 2010 16:02:07 +0200 (CEST) (envelope-from ticso) Date: Mon, 17 May 2010 16:02:07 +0200 From: Bernd Walter To: Matt Thyer Message-ID: <20100517140207.GZ92942@cicely7.cicely.de> References: <3a142e751003291708nc3e110bjca1789cc807f61a2@mail.gmail.com> <20100512014651.GN73283@cicely7.cicely.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD cicely7.cicely.de 7.0-STABLE i386 User-Agent: Mutt/1.5.11 X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED=-1, BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 autolearn=ham version=3.3.0 X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on spamd.cicely.de Cc: freebsd-current@freebsd.org, ticso@cicely.de Subject: Re: fsck unable to read disk sectors X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 May 2010 14:02:14 -0000 On Mon, May 17, 2010 at 10:54:17PM +0930, Matt Thyer wrote: > On 12 May 2010 11:16, Bernd Walter wrote: > > > > On Tue, May 11, 2010 at 10:15:13PM +0200, Alexander Best wrote: > > > i've posted a log here which is pretty self explanatory: > > > > > > http://pastebin.com/tn3NiDDW > > > > > [snip] > > > > > One of the typical problems users have is that they forget that > > adding a label takes one sector, so the labeled device is smaller. > > This is no problem if you create the filesystem on the labeled > > drive, but often enough people add the label after creating the > > filesystem. > > FreeBSD's utilities should be able to detect this situation and either > correct the filesystem size or refuse to apply the label. How can this work? glabel doesn't know anything about volume contents - it just writes a label-sector and offers the remaning storage as a new volume. Result: Refusing is impossible. Changing UFS filesystem size isn't an easy task and the last sector is already lost when filesystem comes into game. Result: Too late. I think the only reasonable thing to be done is that fsck can speak up by checking the volume size with the filesystems size _after_ glabel has overwritten the last sector. -- B.Walter http://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm.