3

I have a 500 GB USB drive mounted as HPFS/NTFS and while copying files to the drive the copying process suddenly failed. After a unmount, unplug and reboot copying works fine again but files in one folder can't be accessed anymore:

ls: reading directory .: Input/output error

other folders work fine. badblocks found no errors on the external hard disk:

sudo badblocks -v /dev/sdd1 > bad-sectors.txt
Checking blocks 0 to 487653042
Checking for bad blocks (read-only test): done                                                 
Pass completed, 0 bad blocks found. (0/0/0 errors

mount reads thats fuseblk is used to mount the the drive, i.e. ntfs-3g is used.

the last output of dmesg reads:

[63018.326130] usb 2-1: new SuperSpeed USB device number 3 using xhci_hcd
[63018.384505] usb 2-1: New USB device found, idVendor=059b, idProduct=0070
[63018.384508] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[63018.384510] usb 2-1: Product: eGo USB
[63018.384511] usb 2-1: Manufacturer: Iomega
[63018.384513] usb 2-1: SerialNumber: 0300000000006D48
[63018.413770] usb 2-1: Set SEL for device-initiated U1 failed.
[63018.416875] usb 2-1: Set SEL for device-initiated U2 failed.
[63018.425905] usb 2-1: Set SEL for device-initiated U1 failed.
[63018.428713] usb 2-1: Set SEL for device-initiated U2 failed.
[63018.469541] scsi host8: uas
[63018.472788] usb 2-1: Set SEL for device-initiated U1 failed.
[63018.477256] usb 2-1: Set SEL for device-initiated U2 failed.
[63018.482405] scsi 8:0:0:0: Direct-Access     OEM      Ext Hard Disk    0000 PQ: 0 ANSI: 5
[63018.664361] scsi 8:0:0:1: CD-ROM            Virtual  CDROM                 PQ: 0 ANSI: 0
[63018.664664] sd 8:0:0:0: Attached scsi generic sg2 type 0
[63018.697536] sd 8:0:0:0: [sdc] 975319088 512-byte logical blocks: (499 GB/465 GiB)
[63018.705474] sr 8:0:0:1: [sr0] scsi-1 drive
[63018.705675] sr 8:0:0:1: Attached scsi CD-ROM sr0
[63018.705797] sr 8:0:0:1: Attached scsi generic sg3 type 5
[63018.758482] sd 8:0:0:0: [sdc] Write Protect is off
[63018.758487] sd 8:0:0:0: [sdc] Mode Sense: 10 00 00 00
[63018.774133] sd 8:0:0:0: [sdc] Cache data unavailable
[63018.774138] sd 8:0:0:0: [sdc] Assuming drive cache: write through
[63019.025475]  sdc: sdc1
[63019.583520] sd 8:0:0:0: [sdc] Attached SCSI disk
Yar
  • 31

1 Answers1

3

The fail probably left the some half-complete information for that directory on the drive. That is not automatically fixed.

You should at least run a ntfsfix on the drive

sudo ntfsfix /dev/<your_usb_drive>

ntfsfix comes with the package ntfs-3g (install with sudo apt-get install ntfs-3g)

Anthon
  • 79,293
  • Thanks Anthon.
    ntfsfix worked, sudo ntfsfix /dev/sdd1 Mounting volume... OK Processing of $MFT and $MFTMirr completed successfully. Checking the alternate boot sector... OK NTFS volume version is 3.1. NTFS partition /dev/sdd1 was processed successfully

    however, the problem persist, I still get
    ls: reading directory .: Input/output error
    on the folder in question

    – Yar Aug 21 '16 at 06:18
  • I don't use NTFS that much anymore, I would mount the USB drive in a Windows VM (or directly on a Windows machine if you have one), the run a filesystem check there. And if that doesn't work restart from scratch (ie. formatting, assuming you first copy from the USB drive any data for which you have no copy locally). – Anthon Aug 21 '16 at 07:11
  • @Yar, I agree with @Anthon - dmesg does not show hardware disk errors so cause for I/O errors is most probably corrupted filesystem. And NTFS checking tools are in infancy on GNU/Linux... Check the disk in windows machine. – Matija Nalis Aug 25 '16 at 19:32