外部硬盘驱动器成为只读文件系统,文件系统类型错误

外部硬盘驱动器成为只读文件系统,文件系统类型错误

我有一个带有 ext4 文件系统的东芝硬盘,直到昨天我一直在广泛使用它。突然,它变成了只读文件系统,当我运行时fdisk -l,它显示类型为HPFS/NTFS/exFAT.

阅读文件系统突然变成只读;如何调试这个?,我尝试过dmesg,除此之外它还显示了(正如那里的答案中所建议的)

  367.274847] EXT4-fs error (device sdb1): ext4_validate_block_bitmap:390: comm nextcloud: bg 7398: bad block bitmap checksum
[  367.285558] Aborting journal on device sdb1-8.
[  367.297425] EXT4-fs (sdb1): Remounting filesystem read-only
[  513.153456] EXT4-fs (sdb1): error count since last fsck: 5
[  513.153491] EXT4-fs (sdb1): initial error at time 1685397473: ext4_validate_block_bitmap:390
[  513.153509] EXT4-fs (sdb1): last error at time 1685418194: ext4_validate_block_bitmap:390

确实,我可能在上次工作时没有完全卸载它。

我该如何解决这个问题?

更新

的输出sudo smartctl -a /dev/sdb

smartctl 7.2 2020-12-30 r5155 [x86_64-linux-5.10.0-23-amd64] (local build)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Toshiba 2.5" HDD MQ04UBF... (USB 3.0)
Device Model:     TOSHIBA MQ04UBF100
Serial Number:    Z0IKT0JIT
LU WWN Device Id: 0 000000 000000000
Firmware Version: JU003U
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
Zoned Device:     Device managed zones
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ACS-3 T13/2161-D revision 5
SATA Version is:  SATA 3.3, 3.0 Gb/s (current: 3.0 Gb/s)
Local Time is:    Tue May 30 16:22:45 2023 CEST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART Status not supported: Incomplete response, ATA output registers missing
SMART overall-health self-assessment test result: PASSED
Warning: This result is based on an Attribute check.

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:        (  120) seconds.
Offline data collection
capabilities:            (0x5b) SMART execute Offline immediate.
                    Auto Offline data collection on/off support.
                    Suspend Offline collection upon new
                    command.
                    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:    ( 175) 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: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x000b   100   100   050    Pre-fail  Always       -       0
  2 Throughput_Performance  0x0005   100   100   050    Pre-fail  Offline      -       0
  3 Spin_Up_Time            0x0027   100   100   001    Pre-fail  Always       -       2455
  4 Start_Stop_Count        0x0032   100   100   000    Old_age   Always       -       5725
  5 Reallocated_Sector_Ct   0x0033   100   100   050    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x000b   100   100   050    Pre-fail  Always       -       0
  8 Seek_Time_Performance   0x0005   100   100   050    Pre-fail  Offline      -       0
  9 Power_On_Hours          0x0032   093   093   000    Old_age   Always       -       2976
 10 Spin_Retry_Count        0x0033   214   100   030    Pre-fail  Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       960
191 G-Sense_Error_Rate      0x0032   100   100   000    Old_age   Always       -       17
192 Power-Off_Retract_Count 0x0032   100   100   000    Old_age   Always       -       120
193 Load_Cycle_Count        0x0032   099   099   000    Old_age   Always       -       13534
194 Temperature_Celsius     0x0022   100   100   000    Old_age   Always       -       26 (Min/Max 15/57)
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   253   000    Old_age   Always       -       0
220 Disk_Shift              0x0002   100   100   000    Old_age   Always       -       0
222 Loaded_Hours            0x0032   100   100   000    Old_age   Always       -       182
223 Load_Retry_Count        0x0032   100   100   000    Old_age   Always       -       0
224 Load_Friction           0x0022   100   100   000    Old_age   Always       -       0
226 Load-in_Time            0x0026   100   100   000    Old_age   Always       -       280
240 Head_Flying_Hours       0x0001   100   100   001    Pre-fail  Offline      -       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%      1003         -

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.


输出fdisk -l

Disk /dev/sdb: 931.51 GiB, 1000204883968 bytes, 1953525164 sectors
Disk model: External USB 3.0
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x558ebb3c

Device     Boot Start        End    Sectors   Size Id Type
/dev/sdb1  *     2048 1953522863 1953520816 931.5G  7 HPFS/NTFS/exFAT

答案1

sudo umount /dev/sdb1
sudo e2fsck -v -C 0 -t /dev/sdb1

相关内容