From owner-freebsd-questions@FreeBSD.ORG Thu Jan 1 13:25:09 2015 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 309C4590 for ; Thu, 1 Jan 2015 13:25:09 +0000 (UTC) Received: from mx02.qsc.de (mx02.qsc.de [213.148.130.14]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E400464BD7 for ; Thu, 1 Jan 2015 13:25:08 +0000 (UTC) Received: from r56.edvax.de (port-92-195-85-165.dynamic.qsc.de [92.195.85.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx02.qsc.de (Postfix) with ESMTPS id 9514727761; Thu, 1 Jan 2015 14:24:59 +0100 (CET) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id t01DOx54003830; Thu, 1 Jan 2015 14:24:59 +0100 (CET) (envelope-from freebsd@edvax.de) Date: Thu, 1 Jan 2015 14:24:59 +0100 From: Polytropon To: "Thomas Mueller" Subject: Re: repeated fsck_ffs error: update Message-Id: <20150101142459.1f734f19.freebsd@edvax.de> In-Reply-To: <534544.46331.bm@smtp119.sbc.mail.ne1.yahoo.com> References: <534544.46331.bm@smtp119.sbc.mail.ne1.yahoo.com> Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jan 2015 13:25:09 -0000 On Thu, 1 Jan 2015 13:00:18 +0000 (UTC), Thomas Mueller wrote: > When rebooting, file system checks repaired root partition > successfully, but I was unable to mount the desired home partition. This indicates a still existing problem. > My command was > fsck_ffs -y /dev/gpt/Sea1-06 > > I ran it repeatedly (first without -y) and seemed to get partial > fix, was able to mount read-only and rsync to another directory > on another partition. Very good. Could you already verify that the copied data is complete? > Latter part of message that came repeatedly, so there was no point > in running fsck any more: > > CYLINDER GROUP 356: BAD MAGIC NUMBER > REBUILD CYLINDER GROUP? yes > > CYLINDER GROUP 357: BAD MAGIC NUMBER > REBUILD CYLINDER GROUP? yes > > CYLINDER GROUP 358: BAD MAGIC NUMBER > REBUILD CYLINDER GROUP? yes > > CYLINDER GROUP 359: BAD MAGIC NUMBER > REBUILD CYLINDER GROUP? yes > > ** Phase 2 - Check Pathnames > ** Phase 3 - Check Connectivity > ** Phase 4 - Check Reference Counts > UNREF FILE I=3 OWNER=root MODE=100000 > SIZE=67108864 MTIME=Jun 24 04:22 2014 > RECONNECT? yes > > NO lost+found DIRECTORY > CREATE? yes > > CYLINDER GROUP 0: BAD MAGIC NUMBER > REBUILD CYLINDER GROUP? yes > > fsck_ffs: bad inode number 0 to ginode Low inode numbers often correspond to "top-level" entries. No root entry damaged? > Now what is that last line about bad inode number 0 to ginode, > and is there any way around? Judging from /usr/src/sbin/fsck_ffs/inode.c: if (inumber < ROOTINO || inumber > maxino) errx(EEXIT, "bad inode number %d to ginode", inumber); This error indicates a serious problem at the "top-level", as I did assume. Somehow, fsck accesses the inode 0, which as you can see is a problem. > Do I need to reformat and rsync back? This is probably the safest method, as it will make sure the file system is properly constructed. > I can also boot my NetBSD installation from last June > (current, 6.99.44 amd64) and run NetBSD's fsck_ffs from there. > > Even if that really messes up, I still have the rsync copy > to rsync back from. Very good. > Update: I booted the NetBSD installation, ran > fsck_ffs -y /dev/dk5 > got the message that the filesystem was clean, no need to fsck. You can always force a _full_ (!) check, see "man fsck_ffs" for details. Use # fsck_ffs -yf /dev/dk5 or # fsck_ffs -yf /dev/gpt/Sea1-06 for this task. Perform the check in single-user mode, with the partition not being mounted. Performing such a check is never a bad idea. :-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...