newfs/mkfs have a mind of their own

From: James Noyes (jnoyes-sml@retrogeeks.com)
Date: Thu Nov 18 2004 - 22:23:09 EST


Fellow SunManagers:

  I'm trying to set up some new storage with newfs/mkfs. These are large
disks and will have very small numbers of large files (SAN LUNS with database
files on them).
Suggestions from a tuning whitepaper indicate that I can increase the bytes
per inode if the average filesize is going to be very large. Ok, so I bump
that up from the 8K default to half a meg. The same paper suggests the number
of cylinders/group can be increased as well to give more usable space. They
recommend just going with the maximum, which mkfs happily indicates is 220:

 # newfs -i 524288 -c 400 -m 2 /dev/dsk/vpath4a
 newfs: construct a new file system /dev/rdsk/vpath4a: (y/n)? y
 mkfs: bad value for cgsize: 400 must be between 1 and 220
 mkfs: cgsize reset to default 16

Ok, fine. 220 works for me.

 # newfs -i 524288 -c 220 -m 2 /dev/dsk/vpath4a
 newfs: construct a new file system /dev/rdsk/vpath4a: (y/n)? y
 /dev/rdsk/vpath4a: 97615872 sectors in 5958 cylinders of 64 tracks, 256 sectors
         47664.0MB in 852 cyl groups (7 c/g, 56.00MB/g, 128 i/g)

Guess not - 7 doesn't look like 220 to me.
Maybe if I call mkfs directly?

 # mkfs -F ufs /dev/rdsk/vpath4a 97615872 256 64 8192 1024 220 1 120 \
   524288 s 0 -1 8 16
 /dev/rdsk/vpath4a: 97615872 sectors in 5958 cylinders of 64 tracks, 256 sectors
        47664.0MB in 852 cyl groups (7 c/g, 56.00MB/g, 128 i/g)

Nope. 7 still isn't 220.
Let's try something more reasonable, like the alleged default of 16.

 # mkfs -F ufs /dev/rdsk/vpath4a 97615872 256 64 8192 1024 16 1 120 \
   524288 s 0 -1 8 16
 /dev/rdsk/vpath4a: 97615872 sectors in 5958 cylinders of 64 tracks, 256 sectors
        47664.0MB in 852 cyl groups (7 c/g, 56.00MB/g, 128 i/g)

I give up. What am I doing wrong? Why does newfs/mkfs insist on making the
cylinder groups not only WAY smaller than I asked for, but well below the
alleged "default" of 16 as well? Is one of the other parameters getting in
the way? If I try to influence ONLY the c/g parameter, it gets even worse:

 # newfs -c 200 vpath4a
 newfs: construct a new file system /dev/rdsk/vpath4a: (y/n)? y
 /dev/rdsk/vpath4a: 97615872 sectors in 5958 cylinders of 64 tracks, 256 sectors
        47664.0MB in 993 cyl groups (6 c/g, 48.00MB/g, 5824 i/g)

I'm looking for any suggestions. I'd like to maximize the space available
here, performance is a secondary issue. Average file size for these
filesystems will be around 1 Gigabyte, and there will likely be no more than
40 or 50 of these files in any one filesystem. How do I beat newfs/mkfs into
submission?

Will summarize.

James Noyes
(jnoyes-sml@retrogeeks.com)
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:29:44 EDT