My box has an uptime of 400 days, but I saw one disk smart reported online hours of 270 hours. I suspect someone hot swapped that disk. How to find out?

Power_On_Hours 0x0032 100 099 000 Old_age Always - 276


You can see the last mount time with tune2fs(for ext* filesystems). Example on 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

For nfs you can view the age parameter in /proc/self/mountstats - it's in seconds.

  • That would of course only apply to read/write mounts of an ext* file system. – Daniel B Jan 30 '17 at 8:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.