[comp.sys.sun] Inode density problem

bret@uunet.uu.net (Bret Orsburn) (06/05/91)

I'm having trouble achieving an acceptable inode density on a 1GB+
external SCSI disk drive. The system is a 3/80 running SunOS 4.0.3.

Here are the facts as I understand them:

The OS has a compiled-in maximum number of inodes per cylinder group,
called MAXIPG. This is given in <ufs/fs.h> as 2048.

The disk drive is a Fujitsu M2266 with 15 heads and 46,635[*] bytes per track.
15 * 46,635 = 699,525 bytes per cylinder. The default number of cylinders
per group is 16, which gives 16 * 699,525 = 11,192,400 bytes per group.

11,192,400/MAXIPG = (approx.) 5465, so the default inode density comes out
to around one inode per 5465 bytes. That is OK for some things, but is
unacceptable for our news partition.

The documentation leads me to believe that the correct thing to do is to
change the number of cylinders per cylinder group. The man page for mkfs
says this parameter (ncpg) must be in the range 1-32. When I try to specify
ncpg to be 8, mkfs quits with an error message to the effect that ncpg must
be a multiple of 16! (I have tried to change this parameter through newfs
and directly through mkfs, with the same result.)

So: am I confused or is this a mkfs bug?

What should I do to increase my inode density?

Any ( well, most :-) suggestions appreciated.


    bret@codonics.com
    uunet!codonics!bret
    Bret Orsburn


[*] The number of bytes per track given may not be precisely correct,
    but it is close enough for the purposes of this exposition.

jms@tardis.tymnet.com (Joe Smith) (06/28/91)

In article <3434@brchh104.bnr.ca> you write:
>I'm having trouble achieving an acceptable inode density on a 1GB+
>external SCSI disk drive. The system is a 3/80 running SunOS 4.0.3.
>The OS has a compiled-in maximum number of inodes per cylinder group,
>called MAXIPG. This is given in <ufs/fs.h> as 2048.

One of the major differences between 4.0.3 and 4.1.1 is the solution
to this very problem.  If you can't upgrade to SunOS-4.1.1, there is
a way around it, by lying to the formatter.

Create an entry in /etc/format.dat such that 'ncyl' is 2 or 3 times the
real value, and the product of nhead * nsect is 1/2 or 1/3 the real value.
Then 'mkfs' will create more cylinder groups, with a reasonable number
of inodes per group.

>    bret@codonics.com
>    uunet!codonics!bret
>    Bret Orsburn


-- 
Joe Smith (408)922-6220 | SMTP: jms@tardis.tymnet.com or jms@gemini.tymnet.com
BT Tymnet Tech Services | UUCP: ...!{ames,pyramid}!oliveb!tymix!tardis!jms
PO Box 49019, MS-C51    | BIX: smithjoe | CA license plate: "POPJ P," (PDP-10)
San Jose, CA 95161-9019 | humorous disclaimer: "My Amiga 3000 speaks for me."