LinuxCommandLibrary

dumpe2fs

Display ext2/3/4 filesystem information

TLDR

Display ext2, ext3 and ext4 filesystem information

$ dumpe2fs [/dev/sdXN]
copy

Display the blocks which are reserved as bad in the filesystem
$ dumpe2fs -b [/dev/sdXN]
copy

Force display filesystem information even with unrecognizable feature flags
$ dumpe2fs -f [/dev/sdXN]
copy

Only display the superblock information and not any of the block group descriptor detail information
$ dumpe2fs -h [/dev/sdXN]
copy

Print the detailed group information block numbers in hexadecimal format
$ dumpe2fs -x [/dev/sdXN]
copy

SYNOPSIS

dumpe2fs [-bhixV] [-o superblock=superblock] [-o blocksize=blocksize] device

PARAMETERS

-b
    Display blocks reserved for bad blocks.

-h
    Only display the superblock information and not the block group descriptors.

-i
    Display filesystem information from an image file instead of directly from a device.

-o superblock=superblock
    Use the specified superblock to examine the filesystem.

-o blocksize=blocksize
    Use the specified blocksize when examining the filesystem.

-V
    Display version information and exit.

-x
    Print the block group and superblock data in hexadecimal format.

device
    The block device or filesystem image file to examine.

DESCRIPTION

dumpe2fs is a command-line utility used to display superblock and block group information for ext2, ext3, and ext4 filesystems. It provides a detailed view of the filesystem's metadata, which is useful for troubleshooting, recovering corrupted filesystems, and understanding the underlying structure.
It reveals essential parameters such as block size, inode count, creation time, last mount time, and features enabled. By examining the block group descriptors, dumpe2fs reveals how the filesystem is organized into block groups, each containing inodes, data blocks, and bitmaps. It's a valuable tool for system administrators and advanced users to understand and diagnose filesystem-related problems.
It is a read-only operation that does not modify the filesystem itself.

CAVEATS

dumpe2fs should only be used on unmounted or read-only mounted filesystems to prevent inconsistencies in the output.

<B>INTERPRETING OUTPUT</B>

The output of dumpe2fs can be quite verbose. Pay close attention to the superblock information, which includes essential filesystem parameters. The block group descriptors provide details about the allocation of inodes and blocks within each group.
Understanding these details is crucial for filesystem analysis and recovery.

<B>IMAGE FILES</B>

The -i option allows examining filesystem images created using tools like dd. This is valuable for analyzing filesystems from backups or disk images.

HISTORY

dumpe2fs was developed alongside the ext2 filesystem in the early 1990s as a debugging and diagnostic tool. As ext3 and ext4 evolved, dumpe2fs was updated to support these newer filesystem formats, remaining a core utility for filesystem administration and troubleshooting.

SEE ALSO

fsck(8), mkfs.ext4(8), tune2fs(8), debugfs(8)

Copied to clipboard