I'm suddenly seeing some strange behaviour on our USB backup drive that doesn't make sense to me:

(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

How is it possible for the OS to know how much is in use, but I can't ls any of it as root? Or more to the point, what problem does this indicate?

/var/log/messages said this:

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

But...read-only is something different than 'throw an io error'...

After unmounting to try fsck on it, I had someone on-site look at it, and the drive was not spun up, and had a slow-flashing light, which I believe means it was in a power-suspend mode. So I had them unplug and replug the USB cable, and now (before remounting) it says:

fsck from util-linux-ng 2.17.2
e2fsck 1.41.12 (17-May-2010)
/dev/sda1: clean, 2805106/61046784 files, 181934167/244182016 blocks

I then mount it and now ls works and df reports:

Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1             917G  680G  191G  79% /mnt/backup

What would cause it to go into such a state without being asked to? Why all the weird behaviour, and now it appears to not be corrupt?

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

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

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

Interestingly, no errors are logged, even after an extended test apparently aborted spontaneously:

$ 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

SMART Error Log Version: 1
No Errors Logged
  • 1
    try unmounting it and running fsck on it. – Iain Oct 21 '13 at 19:07
  • It says: fsck.ext2: No such file or directory while trying to open /dev/sda1 (even with -f) – Kev Oct 21 '13 at 19:10
  • Also that's odd because it's an ext4 filesystem. – Kev Oct 21 '13 at 19:14
  • I'd guess the hardware is failing, maybe just the connectors or maybe the drive itself. Inconsistent behavior is usually a sign of faulty hardware. – user16081-JoeT Oct 21 '13 at 22:01
  • 1
    I never bothered spending much time trying to solve it, but we had this EXACT same problem. It only showed up when we were running Seagate external USB drives (3TB). It would happen quite regularly, and nothing would fix it short of unplugging and reconnecting. Never had a problem once we tried using a Western Digital 3TB drive instead. If yours is a Seagate as well, I'd suggest trying another brand. – yoonix Oct 21 '13 at 23:53

The filesystem is corrupt. It may even be very corrupt since not even fsck works. Maybe the hard disk is broken or something.

  • Check dmesg to see if you have anything more regarding this FS error. Something which may indicate a broken disk?
  • You can check if the drive suports S.M.A.R.T, and run some smartctl (from smartmontools, it's in the CentOS) commands to see for sure.
  • see update above...is your diagnosis the same? I don't see any errors in dmesg – Kev Oct 21 '13 at 20:31
  • yeah I'd be concerned if the backup drive showed I/O error, but often some USB drives will croak if written to for a long duration of time. Still I'd back up onto another drive instead. And often when a drive is re-mounted read-only it can have a fault on it, or it has lost contact with the device. Maybe some lines around the output from dmesg says anything like that? – Petter H Oct 22 '13 at 17:03
  • Well...it's the nightly backup...so it writes a few hours, then takes a break most of the day. Always mounted read/write. dmesg only says EXT4-fs (cciss!c0d0p1): mounted filesystem with ordered data mode. Opts: and next line is EXT4-fs (dm-2): mounted filesystem with ordered data mode. Opts: . I'm not sure what the dm-2 is but the first one is the USB, maybe the dm-2 is related somehow. – Kev Oct 22 '13 at 22:11
  • smartctl --all /dev/sda1 says Smartctl open device: /dev/sda1 failed: INQUIRY failed. But ls works fine on it at the moment. So I think maybe SMART is not supported. Isn't that normal for external USB HDs? – Kev Oct 22 '13 at 22:23
  • 1
    Try smartctl --all /dev/sda. – Petter H Oct 23 '13 at 15:22

I had this problem recently with an 8TB usb drive. I thought that it was probably corrupt as my Windows computer couldn't read it either. (It was formatted EXT4 but was being mis-ID's as HFS). During the time I was trying to figure it out, a second 4TB drive that had just been added did the same thing, although it was properly identified on another linux machine as EXT4. I did not attempt to read it with Windows. They would mount but could not be read. It was not mounting at the right partition sometimes too. I was relieved when we found that both drives were readable on another linux machine. I tried remounting them again and both were readable. Since it happened with two different drives, I assume it is an intermittent problem with the usb interface on my machine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.