我担心我的硬盘可能会坏掉

我担心我的硬盘可能会坏掉

每当我启动计算机时,正常的启动过程几乎总会短暂中断。黑色背景上带有白色文字,显示的内容大致如下:

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

或者,也许更可怕:

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

诸如此类。我的问题是:我的硬盘是不是要坏了?

答案1

这个问题已经在这里得到解答:

/dev/sda1:干净,220240/30269440 个文件,2971359/121076736 个块

该帖子中得票最高的答案完美地解释了这一点。

答案2

正如链接的答案所述,fsck应该偶尔运行,但不能“几乎总是”就像你的情况一样。要查看运行频率,请使用:

───────────────────────────────────────────────────────────────────────────────
$ 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

但在您的情况下,请将sdc3示例中的 替换为sda2

在此示例中,fsck每次启动时都会运行。

fsck要更改磁盘运行的频率,请使用:

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

这会将运行频率设置为每 50 次启动或每月一次。

现在你应该看到:

───────────────────────────────────────────────────────────────────────────────
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:~$ 

相关内容