From owner-freebsd-fs@FreeBSD.ORG Wed Aug 31 16:24:11 2011 Return-Path: Delivered-To: fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4A4A11065670; Wed, 31 Aug 2011 16:24:11 +0000 (UTC) (envelope-from egrosbein@rdtc.ru) Received: from eg.sd.rdtc.ru (unknown [IPv6:2a03:3100:c:13::5]) by mx1.freebsd.org (Postfix) with ESMTP id 920448FC1A; Wed, 31 Aug 2011 16:24:10 +0000 (UTC) Received: from eg.sd.rdtc.ru (localhost [127.0.0.1]) by eg.sd.rdtc.ru (8.14.5/8.14.5) with ESMTP id p7VGO9gM046130; Wed, 31 Aug 2011 23:24:09 +0700 (NOVST) (envelope-from egrosbein@rdtc.ru) Message-ID: <4E5E6024.3030708@rdtc.ru> Date: Wed, 31 Aug 2011 23:24:04 +0700 From: Eugene Grosbein User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; ru-RU; rv:1.9.2.13) Gecko/20110112 Thunderbird/3.1.7 MIME-Version: 1.0 References: <4E5E46B1.4070408@rdtc.ru> <4E5E5DA7.1010802@rdtc.ru> In-Reply-To: <4E5E5DA7.1010802@rdtc.ru> Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 8bit Cc: stable@freebsd.org, fs@freebsd.org Subject: Re: Unfixable UFS2 corruption X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Aug 2011 16:24:11 -0000 31.08.2011 23:13, Eugene Grosbein пишет: > 31.08.2011 23:02, Adam Vande More пишет: > >> Long story short: my /usr/local UFS2 filesystem somehow got corrupted >> and "fsck -y" in single user mode does not fix it. >> >> Not sure if this helps or not but on rare occasion I've had to run fsck twice consecutively to fix a FS. > > Not this time - fsck does NOT find any problems in this file system. > > Now I think fsck_ffs needs a patch: > > --- sbin/fsck_ffs/dir.c.orig 2011-08-31 22:54:23.000000000 +0700 > +++ sbin/fsck_ffs/dir.c 2011-08-31 22:54:48.000000000 +0700 > @@ -225,7 +225,7 @@ > type = dp->d_type; > if (dp->d_reclen < size || > idesc->id_filesize < size || > - namlen > MAXNAMLEN || > + namlen == 0 || namlen > MAXNAMLEN || > type > 15) > goto bad; > for (cp = dp->d_name, size = 0; size < namlen; size++) > > > Comments? With this patch applied, my FS has finally been fixed by fsck: ** Last Mounted on /usr/local ** Phase 1 - Check Blocks and Sizes ** Phase 2 - Check Pathnames DIRECTORY CORRUPTED I=1531227 OWNER=root MODE=40755 SIZE=4608 MTIME=Aug 30 01:28 2011 DIR=/obj/usr/local/src/secure/lib/libssh SALVAGE? [yn] ** Phase 3 - Check Connectivity ** Phase 4 - Check Reference Counts LINK COUNT FILE I=24 OWNER=root MODE=100644 SIZE=892 MTIME=Sep 17 11:10 2010 COUNT 2 SHOULD BE 1 ADJUST? [yn] ** Phase 5 - Check Cyl groups 459580 files, 7411823 used, 7819495 free (105503 frags, 964249 blocks, 0.7% fragmentation) ***** FILE SYSTEM IS CLEAN ***** ***** FILE SYSTEM WAS MODIFIED ***** Should I fill PR? Eugene Grosbein