Subject: Re: Interesting disk/filesystem anomaly addendum
To: Bri <itai@replic.net>
From: Luke Mewburn <lukem@wasabisystems.com>
List: port-i386
Date: 12/27/2001 21:42:36
On Thu, Dec 27, 2001 at 12:44:30AM -0800, Bri wrote:
  | dumpfs returns
  | 
  | endian  little-endian
  | magic   11954   time    Thu Dec 27 00:27:18 2001
  | cylgrp  dynamic inodes  4.4BSD  fslevel 3       softdep enabled
  | nbfree  2672921 ndir    87      nifree  24031062        nffree  954
  | ncg     12114   ncyl    193821  size    97685784        blocks  94487482
  | bsize   8192    shift   13      mask    0xffffe000
  | fsize   1024    shift   10      mask    0xfffffc00
  | frag    8       shift   3       fsbtodb 1
  | cpg     16      bpg     1008    fpg     8064    ipg     1984
  | minfree 5%      optim   time    maxcontig 8     maxbpg  2048
  | rotdelay 0ms    headswitch 0us  trackseek 0us   rps     120
  | ntrak   16      nsect   63      npsect  63      spc     1008
  | symlinklen 60   trackskew 0     interleave 1    contigsumsize 8
  | maxfilesize 0x0000400801017fff
  | nindir  2048    inopb   64      nspf    2
  | sblkno  16      cblkno  24      iblkno  32      dblkno  280
  | sbsize  2048    cgsize  2048    offset  32      mask    0xfffffff0
  | csaddr  280     cssize  194560  shift   9       mask    0xfffffe00
  | cgrotor 9301    fmod    0       ronly   0       clean   0x02
  | 
  | and then a bunch of stuff relating to cylinders and clusters. I can
  | include that as well if you like, but I'm guessing it is going to be
  | prohibitively large(I did not let it finish.)

That system has a *lot* of cylinder groups (12114) and a *lot* of
cylinders (193821), and is most likely triggering the afore-mentioned
pathological behaviour.


  |  I'll give current a shot, but I prefer to avoid it for this box, as any
  | issues that it has are a large inconvenience.

You could run the latest NetBSD-1.5 branch code instead of -current,
which is currently known as "1.5.3_ALPHA" and should eventually be
released as NetBSD 1.5.3.  I've successfully run a 1.5.3_ALPHA kernel
on a 1.5.2 userland (and then updated some stuff like fsck_ffs, newfs,
dumpfs, dump, and other ffs related tools) with minimal impact.
You can access that code in AnonCVS as the "netbsd-1-5" branch tag, or
under
	ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-release-1-5/


If possible, try and format the partition with a lot less cylinder
groups, by trying larger values for the "-c" option on newfs (e.g.,
"-c 256").  If you intend to store large files, you could increase the
number of bytes per inode from 4K to something like 16K or 32K with
"-i 16384".  For a file system that large it might also help to
increase the block & fragment size from 8K/1K to 16K/2K with
"-b 16384 -f 2048".  Finally, if you are considering upgrading to a
1.5.3_ALPHA or -current kernel, wait until after then before
reformatting your partition, and use an up-to-date newfs to do it.

Luke.