首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >fsck.mode=force没有检查文件系统

fsck.mode=force没有检查文件系统
EN

Ask Ubuntu用户
提问于 2023-05-03 17:23:20
回答 1查看 85关注 0票数 -1

我在Ubuntu18.04上有硬盘问题,系统会随机地将我的根分区(/dev/sda4 4)重装为只读,原因是错误。

dmesg|grep 'I/O error'揭示了sda4的明显问题。我现在还没有确切的输出,因为这个盒子已经成功地重新启动了,而且目前还没有问题。

我的计划是运行一个文件系统检查文件系统。我仔细地跟踪了这个答案本教程。在后一篇教程中,我使用了题为“如何在使用systemd时在Linux上重新启动系统后强制fsck检查文件系统”一节。

但是,在重新启动后,该命令的输出将不检查文件系统:

代码语言:javascript
复制
tune2fs -l /dev/sda4 | grep checked             
Last checked:             Sat Nov 21 15:36:56 2020

我尝试过GRUB的这些变体,但它们都没有成功:

代码语言:javascript
复制
GRUB_CMDLINE_LINUX_DEFAULT="maybe-ubiquity fsck.mode=force"

代码语言:javascript
复制
GRUB_CMDLINE_LINUX_DEFAULT="maybe-ubiquity fsck.mode=force fsck.repair=yes"

是的,我确实经营过update-grub。我遗漏了什么?

smartctl -a /dev/sda的输出:

代码语言:javascript
复制
Device Model:     Samsung SSD 860 EVO 250GB
Serial Number:    S59WNG0MA22770K
LU WWN Device Id: 5 002538 e70265a2a
Firmware Version: RVT03B6Q
User Capacity:    250,059,350,016 bytes [250 GB]
Sector Size:      512 bytes logical/physical
Rotation Rate:    Solid State Device
Form Factor:      2.5 inches
Device is:        Not in smartctl database [for details use: -P showall]
ATA Version is:   Unknown(0x09fc), ACS-4 T13/BSR INCITS 529 revision 5
SATA Version is:  SATA 3.2, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Wed May  3 11:35:14 2023 MST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status:  (0x00) Offline data collection activity
                                        was never started.
                                        Auto Offline Data Collection: Disabled.
Self-test execution status:      (   0) The previous self-test routine completed
                                        without error or no self-test has ever 
                                        been run.
Total time to complete Offline 
data collection:                (    0) seconds.
Offline data collection
capabilities:                    (0x53) SMART execute Offline immediate.
                                        Auto Offline data collection on/off support.
                                        Suspend Offline collection upon new
                                        command.
                                        No Offline surface scan supported.
                                        Self-test supported.
                                        No Conveyance Self-test supported.
                                        Selective Self-test supported.
SMART capabilities:            (0x0003) Saves SMART data before entering
                                        power-saving mode.
                                        Supports SMART auto save timer.
Error logging capability:        (0x01) Error logging supported.
                                        General Purpose Logging supported.
Short self-test routine 
recommended polling time:        (   2) minutes.
Extended self-test routine
recommended polling time:        (  85) minutes.
SCT capabilities:              (0x003d) SCT Status supported.
                                        SCT Error Recovery Control supported.
                                        SCT Feature Control supported.
                                        SCT Data Table supported.

SMART Attributes Data Structure revision number: 1
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  5 Reallocated_Sector_Ct   0x0033   038   038   010    Pre-fail  Always       -       311
  9 Power_On_Hours          0x0032   095   095   000    Old_age   Always       -       21420
 12 Power_Cycle_Count       0x0032   099   099   000    Old_age   Always       -       14
177 Wear_Leveling_Count     0x0013   001   001   000    Pre-fail  Always       -       2041
179 Used_Rsvd_Blk_Cnt_Tot   0x0013   100   100   010    Pre-fail  Always       -       0
181 Program_Fail_Cnt_Total  0x0032   100   100   010    Old_age   Always       -       0
182 Erase_Fail_Count_Total  0x0032   100   100   010    Old_age   Always       -       0
183 Runtime_Bad_Block       0x0013   038   038   010    Pre-fail  Always       -       311
187 Reported_Uncorrect      0x0032   100   100   000    Old_age   Always       -       0
190 Airflow_Temperature_Cel 0x0032   067   065   000    Old_age   Always       -       33
195 Hardware_ECC_Recovered  0x001a   200   200   000    Old_age   Always       -       0
199 UDMA_CRC_Error_Count    0x003e   100   100   000    Old_age   Always       -       0
235 Unknown_Attribute       0x0012   099   099   000    Old_age   Always       -       10
241 Total_LBAs_Written      0x0032   099   099   000    Old_age   Always       -       166281511800

SMART Error Log Version: 1
No Errors Logged

SMART Self-test log structure revision number 1
No self-tests have been logged.  [To run self-tests, use: smartctl -t]

SMART Selective self-test log data structure revision number 1
 SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
    1        0        0  Not_testing
    2        0        0  Not_testing
    3        0        0  Not_testing
    4        0        0  Not_testing
    5        0        0  Not_testing
  256        0    65535  Read_scanning was never started
Selective self-test flags (0x0):
  After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.

<#>更新:

服务器今早再次崩溃(还在运行,但/被挂载为只读),下面是我在dmesg中看到的内容:

代码语言:javascript
复制
dmesg |grep sda

[70547.166349] sd 0:0:0:0: [sda] tag#13 FAILED Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[70547.166354] sd 0:0:0:0: [sda] tag#13 CDB: ATA command pass through(16) 85 06 2c 00 00 00 00 00 00 00 00 00 00 00 e5 00
[70948.441912] sd 0:0:0:0: [sda] tag#15 FAILED Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[70948.441918] sd 0:0:0:0: [sda] tag#15 CDB: Read(10) 28 00 1a cb 1c 00 00 00 08 00
[70948.441922] print_req_error: I/O error, dev sda, sector 449518592
[70948.442312] sd 0:0:0:0: [sda] tag#16 FAILED Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[70948.442315] sd 0:0:0:0: [sda] tag#16 CDB: Read(10) 28 00 1a cb 1c 00 00 00 08 00
[70948.442316] print_req_error: I/O error, dev sda, sector 449518592
[70948.442955] sd 0:0:0:0: [sda] tag#17 FAILED Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[70948.442960] sd 0:0:0:0: [sda] tag#17 CDB: Read(10) 28 00 0e 0b 03 08 00 00 20 00
[70948.442962] print_req_error: I/O error, dev sda, sector 235602696
[70948.443389] sd 0:0:0:0: [sda] tag#18 FAILED Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[70948.443393] sd 0:0:0:0: [sda] tag#18 CDB: Read(10) 28 00 0e 0b 03 08 00 00 08 00
[70948.443396] print_req_error: I/O error, dev sda, sector 235602696
[72347.211525] sd 0:0:0:0: [sda] tag#19 FAILED Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[72347.211531] sd 0:0:0:0: [sda] tag#19 CDB: ATA command pass through(16) 85 06 2c 00 00 00 00 00 00 00 00 00 00 00 e5 00
[74147.255746] sd 0:0:0:0: [sda] tag#21 FAILED Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[74147.255752] sd 0:0:0:0: [sda] tag#21 CDB: ATA command pass through(16) 85 06 2c 00 00 00 00 00 00 00 00 00 00 00 e5 00
[75947.299631] sd 0:0:0:0: [sda] tag#23 FAILED Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[75947.299637] sd 0:0:0:0: [sda] tag#23 CDB: ATA command pass through(16) 85 06 2c 00 00 00 00 00 00 00 00 00 00 00 e5 00
[77747.345291] sd 0:0:0:0: [sda] tag#25 FAILED Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[77747.345297] sd 0:0:0:0: [sda] tag#25 CDB: ATA command pass through(16) 85 06 2c 00 00 00 00 00 00 00 00 00 00 00 e5 00
[79547.389376] sd 0:0:0:0: [sda] tag#27 FAILED Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[79547.389382] sd 0:0:0:0: [sda] tag#27 CDB: ATA command pass through(16) 85 06 2c 00 00 00 00 00 00 00 00 00 00 00 e5 00
[81347.432593] sd 0:0:0:0: [sda] tag#29 FAILED Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[81347.432598] sd 0:0:0:0: [sda] tag#29 CDB: ATA command pass through(16) 85 06 2c 00 00 00 00 00 00 00 00 00 00 00 e5 00

我确实意识到需要更换驱动器,但我的目标只是在根分区上运行fsck

EN

回答 1

Ask Ubuntu用户

发布于 2023-05-03 18:14:55

票数 1
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/1466430

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档