From owner-freebsd-current Wed Sep 2 03:17:25 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id DAA27044 for freebsd-current-outgoing; Wed, 2 Sep 1998 03:17:25 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from uni-sb.de (uni-sb.de [134.96.252.33]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id DAA27038 for ; Wed, 2 Sep 1998 03:17:22 -0700 (PDT) (envelope-from rock@wurzelausix.CS.Uni-SB.DE) Received: from cs.uni-sb.de (cs.uni-sb.de [134.96.252.31]) by uni-sb.de (8.9.0/1998052000) with ESMTP id MAA03789; Wed, 2 Sep 1998 12:16:18 +0200 (CEST) Received: from wurzelausix.cs.uni-sb.de (9J+7cSn3+vmFDQeRYaeKHDsHi2d3THhd@wurzelausix.cs.uni-sb.de [134.96.247.1]) by cs.uni-sb.de (8.9.0/1998060300) with ESMTP id MAA25135; Wed, 2 Sep 1998 12:16:18 +0200 (CEST) Received: (from rock@localhost) by wurzelausix.cs.uni-sb.de (8.9.1/wjp/19980821) id MAA16571; Wed, 2 Sep 1998 12:16:16 +0200 (CEST) Date: Wed, 2 Sep 1998 12:16:16 +0200 (CEST) From: "D. Rock" Message-Id: <199809021016.MAA16571@wurzelausix.cs.uni-sb.de> To: tlambert@primenet.com Cc: current@FreeBSD.ORG Subject: Re: What the fsck is going on here (disk space vanishing)? Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG >> Recently, after a kernel panic the system behaves extremely strange: >> Every time I reboot the machine, I *have* to fsck the / device (I >> prefer the one / fits all approach), or any write access will result >> to either "out of inodes" or "no space left on device" errors. >> Each fsck will change the superblock (FREE BLK COUNT(S) WRONG IN >> SUPERBLK). df -ki shows up even before the fsck plenty of inodes and >> blocks left. This error only happens on the 1st drive in the system >> (Seagate ST32122A), another one attached doesn't show up this >> symptom. The partition table is OK (dangerous dedicated on both >> drives, LBA mode set in the BIOS; fdisk/BIOS/in core disklabel agree). >> I use flags 0x80ff for both drives (32-bit multiple (16) sector mode). >> shutdown of the system seems to write all dirty blocks ("5 3 2 done") > >This is generally attributable to IDE. > >To see if your problem is real or imaginary, after fsck'ing the >drive once (while mounted read-only), do it again. > >If you get the same thing (i.e., a drive doesn't stay fsck'ed >when it should), then this is your problem. No, only the 1st fsck shows up this error. (Today the error isn't 100% reproducible. I was able to get some reboots without the fs errors) > > >To resolve this problem, use as short an IDE cable as you possibly can; >IDE is particularly sensitive to electrical interference, and requires >short cables in the standard for this reason. Tried it all: The IDE cable is no longer than 20-30 cm. I even disabled 32 bit mode and multiple sector mode for the wdc driver (flags 0), disabled UDMA support and set PIO mode 0 in the BIOS (performance is now down to 2.2 MB/s). Still the same errors. (It's a standard P-II LX board, nothing special, the other drive, running at PIO mode 3 on a much longer cable, doesn't show up this behaviour) >Since EIDE is just IDE rehashed and given a facelift, this >applies to EIDE as well. > > >Note that you may actually be doing bad things to your disk contents >with each fsck; it depends on just how noisy things are. Your best >bet would be to get a shorer cable, back it up *now*, and then after >reinstalling, restore from backup. What really wonders me that only the superblock seems to get hosed. I did several "make world" before and didn't get any errors. I suspect something really weird happens during the shutdown process, but I don't know what. The superblock seems to get written to disk, otherwise the fs state wouldn't be clean. Where does df (or fsstat) get the number of free blocks/inodes (df shows plenty of them) and where does the ffs allocator get them. - fsck *only* tells me "SUMMARY INFORMATION BAD", nothing more, nothing less. - df -ki shows plenty of free blocks/inodes - If I delete files/blocks on the disk I am able to fill them again up, e.g. if I delete 10 files, I am able to recreate 10 files, if I truncate a file I am able to lengthen it again. Modifying files (without changing the length of them) also works as expected. I will now try to disable any APM modes in the BIOS and kernel and test again. Daniel To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message