方法
使用dumpe2fs
命令查看指定分区的信息
Filesystem created
为安装时间
Lifetime writes
为磁盘分区创建以来的写入量(≠总写入量)
效果
pi@rpi0w:~ $ sudo dumpe2fs /dev/mmcblk0p2
dumpe2fs 1.44.5 (15-Dec-2018)
Filesystem volume name: rootfs
Last mounted on: /
Filesystem UUID: 8d008fde-f12a-47f7-8519-197ea707d3d4
Filesystem magic number: 0xEF53
Filesystem revision #: 1 (dynamic)
Filesystem features: has_journal ext_attr resize_inode dir_index filetype needs_recovery extent flex_bg sparse_super large_file dir_nlink extra_isize
Filesystem flags: unsigned_directory_hash
Default mount options: user_xattr acl
Filesystem state: clean
Errors behavior: Continue
Filesystem OS type: Linux
Inode count: 453792
Block count: 1872896
Reserved block count: 78702
Free blocks: 1177063
Free inodes: 398854
First block: 0
Block size: 4096
Fragment size: 4096
Reserved GDT blocks: 114
Blocks per group: 32768
Fragments per group: 32768
Inodes per group: 7824
Inode blocks per group: 489
Flex block group size: 16
Filesystem created: Wed Jul 10 08:20:54 2019
Last mount time: Thu Jul 23 19:17:04 2020
Last write time: Sun Apr 19 04:17:02 2020
Mount count: 88
Maximum mount count: -1
Last checked: Wed Jul 10 08:20:54 2019
Check interval: 0 (<none>)
Lifetime writes: 25 GB
Reserved blocks uid: 0 (user root)
Reserved blocks gid: 0 (group root)
First inode: 11
Inode size: 256
Required extra isize: 32
Desired extra isize: 32
Journal inode: 8
Default directory hash: half_md4
Directory Hash Seed: 70b8a693-a278-4e63-bd70-ab62ce77124a
Journal backup: inode blocks
Journal features: journal_incompat_revoke
Journal size: 32M
Journal length: 8192
Journal sequence: 0x001b2ed9
Journal start: 7917
注意
FAT32等无日志文件系统不支持查看