dumpe2fs command in Linux with examples
Last Updated :
15 May, 2019
dumpe2fs command is used to print the super block and blocks group information for the filesystem present on device.
- Can be used with ext2/ext3/ext4 filesystem for information.
- The printed information may be old or inconsistent when it is used with a mounted filesystem.
- Don’t forget to unmount your partition before using this command.
umount device
Syntax:
dumpe2fs [ -bfhixV ] [ -o superblock=superblock ] [ -o blocksize=block-size ] device
Options:
- b : Used to get the blocks which are reserved as bad in the filesystem.
- o superblock=superblock : It uses the superblock during the examination of filesystem. This option is not usually needed except by a filesystem wizard who is examining the remains of a very badly corrupted filesystem.
- o blocksize=blocksize : It uses the blocksize during the examination of filesystem. This option is not usually needed except by a filesystem wizard who is examining the remains of a very badly corrupted filesystem.
- f : Used to force dumpe2fs to display a filesystem even though it may have some filesystem feature flags which dumpe2fs may not understand.
- h : It will only display the superblock information and not any of the block group descriptor detail information.
- i : Used to show the filesystem data from an image file created by e2image, using device as the pathname to the image file.
- x : Display the detailed group information block numbers in hexadecimal format.
- V : Display the version number of dumpe2fs and exit.
Superblock: It is a record of the characteristics of a filesystem. It includes information about size, block size, empty and the filled blocks. Linux also maintains a copy of its superblock< in memory. If you are unable to mount your device, this can be due to a Corrupted superblock.
Examples:
- Displaying superblock information:
sudo dumpe2fs -h /dev/sda3
- Displaying Information of block groups:
sudo dumpe2fs /dev/sda3
This displays information about block groups. Notice Primary superblock
- Observing more about superblocks:
sudo dumpe2fs /dev/sda4 | grep -i superblock
Displays all available superblocks with discriptors.
- Displaying the version of dumpe2fs:
sudo dumpe2fs -V
Like Article
Suggest improvement
Share your thoughts in the comments
Please Login to comment...