From owner-freebsd-current@FreeBSD.ORG Sun Nov 6 14:49:24 2005 Return-Path: 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 9DB5816A41F for ; Sun, 6 Nov 2005 14:49:24 +0000 (GMT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (comp.chem.msu.su [158.250.32.97]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7CA0343D6D for ; Sun, 6 Nov 2005 14:49:20 +0000 (GMT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (localhost [127.0.0.1]) by comp.chem.msu.su (8.13.3/8.13.3) with ESMTP id jA6EnILX090753; Sun, 6 Nov 2005 17:49:18 +0300 (MSK) (envelope-from yar@comp.chem.msu.su) Received: (from yar@localhost) by comp.chem.msu.su (8.13.3/8.13.3/Submit) id jA6EnI3t090752; Sun, 6 Nov 2005 17:49:18 +0300 (MSK) (envelope-from yar) Date: Sun, 6 Nov 2005 17:49:17 +0300 From: Yar Tikhiy To: Taras Savchuk Message-ID: <20051106144917.GA81664@comp.chem.msu.su> References: <84099c3d0511030325q6d1df92ag77310ff1b03a2d15@mail.gmail.com> <84099c3d0511030425q3592a288he254cb5f97f976b6@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <84099c3d0511030425q3592a288he254cb5f97f976b6@mail.gmail.com> User-Agent: Mutt/1.5.9i Cc: freebsd-current@freebsd.org Subject: Re: May be a bug in fsck [ after super block crash on 5.4-STABLE ] 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: Sun, 06 Nov 2005 14:49:24 -0000 On Thu, Nov 03, 2005 at 03:25:28PM +0300, Taras Savchuk wrote: > On 11/3/05, Taras Savchuk wrote: > > > > My SATA HDD with UFS2 crashed. While checking HDD fsck said, that > > alternate super block at block 32 is not present. In 'man fsck' I saw, that > > in UFS2 (my file system) alternate super block is usually located in block > > 160 (For UFS1 - in 32). So the question is: why fsck trying to find > > alternate superblock in wrong block for UFS2? I can suppose, that fsck dont > > know file system type (UFS1 or UFS2) while checking, but such assumption > > seems to be wrong. > > PS: With '-b 160' option fsck done work well. Isn't the type, UFS1 or UFS2, indicated by a magic number in the superblock itself? I used to believe so. If it's true, fsck cannot know the FS type prior to locating a superblock copy. OTOH, with UFS2 having become popular, fsck might try both locations, 32 and 160. Care to file a PR? -- Yar