根文件系统错误(输出摘要)

根文件系统错误(输出摘要)

今天,当我启动我的机器(运行 Kubuntu 20.04 的 HP Pavilion)时,我立即收到硬盘错误。我设法绕过它来访问网络,使我能够发送此消息。但显然出了什么问题,几乎可以肯定是硬件出了问题。我该怎么办?

启动后我立即收到以下消息:

硬盘错误

请运行硬盘测试系统诊断程序

硬盘 2 (3F2)

F2 系统诊断

不用说,我没有从 HP 诊断程序中得到任何有用的信息。fsck 拒绝运行,因为 /dev/sda5 (根文件系统)已被挂载。

通过从记忆棒运行,我能够对根文件系统执行 fsck。它没有显示任何错误,因此“硬盘错误”消息是虚假的 —— 误导性地指示了真正的问题。也许是 BIOS 设置中的问题?

以下是 SMART 结果:

root@HP-Pavilion-Laptop-17-ar0xx:/home/pwa/Music# smartctl /dev/sda
smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.4.0-84-generic] (local build)
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org

ATA device successfully opened

Use 'smartctl -a' (or '-x') to print SMART (and more) information

root@HP-Pavilion-Laptop-17-ar0xx:/home/pwa/Music# smartctl -a /dev/sda
smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.4.0-84-generic] (local build)
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Seagate Mobile HDD
Device Model:     ST1000LM035-1RK172
Serial Number:    ZDE4473L
LU WWN Device Id: 5 000c50 0a4965514
Firmware Version: RSM7
User Capacity:    1,000,204,886,016 bytes [1.00 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    5400 rpm
Form Factor:      2.5 inches
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ACS-3 T13/2161-D revision 3b
SATA Version is:  SATA 3.1, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Mon Oct 18 14:54:09 2021 EDT
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:                    (0x51) SMART execute Offline immediate.
                                        No Auto Offline data collection 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:        ( 163) minutes.
SCT capabilities:              (0x303d) SCT Status supported.
                                        SCT Error Recovery Control supported.
                                        SCT Feature Control supported.
                                        SCT Data Table supported.

SMART Attributes Data Structure revision number: 10
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x002f   084   064   006    Pre-fail  Always       -       239576664
  3 Spin_Up_Time            0x0023   099   099   000    Pre-fail  Always       -       0
  4 Start_Stop_Count        0x0032   099   099   000    Old_age   Always       -       1297
  5 Reallocated_Sector_Ct   0x0033   100   100   036    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x002f   086   060   045    Pre-fail  Always       -       415925788
  9 Power_On_Hours          0x0032   077   077   000    Old_age   Always       -       20304 (202 78 0)
 10 Spin_Retry_Count        0x0033   100   100   097    Pre-fail  Always       -       0
 12 Power_Cycle_Count       0x0032   099   099   000    Old_age   Always       -       1050
183 Runtime_Bad_Block       0x0032   100   100   000    Old_age   Always       -       0
184 End-to-End_Error        0x0033   100   100   097    Pre-fail  Always       -       0
187 Reported_Uncorrect      0x0032   100   100   000    Old_age   Always       -       0
188 Command_Timeout         0x0032   100   099   000    Old_age   Always       -       5
189 High_Fly_Writes         0x003a   100   100   000    Old_age   Always       -       0
190 Airflow_Temperature_Cel 0x0022   066   053   040    Old_age   Always       -       34 (Min/Max 29/35)
191 G-Sense_Error_Rate      0x0032   100   100   000    Old_age   Always       -       106
192 Power-Off_Retract_Count 0x0022   100   100   000    Old_age   Always       -       233
193 Load_Cycle_Count        0x0032   098   098   000    Old_age   Always       -       5179
194 Temperature_Celsius     0x0022   034   047   000    Old_age   Always       -       34 (0 16 0 0 0)
196 Reallocated_Event_Count 0x0032   100   100   000    Old_age   Always       -       0
197 Current_Pending_Sector  0x0032   100   100   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0030   100   100   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x0032   200   200   000    Old_age   Always       -       0
254 Free_Fall_Sensor        0x0032   100   100   000    Old_age   Always       -       0

SMART Error Log Version: 1
No Errors Logged

SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Short offline       Completed without error       00%     20264         -
# 2  Short offline       Aborted by host               90%     20263         -
# 3  Short offline       Aborted by host               50%     20263         -
# 4  Short offline       Completed without error       00%     20260         -
# 5  Short offline       Completed without error       00%     20260         -
# 6  Extended offline    Interrupted (host reset)      00%     20260         -
# 7  Short offline       Completed without error       00%     20259         -
# 8  Short offline       Completed without error       00%     20259         -
# 9  Short offline       Completed without error       00%     20259         -
#10  Short offline       Completed without error       00%     20258         -
#11  Short offline       Interrupted (host reset)      00%      2838         -
#12  Short offline       Completed without error       00%       482         -
#13  Short offline       Completed without error       00%         4         -

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
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.

@heynnema - These voluminous outputs make it hard for me to find the relevant data.    But I can say that **grep -i FPDMA /var/log/syslog** produces no output. Looking at the SMART output I couldn't find the read/seek errors, but I believe you when you say that they're there.

My machine is a 2-year old HP Pavilion laptop, but parts of it, including the BIOS, are probably much older.

@heynnema - I've been trying to use pastebin but I.m caught in validate hell on the Ubuntu One website.  It's so frustrating to be trying to solve Problem A and to be dragged into Problem B.

答案1

我不太确定这是否可行,但考虑到您的 Linux 文件系统通过了测试,也许可以在 Ubuntu 上的磁盘应用程序(在 LIVEUSB 上)中对主硬盘上的 FAT 启动分区运行 SMART 测试。如果您有它,这可能是个问题?我的 PC 有一个这样的分区。另外,再次检查您的 Linux(ext 某物)分区,错误可能是 GRUB 告诉您那里出了问题。

另外,我注意到它安装在 /dev/sda5 上(我的 Ubuntu 计算机从 /dev/sda1、2 等启动),并且错误出在硬盘 2 上,因此也许 SMART 检查连接的其他驱动器(如果有),并尝试在断开非必要驱动器的情况下进行启动。

如果驱动器上有非常重要的数据,它可能已经损坏,所以不要再使用它并将其带到数据恢复地点。

我以前有一个故障硬盘,有时会出现 BIOS 错误,有时又能正常启动。它快要坏了,但我还是用了好几次,在它坏之前把数据取出来。如果你能快速使用它,并且想省点钱,也许你可以快速把数据取出来。

如果您确实有备份,设法删除数据或者不关心驱动器上的数据,只需获取一个新的并将其换出。

答案2

让我们开始检查您的文件系统...

  • 以“试用 Ubuntu”模式启动 Ubuntu Live DVD/USB
  • terminalCtrl+ Alt+打开窗口T
  • 类型sudo fdisk -l
  • 识别“Linux 文件系统”的 /dev/sdXX 设备名称
  • 输入sudo fsck -f /dev/sdXX,替换sdXX为您之前找到的数字
  • fsck如果有错误则重复命令
  • 类型reboot

答案3

圣人值得赞美!!我启动时没有出现错误,所以目前没有什么可诊断的。也许运行 smartctl 有助于解决问题。

感谢 heynnema 的敏锐帮助。

@heynnema-这是屏幕截图: 在此处输入图片描述

相关内容