Display file system characteristics

As a seasoned data storage engineer I've dealt with many a file system type across many an operating system. But even to this day I still get a query from sysadmins and engineers alike asking how to determine what type of file system is this disk or partition.

Unlike my other post (Determining a file system type) in this article we look at the characteristics of file systems on Solaris, HPUX, Linux and AIX.


On Solaris systems, we use the fstype utility to view file system characteristics, for example:

# fstyp -v /dev/md/dsk/d101
   magic   11954   format  dynamic time    Mon Jun 01 09:25:13 2009
   sblkno  16      cblkno  24      iblkno  32      dblkno  2408
   sbsize  2048    cgsize  8192    cgoffset 216    cgmask  0xffffffe0
   ncg     10      size    407040  blocks  383103
   bsize   8192    shift   13      mask    0xffffe000
   fsize   1024    shift   10      mask    0xfffffc00
   frag    8       shift   3       fsbtodb 1
   minfree 10%     maxbpg  2048    optim   time
   maxcontig 16    rotdelay 0ms    rps     167

Using df with the -g flag we can Print the entire statvfs structure:

Note: The -g option can only be used on mounted file systems.

# df -g /dev/md/dsk/d102
   /data02            (/dev/md/dsk/d102  ):         8192 block size          1024 frag size
    7892236 total blocks    7884010 free blocks  7094788 available        1957824 total files
    1957820 free files     22282493 filesys id
        ufs fstype       0x00000004 flag             255 filename length


On AIX systems we use the lsfs command to view file system characteristics:

# lsfs -q /dev/hd101data
   Name            Nodename   Mount Pt               VFS   Size    Options    Auto Accounting
   /dev/hd101data  --         /data02                 jfs2  262144  rw         yes  no
     (lv size: 262144, fs size: 262144, block size: 512, sparse files: yes, inline log: no, inline log size: 0, EAformat: v1, Quota: no, DMAPI: no, VIX: yes, EFS: no, ISNAPSHOT: no, MAXEXT: 0)


Like Solaris systems, HP/UX also utilises the fstyp command to view file system characteristics:

# fstyp -v /dev/vg01/lvol1
   version: 4
   f_bsize: 8192
   f_frsize: 1024
   f_blocks: 2097152
   f_bfree: 774187
   f_bavail: 726057
   f_files: 198440
   f_ffree: 193544
   f_favail: 193544
   f_fsid: 1073807361
   f_basetype: vxfs
   f_namemax: 254
   f_magic: a501fcf5
   f_featurebits: 0
   f_flag: 0
   f_fsindex: 7
   f_size: 2097152

And using df we can see:

# df -g /dev/vg01/lvol1
/export/home           (/dev/vg01/lvol1       ) :
           8192 file system block size            1024 fragment size
        2097152 total blocks                    774187 total free blocks
         725854 allocated free blocks           199252 total i-nodes
         193543 total free i-nodes              193543 allocated free i-nodes
     1073807361 file system id                    vxfs file system type
              0 flags                             255 file system name length
    /export/home file system specific string

Red Hat Linux

For Red Hat Enterprise Linux systems we use the tunefs command to view file system characteristics. For example:

# tune2fs -l /dev/cciss/c0d0p1
   tune2fs 1.39 (29-May-2006)
   Filesystem volume name:   /data02
   Last mounted on:          
      Filesystem UUID:          3664da7a-3e28-48f8-9809-6bc5f6ad74db
   Filesystem magic number:  0xEF53
   Filesystem revision #:    1 (dynamic)
   Filesystem features:      has_journal ext_attr resize_inode dir_index filetype needs_recovery sparse_super
   Default mount options:    user_xattr acl
   Filesystem state:         clean
   Errors behavior:          Continue
   Filesystem OS type:       Linux
   Inode count:              50000
   Block count:              199904
   Reserved block count:     9995
   Free blocks:              173877
   Free inodes:              49964
   First block:              1
   Block size:               1024
   Fragment size:            1024
   Reserved GDT blocks:      256