0

I have a hard drive with a lot of back up files, that were created by PhotoRec. When mounting it with a windows computer I can read all the files perfectly fine. Under linux I get an error when trying to look at the folder that contains all my backups. The rest of the hard drive is perfectly readable but when I try to ls the backup folder I get

ls: reading directory .: Input/output error

In Dolphin I just see a blank directory. I have tried letting arch auto mount and I have tried manually mounting it with -t ntfs-3g option (only flag used). A strange thing I notice is that if I manually mount it with the 3g option then all permissions are -rwxrwxrwx but if I let it be automatically mounted I have permissions -rw------- 1 steven steven (some have 2, but not many. The directories show d as they should). These are the same for every file and directory on the system.

I don't understand why I can't see these files under Linux, but can under Windows. I even booted up SystemRescueCD again to see if it recognized it, but it couldn't even see the files (even though it was what had originally written the files in the first place). What is so weird to me is that I can read everything on the hard drive except that one folder. It has the exact same permissions as everything else in the hard drive.

Additional info:

This is a fresh install of Arch. As of today.

[steven@serenity ~]$ uname -a Linux serenity 3.16.1-1-ARCH #1 SMP PREEMPT Thu Aug 14 07:40:19 CEST 2014 x86_64 GNU/Linux

(auto mounted)

[steven@serenity ~]$ sudo fdisk -l

Disk /dev/sdb: 596.2 GiB, 640135028736 bytes, 1250263728 sectors
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: 0x1549f232

Device     Boot Start        End    Sectors   Size Id Type
/dev/sdb1  *       63 1250258159 1250258097 596.2G  7 HPFS/NTFS/exFAT
  • You say you can't see anything in the directory, but also give permissions for "every file and directory" in it - I'm not sure how those fit together. Could you clarify what you can and can't see, and what is happening with each way of mounting? – Michael Homer Aug 31 '14 at 23:14
  • @MichaelHomer sorry, I'll clear this up in the OP. It is only a single folder that this error is happening on the hard drive. – Steven Walton Aug 31 '14 at 23:49
  • did you try running chkdsk from windows? – pqnet Sep 1 '14 at 7:48
0

The errors indicate a hardware problem with the disk but only on sectors containing the data.

The reason that under Windows you don't see these errors (until now), is probably caused by the difference in file browsing software: most Linux file browsers read more of the file information, from the file when opening a folder, than Windows Explorer does. This is to try and make previews, and have meta-data for the files available. Windows is probably only retrieving this when explicitly asked for.

You can try and see if you can copy all of the files under Windows to a separate disc. If that works run some thorough disk analyser on the original disk before continuing to use it (after making a full backup).

  • But I can open the files under the Windows system. And a hardware problem only on these sectors seems kind of weird... – Steven Walton Sep 1 '14 at 4:57
  • @StevenWalton I'm just guessing, but opening doesn't necessarily mean complete reading. If you had a headcrash, as little as one sector could be affected, although usually there is more. How long does it take (under Linux) to get the error (i.e. is the system obviously retrying before giving up)? – Anthon Sep 1 '14 at 4:59
  • Yeah, it just seems HIGHLY unlikely that the there is a hardware problem on only a certain section of a hdd. And I get the ls error immediately. If opening through dolphin it starts to scan then fails. I can even open the files in windows though. So if it is corrupted, it isn't in that way. Why can I open it in Windows and not Linux? Usually it's the other way around, or at least I can diagnose better. But I can't find anything. – Steven Walton Sep 1 '14 at 7:13
  • What happens if you copy the files, preferably to another disk/SD etc. under Windows and then access those from Linux? – Anthon Sep 1 '14 at 7:31

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.