From owner-freebsd-geom@FreeBSD.ORG Wed Apr 13 11:59:02 2011 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28C0F1065672 for ; Wed, 13 Apr 2011 11:59:02 +0000 (UTC) (envelope-from gcubfg-freebsd-geom@m.gmane.org) Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by mx1.freebsd.org (Postfix) with ESMTP id D2B0C8FC17 for ; Wed, 13 Apr 2011 11:59:01 +0000 (UTC) Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Q9yUH-0006Oi-Ai for freebsd-geom@freebsd.org; Wed, 13 Apr 2011 13:43:57 +0200 Received: from lara.cc.fer.hr ([161.53.72.113]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 13 Apr 2011 13:43:57 +0200 Received: from ivoras by lara.cc.fer.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 13 Apr 2011 13:43:57 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-geom@freebsd.org From: Ivan Voras Date: Wed, 13 Apr 2011 13:43:43 +0200 Lines: 30 Message-ID: References: <20110412213312.GA56078@freebsd.org> <4DA4C8A4.30900@FreeBSD.org> <20110412224741.GA65548@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: lara.cc.fer.hr User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.12) Gecko/20101102 Thunderbird/3.1.6 In-Reply-To: <20110412224741.GA65548@freebsd.org> X-Enigmail-Version: 1.1.2 Subject: Re: partition not accessible via UFS label (/dev/ufs/*) 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: Wed, 13 Apr 2011 11:59:02 -0000 On 13/04/2011 00:47, Alexander Best wrote: > thank you very much. when i posted this issue a few weeks ago i was defenately > hitting a bug in geom, because the ufs label wouldn't even show up in single- > user mode with / mounted ro. the problem occured after i booted ubuntu from a > dvd and was then getting a corrupted gpt entry. i used 'gpart recover' which > then showed up some extra space available. after doing 'gpart resize', mounting > /dev/ufs/rootf did no longer work and i had to switch to mounting /dev/ada0p3. This also happens when using growfs(8) or anything which can make the size of the file system not equal the size of the media (geom) on which it is located. This is a side-effect of checking for file system corruption, I'm not sure that removing the check would be a good thing to do. 84 /* Check for magic and make sure things are the right size */ 85 if (fs->fs_magic == FS_UFS1_MAGIC && fs->fs_fsize > 0 && 86 pp->mediasize / fs->fs_fsize == fs->fs_old_size) { 87 /* Valid UFS1. */ 88 } else if (fs->fs_magic == FS_UFS2_MAGIC && fs->fs_fsize > 0 && 89 pp->mediasize / fs->fs_fsize == fs->fs_size) { 90 /* Valid UFS2. */ 91 } else { 92 g_free(fs); 93 continue; 94 }