, 3 min read

dumpe2fs: When was my hard-drive first formatted?

Original post is here eklausmeier.goip.de/blog/2021/01-23-dumpe2fs-when-was-my-hard-drive-first-formatted.


I repeatedly forget to remember when my hard-drive or SSD was first formatted.

Command for this is dumpe2fs. This command is part of package e2fsprogs. Example:

# dumpe2fs -h /dev/sda1
dumpe2fs 1.45.6 (20-Mar-2020)
Filesystem volume name:   <none>
Last mounted on:          /boot
Filesystem UUID:          83a1bedb-6fd3-46d0-8900-e4e09536168e
Filesystem magic number:  0xEF53
Filesystem revision #:    1 (dynamic)
Filesystem features:      ext_attr resize_inode dir_index filetype sparse_super
Filesystem flags:         signed_directory_hash
Default mount options:    user_xattr acl
Filesystem state:         clean
Errors behavior:          Continue
Filesystem OS type:       Linux
Inode count:              62248
Block count:              248832
Reserved block count:     12441
Free blocks:              126393
Free inodes:              61933
First block:              1
Block size:               1024
Fragment size:            1024
Reserved GDT blocks:      256
Blocks per group:         8192
Fragments per group:      8192
Inodes per group:         2008
Inode blocks per group:   251
RAID stride:              4
RAID stripe width:        4
Filesystem created:       Mon Apr 21 13:45:32 2014
Last mount time:          Sun May 31 14:18:09 2020
Last write time:          Mon Jun  1 00:40:25 2020
Mount count:              35
Maximum mount count:      -1

You must be root to use this command. It does not work for encrypted disks (LUKS) or volume groups.

Added 18-Feb-2023: Compare output for SSD and M.2 disk.

Entry 55 GB SSD 120 GB ADATA SSD 2TB Samsung PM9A1 M.2 PCIe 4.0
Filesystem volume name arch-main boot <none>
Last mounted on / /boot /
Filesystem UUID 37e39e08-8cd4-48a8-ac56-4873ce004f06 a8d6c185-0769-4ec5-9088-2c7087815346 63669b64-5753-44a6-8626-561a6c98ab5b
Filesystem magic number 0xEF53 0xEF53 0xEF53
Filesystem revision # 1 (dynamic) 1 (dynamic) 1 (dynamic)
Filesystem features has_journal ext_attr resize_inode dir_index filetype needs_recovery extent flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize has_journal ext_attr resize_inode dir_index filetype needs_recovery extent flex_bg sparse_super large_file huge_file dir_nlink extra_isize has_journal ext_attr resize_inode dir_index filetype needs_recovery extent 64bit flex_bg sparse_super large_file huge_file dir_nlink extra_isize metadata_csum
Filesystem flags signed_directory_hash signed_directory_hash signed_directory_hash
Default mount options user_xattr acl user_xattr acl user_xattr acl
Filesystem state clean clean clean
Errors behavior Continue Continue Continue
Filesystem OS type Linux Linux Linux
Inode count 3670016 128016 125009920
Block count 14653440 512000 500029696
Reserved block count 732672 25600 25001484
Overhead clusters 276365 26652 8129800
Free blocks 6975285 346260 255217479
Free inodes 3205664 127648 118970216
First block 0 1 0
Block size 4096 1024 4096
Fragment size 4096 1024 4096
Group descriptor size 64
Reserved GDT blocks 1020 256 1024
Blocks per group 32768 8192 32768
Fragments per group 32768 8192 32768
Inodes per group 8192 2032 8192
Inode blocks per group 512 254 512
Flex block group size 16 16 16
Filesystem created Wed May 20 11:26:46 2015 Mon Jan 2 21:21:35 2017 Sun May 1 11:51:33 2022
Last mount time Sun Feb 19 11:54:45 2023 Sat Feb 18 16:06:32 2023 Sat Feb 18 11:08:18 2023
Last write time Sun Feb 19 11:54:45 2023 Sat Feb 18 16:06:32 2023 Sat Feb 18 11:08:18 2023
Mount count 704 1025 240
Maximum mount count -1 -1 -1
Last checked Wed Feb 1 19:59:44 2017 Mon Jan 2 21:21:35 2017 Sun May 1 11:51:33 2022
Check interval 0 (<none>) 0 (<none>) 0 (<none>)
Lifetime writes 1116 GB 55 GB 1995 GB
Reserved blocks uid 0 (user root) 0 (user root) 0 (user root)
Reserved blocks gid 0 (group root) 0 (group root) 0 (group root)
First inode 11 11 11
Inode size 256 128 256
Required extra isize 28 32
Desired extra isize 28 32
Journal inode 8 8 8
First orphan inode 100401983
Default directory hash half_md4 half_md4 half_md4
Directory Hash Seed 5163f87f-0627-40b9-9ff4-cefa847e11ca 0f5d9799-16f0-4429-b7bd-f6d8c70cc07c 120bab98-bb6d-489c-871f-0570938845db
Journal backup inode blocks inode blocks inode blocks
Checksum type crc32c
Checksum 0x55d63aac
Journal features journal_incompat_revoke journal_incompat_revoke journal_incompat_revoke journal_64bit journal_checksum_v3
Total journal size 128M 8M 1024M
Total journal blocks 32768 8192 262144
Max transaction length 32768 8192 262144
Fast commit length 0 0 0
Journal sequence 0x0035c48b 0x000008d4 0x003aeb32
Journal start 1 1 1
Journal checksum type crc32c
Journal checksum 0x29b66216