Large BSD File System, Few Inodes
Chris Torek
chris at mimsy.umd.edu
Thu Nov 9 20:14:48 AEST 1989
In article <1794 at naucse.UUCP> root at naucse.UUCP (Paul Balyoz) writes:
>* Isn't there any way to avoid wasting a large amount of space
> due to unused inodes, for situations like this?
Not really, since you have Ultrix.
>* Why can't I increase the cylinder group size beyond 32 cyls?
You (thanks to Ultrix being well behind `real' BSD) have the crufty old
( :-) ) FFS code. If you look at <ufs/fs.h>, you fill find a `struct cg'
containing the fields
long cg_btot[32]; /* block totals per cylinder */
short cg_b[32][8]; /* positions of free blocks */
These fields are done differently in the new (4.3-tahoe) FSS, allowing
more than 32 cylinders per group. (However, other restrictions may
apply.)
>* Why can't Berkeley FFS's allocate a partial block as an inode-
> block, like maybe a fragment, or series of fragments?
> (why only whole blocks at a time?)
Largely for simplicity. At any rate, inodes are 128 bytes long, and
you could have only one such block per cg, for 64 inodes per cg.
>* Why can't some cylinder groups be allowed to have zero
> inode-blocks in them?
Again, for simplicity. The number of inodes in each cylinder group
is always the same. (The number of blocks in each cg allocated to
inodes is fixed at fs->fs_dblkno - fs->fs_iblkno.)
>* If the last two questions above are impossible to answer, then
> wouldn't they make nice enhancements to Berkeley's FFS?
You would have to come up with some place to store the number of inode
blocks on each block. Putting inodes in fragments would be even
harder. It is simply not worth it. With the new FSS code, I can build
a file system on a 700 MB disk (a CDC 9771) that has 64 i/g and 77 c/g,
giving 14 cyl groups and a total of 112 kbytes of inode space. This is
less than .02%.
% newfs -N -i 999999 -b 8192 -f 1024 -c 90 /dev/rra2c
Block size restricts cylinders per group to 77.
% newfs -N -i 999999 -b 8192 -f 1024 -c 77 /dev/rra2c
Warning: 1312 sector(s) in last cylinder unallocated
/dev/rra2c: 1357232 sectors in 1023 cylinders of 16 tracks, 83 sectors
694.9MB in 14 cyl groups (77 c/g, 52.36MB/g, 64 i/g)
super-block backups (for fsck -b #) at:
32, 102384, 204736, 307088, 409440, 511792, 614144, 716496, 818848,
921200, 1023552, 1125904, 1228256, 1330608,
12.7u 0.2s 0:13 96% 39+55k 4+2io 3pf+0w
%
--
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain: chris at cs.umd.edu Path: uunet!mimsy!chris
More information about the Comp.unix.wizards
mailing list