From owner-freebsd-current@FreeBSD.ORG Wed May 19 10:38:11 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 F07D0106567E for ; Wed, 19 May 2010 10:38:10 +0000 (UTC) (envelope-from matt.thyer@gmail.com) Received: from mail-px0-f182.google.com (mail-px0-f182.google.com [209.85.212.182]) by mx1.freebsd.org (Postfix) with ESMTP id C27C38FC21 for ; Wed, 19 May 2010 10:38:10 +0000 (UTC) Received: by pxi7 with SMTP id 7so2393441pxi.13 for ; Wed, 19 May 2010 03:38:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=sUrwkOkoCXN+XJkCVnHv44jm5kmfVxxdqB+AMHEkSLM=; b=rkE2n1mq2aNVFIaQhxhyLLHXQ7yeQE5i6GmrkPZQdlpip/Y0BAtf3OMrwPBCF0lJUe 5kXvA7sAGCg5kv0gdqjAenrjyEZYqLgG9Do2fwqBxZul4YpCZtfzErCn0H67E2RQcE/4 isZQsgc8WIJWkucaQ/GU9GnRsy0vMX3I7Oz+k= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=YcnbvlrVh9Pg8Rxa/Tcc54lIy+1sNb1HF//V4kJ+7V66OdawAevrVRHvgpw7yLsWqW r4WEe7NQv46pjfbP73Fwrd81MjwAVU7OOjNAS5ZnDmQuu/PoKwZpBcq3L3dR07TOIhzL oVJo1W6ueM2RfKzzRCN0ZVaTvBKcrqClfpWkw= MIME-Version: 1.0 Received: by 10.141.139.21 with SMTP id r21mr6270660rvn.2.1274265490242; Wed, 19 May 2010 03:38:10 -0700 (PDT) Received: by 10.141.41.14 with HTTP; Wed, 19 May 2010 03:38:10 -0700 (PDT) In-Reply-To: <20100517140207.GZ92942@cicely7.cicely.de> References: <3a142e751003291708nc3e110bjca1789cc807f61a2@mail.gmail.com> <20100512014651.GN73283@cicely7.cicely.de> <20100517140207.GZ92942@cicely7.cicely.de> Date: Wed, 19 May 2010 20:08:10 +0930 Message-ID: From: Matt Thyer To: ticso@cicely.de Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-current@freebsd.org Subject: Re: fsck unable to read disk sectors X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2010 10:38:11 -0000 It wouldn't be the BSD way to try to stop the user shooting themselves in the foot. And I agree too as it wouldn't be right for glabel to try to keep track of all possible uses for a volume and know whether each is present. That would be a typical Linux type solution. However, would it be too much for glabel to just know about UFS and tell the user to use tunefs instead if there appears to be a UFS filesystem present ? On 17 May 2010 23:32, Bernd Walter wrote: > 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. >