我突然发现我们的 USB 备份驱动器上出现了一些奇怪的行为,这对我来说毫无意义:
(2013-10-21 14:58:23 [root@newdc /]$ cd /mnt/backup/
(2013-10-21 14:59:03 [root@newdc backup]$ ls -la
ls: reading directory .: Input/output error
total 0
(2013-10-21 14:59:05 [root@newdc backup]$ df -h /mnt/backup
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 917G 843G 28G 97% /mnt/backup
为什么操作系统知道有多少正在使用,但我无法ls
以 root 身份使用任何内容?或者更确切地说,这表明了什么问题?
/var/log/messages
说了这样的话:
Oct 21 14:57:54 g5 kernel: EXT4-fs error (device sda1): ext4_journal_start_sb: Detected aborted journal
Oct 21 14:57:54 g5 kernel: EXT4-fs (sda1): Remounting filesystem read-only
但是...只读与‘引发 io 错误’不同......
卸载后尝试 fsck,我让现场的人看了看,驱动器没有旋转,并且有一个慢闪的灯,我认为这意味着它处于电源挂起模式。所以我让他们拔下并重新插入 USB 电缆,现在(重新安装之前)它显示:
fsck from util-linux-ng 2.17.2
e2fsck 1.41.12 (17-May-2010)
/dev/sda1: clean, 2805106/61046784 files, 181934167/244182016 blocks
然后我将其安装起来,现在ls
可以工作并df
报告:
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 917G 680G 191G 79% /mnt/backup
什么会导致它在无人要求的情况下进入这种状态?为什么会出现所有这些奇怪的行为,而现在它似乎并没有损坏?
smartctl 5.43 2012-06-30 r3573 [x86_64-linux-2.6.32-358.11.1.el6.x86_64] (local build)
Copyright (C) 2002-12 by Bruce Allen, http://smartmontools.sourceforge.net
=== START OF INFORMATION SECTION ===
Device Model: WDC WD10JMVW-11S5XS0
Serial Number: WD-WX51AC2X2298
LU WWN Device Id: 5 0014ee 6587c0e18
Firmware Version: 01.01A01
User Capacity: 1,000,204,886,016 bytes [1.00 TB]
Sector Sizes: 512 bytes logical, 4096 bytes physical
Device is: Not in smartctl database [for details use: -P showall]
ATA Version is: 8
ATA Standard is: Exact ATA specification draft version not indicated
Local Time is: Wed Oct 23 20:08:46 2013 EDT
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
=== START OF READ SMART DATA SECTION ===
SMART STATUS RETURN: 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: (18180) seconds.
Offline data collection
capabilities: (0x7b) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
command.
Offline surface scan supported.
Self-test supported.
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: ( 198) minutes.
Conveyance self-test routine
recommended polling time: ( 5) minutes.
SCT capabilities: (0x70b5) SCT Status 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 0x002f 200 200 051 Pre-fail Always - 0
3 Spin_Up_Time 0x0027 188 179 021 Pre-fail Always - 1600
4 Start_Stop_Count 0x0032 100 100 000 Old_age Always - 940
5 Reallocated_Sector_Ct 0x0033 200 200 140 Pre-fail Always - 0
7 Seek_Error_Rate 0x002e 200 200 000 Old_age Always - 0
9 Power_On_Hours 0x0032 098 098 000 Old_age Always - 2004
10 Spin_Retry_Count 0x0032 100 100 000 Old_age Always - 0
11 Calibration_Retry_Count 0x0032 100 100 000 Old_age Always - 0
12 Power_Cycle_Count 0x0032 100 100 000 Old_age Always - 744
192 Power-Off_Retract_Count 0x0032 200 200 000 Old_age Always - 12
193 Load_Cycle_Count 0x0032 197 197 000 Old_age Always - 9379
194 Temperature_Celsius 0x0022 115 098 000 Old_age Always - 32
196 Reallocated_Event_Count 0x0032 200 200 000 Old_age Always - 0
197 Current_Pending_Sector 0x0032 200 200 000 Old_age Always - 0
198 Offline_Uncorrectable 0x0030 100 253 000 Old_age Offline - 0
199 UDMA_CRC_Error_Count 0x0032 200 200 000 Old_age Always - 0
200 Multi_Zone_Error_Rate 0x0008 100 253 000 Old_age Offline - 0
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
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.
有趣的是,即使在延长的测试显然自发中止之后,也没有记录任何错误:
$ sudo smartctl -l error /dev/sda
smartctl 5.43 2012-06-30 r3573 [x86_64-linux-2.6.32-358.11.1.el6.x86_64] (local build)
Copyright (C) 2002-12 by Bruce Allen, http://smartmontools.sourceforge.net
=== START OF READ SMART DATA SECTION ===
SMART Error Log Version: 1
No Errors Logged
答案1
答案2
我最近在使用 8TB USB 驱动器时遇到了这个问题。我认为它可能已损坏,因为我的 Windows 计算机也无法读取它。(它被格式化为 EXT4,但被错误识别为 HFS)。在我试图弄清楚的时候,刚刚添加的第二个 4TB 驱动器也出现了同样的问题,尽管它在另一台 Linux 机器上被正确识别为 EXT4。我没有尝试用 Windows 读取它。它们可以安装但无法读取。有时它也没有安装在正确的分区上。当我们发现这两个驱动器在另一台 Linux 机器上都是可读的时,我松了一口气。我尝试再次重新安装它们,两个驱动器都可以读取。由于它发生在两个不同的驱动器上,我认为这是我的机器上的 USB 接口的间歇性问题。