fsstat - Display details of a file system

fsstat displays the details associated with a file system. The output of this command is file system specific. At a minimum, the range of meta-data values (inode numbers) and content units (blocks or clusters) are given. Also given are details from the Super Block, such as mount times and and features. For file systems that use groups (FFS and EXT2FS), the layout of each group is listed. For a FAT file system, the FAT table is displayed in a condensed format. Note that the data is in sectors and not in clusters.

To install fsstat package:

$ sudo apt-get install sleuthkit

To display detail of a file system:

$ sudo mount | grep ext4
/dev/sda3 on / type ext4 (rw,relatime,errors=remount-ro)

$ sudo fsstat /dev/sda3 | more
FILE SYSTEM INFORMATION
--------------------------------------------
File System Type: Ext4
Volume Name: 
Volume ID: 6f28eae2697f78bbf047526f6c4ba9d8

Last Written at: 2023-05-19 10:51:40 (PDT)
Last Checked at: 2022-12-26 20:56:27 (PST)

Last Mounted at: 2023-05-19 10:51:40 (PDT)
Unmounted properly
Last mounted on: /

Source OS: Linux
Dynamic Structure
Compat Features: Journal, Ext Attributes, Resize Inode, Dir Index
InCompat Features: Filetype, Needs Recovery, Extents, 64bit, Flexible Block Groups, 
Read Only Compat Features: Sparse Super, Large File, Huge File, Extra Inode Size

Journal ID: 00
Journal Inode: 8

METADATA INFORMATION
--------------------------------------------
Inode Range: 1 - 6520833
Root Directory: 2
Free Inodes: 5769769
Inode Size: 256
Orphan Inodes: 418372, 418366, 418362, 418203, 418153, 1311034, 1311033, 418374, 4594981, 4594004, 418389, 418383, 418381, 418373, 418370, 418371, 418369, 418368, 6291729, 418367, 4593820, 418365, 418364
, 418363, 418152, 418201, 418198, 418196, 4594983, 418361, 418339, 418160, 418158, 1310992, 1714779, 1714780, 418194, 418195, 1311035, 1311010, 

CONTENT INFORMATION
--------------------------------------------
Block Groups Per Flex Group: 16
Block Range: 0 - 26082303
Block Size: 4096
Free Blocks: 16313184

BLOCK GROUP INFORMATION
--------------------------------------------
Number of Block Groups: 796
Inodes per group: 8192
Blocks per group: 32768

Group: 0:
  Block Group Flags: [INODE_ZEROED] 
  Inode Range: 1 - 8192
  Block Range: 0 - 32767
  Layout:
    Super Block: 0 - 0
    Group Descriptor Table: 1 - 13
    Group Descriptor Growth Blocks: 14 - 1037
    Data bitmap: 1038 - 1038
    Inode bitmap: 1054 - 1054
    Inode Table: 1070 - 1581
    Data Blocks: 9262 - 32767
  Free Inodes: 8174 (99%)
  Free Blocks: 6286 (19%)
  Total Directories: 2
  Stored Checksum: 0x34D8

Group: 1:
  Block Group Flags: [INODE_UNINIT, INODE_ZEROED] 
  Inode Range: 8193 - 16384
  Block Range: 32768 - 65535
  Layout:
    Super Block: 32768 - 32768
    Group Descriptor Table: 32769 - 32781
    Group Descriptor Growth Blocks: 32782 - 33805
    Data bitmap: 1039 - 1039
    Inode bitmap: 1055 - 1055
    Inode Table: 1582 - 2093
    Data Blocks: 33806 - 65535
  Free Inodes: 8192 (100%)
  Free Blocks: 1008 (3%)
  Total Directories: 0
  Stored Checksum: 0x9FAA