From owner-freebsd-questions@FreeBSD.ORG Thu Aug 21 15:15:12 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8A41C1065684 for ; Thu, 21 Aug 2008 15:15:12 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx01.qsc.de (mx01.qsc.de [213.148.129.14]) by mx1.freebsd.org (Postfix) with ESMTP id 0F60C8FC29 for ; Thu, 21 Aug 2008 15:15:11 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r55.edvax.de (port-92-195-21-170.dynamic.qsc.de [92.195.21.170]) by mx01.qsc.de (Postfix) with ESMTP id 5ECAF50826 for ; Thu, 21 Aug 2008 17:15:09 +0200 (CEST) Received: from r55.edvax.de (localhost [127.0.0.1]) by r55.edvax.de (8.14.2/8.14.2) with SMTP id m7LFF9jp001653 for ; Thu, 21 Aug 2008 17:15:09 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Thu, 21 Aug 2008 17:15:09 +0200 From: Polytropon To: "freebsd-questions@freebsd.org" Message-Id: <20080821171509.5974eda9.freebsd@edvax.de> Organization: EDVAX X-Mailer: Sylpheed 2.4.7 (GTK+ 2.12.1; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Again: fsck_ffs memory requirements X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Polytropon List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2008 15:15:12 -0000 Hi again! I had problems running fsck_ffs of FreeBSD 5. In my particular problem, version 5 seemed to help me more than version 7, which stopped with this: fsck_ffs: bad inode number 306176 to nextinode Version 5 didn't seem to have this problem, but it did complain: fsck_ffs: cannot alloc 1073796864 bytes for inoinfo So I asked for help and was adviced to enable swap space before running fsck_ffs in SUM. My main problem seemed to be that I hadn't enough RAM (512 + 256 MB SRD-SDRAM), exactly 1 GB seemed to be required. In the recovery setting, ad0 is a FreeBSD 5 installation and ad2 is a FreeBSD 7 installation with a /home partition holding a dd image of the defective partition (which's original is on a harddisk on the shelf for security reasons). I did the following after successful system startup in SUM: # swapon /dev/ad2s1b # swapctl -l Device: 1024-blocks Used: /dev/ad2s1b 2097152 0 # mount /dev/ad2s1g /mnt # mdconfig -a -u 0 -t vnode -f /mnt/poly/rescue/ad1s1f.dd # fsck_ffs -yf /dev/md0 ** /dev/md0 ** Last Mounted on ** Phase 1 - Check Blocks and Sizes 1035979 BAD I=259127 UNEXPECTED SOFT UPDATE INCONSISTENCY [...] 9187201950452580480 BAD I=262821 UNEXPECTED SOFT UPDATE INCONSISTENCY 9114861777597661055 BAD I=262821 UNEXPECTED SOFT UPDATE INCONSISTENCY EXCESSIVE BAD BLKS I=262821 CONTINUE? yes 1779904 DUP I=262822 UNEXPECTED SOFT UPDATE INCONSISTENCY 1779905 DUP I=262822 UNEXPECTED SOFT UPDATE INCONSISTENCY [...] 4007775 DUP I=262845 UNEXPECTED SOFT UPDATE INCONSISTENCY fsck_ffs: cannot alloc 1073796864 bytes for inoinfo # So I examined /usr/src/sbin/fsck_ffs/pass1.c and found out that a calloc() call caused the error; 1 GB was needed, but 2 GB were present in swap. Not enough? Any suggestions what I could do to help fsck_ffs calloc()ing the needed memory? -- Polytropon >From Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...