如何查明磁盘已安装多少小时?

如何查明磁盘已安装多少小时?

我的机器正常运行时间为 400 天,但我看到一个磁盘智能报告的在线时间为 270 小时。我怀疑有人热插拔了该磁盘。如何找出原因?

通电时间 0x0032 100 099 000 老化时间 始终 - 276

答案1

您可以使用以下命令查看上次挂载时间tune2fs(针对 ext* 文件系统)。Debian 7 上的示例:

root@wheezy:~# tune2fs -l /dev/sda1
tune2fs 1.42.5 (29-Jul-2012)
Filesystem volume name:   <none>
Last mounted on:          /
Filesystem UUID:          4b7e1b6a-a6ff-47a8-be65-d4c32c05dcf5
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 huge_file uninit_bg dir_nlink extra_isize
Filesystem flags:         signed_directory_hash
Default mount options:    user_xattr acl
Filesystem state:         clean
Errors behavior:          Continue
Filesystem OS type:       Linux
Inode count:              1893120
Block count:              7572480
Reserved block count:     378624
Free blocks:              7127797
Free inodes:              1843283
First block:              0
Block size:               4096
Fragment size:            4096
Reserved GDT blocks:      1022
Blocks per group:         32768
Fragments per group:      32768
Inodes per group:         8160
Inode blocks per group:   510
Flex block group size:    16
Filesystem created:       Wed Oct 12 10:04:11 2016
Last mount time:          Mon Jan 30 09:53:03 2017
Last write time:          Mon Jan 30 09:53:03 2017
Mount count:              5
Maximum mount count:      -1
Last checked:             Wed Oct 12 10:04:11 2016
Check interval:           0 (<none>)
Lifetime writes:          3503 MB
Reserved blocks uid:      0 (user root)
Reserved blocks gid:      0 (group root)
First inode:              11
Inode size:           256
Required extra isize:     28
Desired extra isize:      28
Journal inode:            8
Default directory hash:   half_md4
Directory Hash Seed:      01c6a9d1-d5fe-41d7-9fa7-8a5a96c5dbed
Journal backup:           inode blocks

您可以以秒为单位nfs查看age参数/proc/self/mountstats

相关内容