0

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

1
  • A confusing question, especially its body against the title. First of all, volumes (FS instances, also called partitions) are mounted, not “disks”. Secondly, disk (containing the volume) could be physically offline whereas the OS may deem the volume mounted. Commented Jun 15, 2023 at 12:11

1 Answer 1

0

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.

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .