jerry@oliveb.UUCP (Jerry F Aguirre) (09/08/87)
Index: etc/newfs.c 4.3BSD Description: The newfs(8) command claims to create by default 1 inode for every 2048 bytes of data. If the drive has a large number of sectors/cylinder (like the Fujitsu eagle 2351 or 2361) then the actual number of inodes is less than that. This is because in <sys/fs.h> the constant "MAXIPG" limits the maximum number of inodes/group to 2048. With the default 16 cylinders/group an eagle has 48x20x16=15360 sectors in a cylinder group. In practice this works out to 3700 bytes per inode. On a 2361 eagle it is 64x20x16=20480 sectors/group resulting in 4800 bytes per inode. Specifying a smaller bytes/inode to newfs or mkfs will not alter the result as the "MAXIPG" is a hard limit on the resulting value. Repeat-By: If you don't trust the above calculations then do a newfs on an eagle or other drive with more than ~600 sectors/cylinder. Then calculate the number of bytes/inodes. Fix: Temporarily use the -c options to specify a smaller cylinder group size. For an eagle 8 is OK. A more permanent fix would be to have newfs calculate the default cylinder group size based on the number of sectors/cylinder, the specified bytes/inode, and the "MAXIPG" value. Newfs (or mkfs) should generate a warning message if the user specifies a cylinder grouping that limits the bytes/inode value.
matt@oddjob.UChicago.EDU (Matt Crawford) (09/09/87)
Holy bitmap, batman! No wonder /usr/spool kept running out of inodes on my 2361's (under sunos 3.3). I have 4982 bytes per inode! Matt