2

Whenever I boot my computer, there's almost always a brief interruption in the otherwise normal boot process. A black background with white text, with something along these lines showing:

/dev/sda2 clean: <number>/<bigger number> blocks

Or, perhaps even scarier:

/dev/sda2 clean: <number>/<bigger number> blocks <number>/<bigger number> <number>/<bigger number>

So on and so forth. My question is this: Is my hard drive about to die?

0

2 Answers 2

2

This question has been answered here:

/dev/sda1: clean, 220240/30269440 file, 2971359/121076736 blocks

The top voted answer in that post explains it perfectly.

1

As the linked answer states fsck should be run occasionally, but not "almost always" as in your case. To see how often it is run use:

───────────────────────────────────────────────────────────────────────────────
$ sudo dumpe2fs -h /dev/sdc3
dumpe2fs 1.42.13 (17-May-2015)
Filesystem volume name:   F9m_Linux
Last mounted on:          /
Filesystem UUID:          d02dc21d-dcb2-478e-9f7d-9a3331931de4
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:              1921360
Block count:              7679931
Reserved block count:     383996
Free blocks:              4432862
Free inodes:              1339922
First block:              0
Block size:               4096
Fragment size:            4096
Reserved GDT blocks:      1022
Blocks per group:         32768
Fragments per group:      32768
Inodes per group:         8176
Inode blocks per group:   511
Flex block group size:    16
Filesystem created:       Sat Mar  5 10:58:45 2016
Last mount time:          Sun Nov 13 15:24:36 2016
Last write time:          Sun Nov 13 15:24:34 2016
Mount count:              300
Maximum mount count:      -1
Last checked:             Sat Mar  5 10:58:45 2016
Check interval:           0 (<none>)
Lifetime writes:          2530 GB
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
First orphan inode:       791391
Default directory hash:   half_md4
Directory Hash Seed:      1c470968-41be-4895-ac56-52853ea75721
Journal backup:           inode blocks
Journal features:         journal_incompat_revoke
Journal size:             128M
Journal length:           32768
Journal sequence:         0x00357fcb
Journal start:            30244

But in your case replace sdc3 in the example with sda2.

In this example fsck is run every single boot.

To change how often fsck is run on your disk use:

$ sudo tune2fs -c 50 -i 1m /dev/sda2

This sets the run frequency to every 50 boots or once a month.

Now you should see:

───────────────────────────────────────────────────────────────────────────────
rick@dell:~$ sudo dumpe2fs -h /dev/sdc3 | grep Next
dumpe2fs 1.42.13 (17-May-2015)
───────────────────────────────────────────────────────────────────────────────
rick@dell:~$ sudo tune2fs -c 50 -i 1m /dev/sdc3
tune2fs 1.42.13 (17-May-2015)
Setting maximal mount count to 50
Setting interval between checks to 2592000 seconds
───────────────────────────────────────────────────────────────────────────────
rick@dell:~$ sudo dumpe2fs -h /dev/sdc3 | grep Next
dumpe2fs 1.42.13 (17-May-2015)
Next check after:         Mon Apr  4 11:58:45 2016
───────────────────────────────────────────────────────────────────────────────
rick@dell:~$ 
3
  • I do not use an SSD, I use an HDD. However, the output of the first command is as follows: dumpe2fs 1.42.13 (17-May-2015) Mount count: 81 Maximum mount count: -1
    – Krieger
    Nov 14, 2016 at 0:16
  • @Krieger I got my original information from a bad source and changed the answer. Hopefully it makes more sense now. Please let me know. Nov 14, 2016 at 0:44
  • Perfect. Lengthy but well explained. This post should help people in the future. :)
    – Krieger
    Nov 15, 2016 at 3:49

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