Finding out how a file system was created


Part of being an SA involves creating new file systems as databases and applications expand. The creation process usually requires a bit of detective work, since block sizes, inodes, journal size, and a variety of other file system attributes can boost or hamper performance. Whenever I take over control of a new server, I like to run mkfs with the “-m”( show how a file system was created) option against all of the existing file systems:

$ /usr/sbin/mkfs -F vxfs -m /dev/vx/rdsk/oradg/oravol01
mkfs -F vxfs -o bsize=8192,version=6,inosize=256,logsize=2048,largefiles /dev/vx/rdsk/oradg/oravol01 20971584

$ /usr/sbin/mkfs -F ufs -m /dev/dsk/c0t0d0s0
mkfs -F ufs -o nsect=255,ntrack=16,bsize=8192,fragsize=1024,cgsize=26,free=1, rps=90,nbpi=8154,opt=t,apc=0,gap=0,nrpos=8,maxcontig=16, mtb=n /dev/dsk/c0t0d0s0 193245120

The “-m” option will print the options passed to mkfs at file system creation time. This information can be invaluable for reverse engineering why something was created (or changed) with a specific option. I am not sure if this option is available on other Operating Systems, but Solaris definitely supports it.

This article was posted by Matty on 2005-07-12 21:45:00 -0400 -0400