From owner-freebsd-current@FreeBSD.ORG Mon Jun 14 19:03:31 2004 Return-Path: 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 7B3E416A4CE for ; Mon, 14 Jun 2004 19:03:31 +0000 (GMT) Received: from mail.sandvine.com (sandvine.com [199.243.201.138]) by mx1.FreeBSD.org (Postfix) with ESMTP id B7B1843D1F for ; Mon, 14 Jun 2004 19:03:30 +0000 (GMT) (envelope-from ahoff@sandvine.com) Received: by mail.sandvine.com with Internet Mail Service (5.5.2657.72) id ; Mon, 14 Jun 2004 15:03:06 -0400 Message-ID: From: Alex Hoff To: "'freebsd-current@freebsd.org'" Date: Mon, 14 Jun 2004 15:03:05 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2657.72) Content-Type: text/plain; charset="iso-8859-1" Subject: RE: More growfs & Inode problems X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 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: Mon, 14 Jun 2004 19:03:31 -0000 I have an update on my problem, hopefully this time, someone can provide some feedback. So I have traced my problem to this block of code in growfs.c, function ginode if (startinum == 0 || inumber < startinum || inumber >= startinum + INOPB(&sblock)) { inoblk = fsbtodb(&sblock, ino_to_fsba(&sblock, inumber)); rdfs(inoblk, (size_t)sblock.fs_bsize, inobuf, fsi); startinum = (inumber / INOPB(&sblock)) * INOPB(&sblock); } Apprently, the inoblk that is coming off the disk is not correct. I was wondering if anyone knew of a problem with growfs and reading back the inode block? All the values are totally skewed, leaving me to believe that it is somehow being read incorrectly. Also, could anyone explain as to how the inode blocks are setup on each cylinder so I can verify the math being used to read the values back? Thanks. -----Original Message----- From: Alex Hoff Sent: Friday, June 11, 2004 4:14 PM To: 'freebsd-current@freebsd.org' Subject: More growfs & Inode problems Previously I posted an error that growfs was having problems with ginode. Well I have tried to reproduce that, but now its getting stuck before it reaches the "1" inode. Right now I am getting this error from growfs (with debug info turned on) fsck -b ....... Calling updcsloc... ~ oscg read ~ frag_adjust [7]+=-1 ~ frag_adjust [[7]]+=-1 ~ frag_adjust [7]+=1 ~ frag_adjust [[7]]+=1 ~ scg block check loop d=1696 ~ seek range: dl=40, du=1680, dm=103480 ~ range cont: csmin=1680, csmax=1704 ~ scg (212->0) block relocated ~ scg doing cg (0) .... ~ scg checking inode (12847 in 0) ~ ~~scg direct blocks checked growfs: rdfs: read error: 1031614724: Input/output error now I stopped growfs with gdb at this point and examined this inode. No surprise that it was severely corrupt. 6 = {di_mode = 19796, di_nlink = 19536, di_uid = 1380012127, di_gid = 1279347028, di_blksize = 1146244959, di_size = 7287679819702096453, di_blocks = 7310479134913291374, di_atime = 4332574392055525485, di_mtime = 4710519415481920611, di_ctime = 7955901479799188588, di_birthtime = 8029744551905093996, di_mtimensec = 1886330988, di_atimensec = 1952543333, di_ctimensec = 1027437167, di_birthnsec = 1852793640, di_gen = 1679848563, di_kernflags = 1735746149, di_flags = 1819042143, di_extsize = 1597793135, di_extb = { 3181298783575895105, 2314885530818453514}, di_db = {2314885530818453536, 2314885530818453536, 7306000180026699619, 8028911401162995042, 7165064744378776675, 2314861732405257790, 8367809545530271090, 723528173046035826, 6854591218520058147, 5644495083095216991, 5572183428906439747, 5283938703287209040}, di_ib = {5928219604812778561, 8386103211268076554, 8319100054832685157}, di_spare = { 4495559364509261600, 2334393380931266826, 7309464380271193954}} block numbers in the gazillions (??) are definatley not right. This is the syntax I use to reproduce the problem (with 100% consistency) # newfs -s 426630180 aacd1s1a # fsck aacd1s1a ** /dev/aacd1s1a ** Last Mounted on ** Phase 1 - Check Blocks and Sizes ** Phase 2 - Check Pathnames ** Phase 3 - Check Connectivity ** Phase 4 - Check Reference Counts ** Phase 5 - Check Cyl groups 2 files, 2 used, 103300854 free (22 frags, 12912604 blocks, 0.0% fragmentation) # growfs -y -s 1126630180 aacd1s1a (the error show above) And just for more info # fdisk aacd1s1 ******* Working on device /dev/aacd1s1 ******* parameters extracted from in-core disklabel are: cylinders=231972 heads=255 sectors/track=63 (16065 blks/cyl) Figures below won't work with BIOS for partitions not in cyl 1 parameters to be used for BIOS calculations are: cylinders=231972 heads=255 sectors/track=63 (16065 blks/cyl) Media sector size is 512 Warning: BIOS sector numbering starts with sector 1 Information from DOS bootblock is: The data for partition 1 is: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) start 0, size 3726630180 (1819643 Meg), flag 0 beg: cyl 0/ head 0/ sector 1; end: cyl 547/ head 254/ sector 63 newfs -s 426630180 aacd1s1a growfs -y -s 1126630180 aacd1s1a (I use smaller numbers for growfs and newfs since growfs is painfully slow) So my questions are, where could this inode be getting corrupted from? Would it be the growfs? (which I doubt since it is only trying to do reads at this point (IIRC)) is there a bug in newfs maybe? Any ideas or input would be great. Thanks. Alex Hoff