Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

While investigating about a failing drive (see. Why SMART is passing while it indicates failure for RAW read error rate?).

I've performed a SMART test on all my drives.

My SSD internal drive shows the following error using smartmonctl

SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Short offline       Completed: read failure       90%       521         2023520
# 2  Short offline       Completed: read failure       90%       521         2023520

How can I determine which file is affected based on the offset ?

share|improve this question
    
I don't know if you can. Of course a SpinRite Level 1 scan will attempt to read every file you have and allow your SSD decide ( once and for all ) those cells are bad and move the bits to reduency cells. – Ramhound May 9 '13 at 19:29

If you want to take the time, you could simply try to read all the files in the system and see if any complain about I/O errors.

Remember that the area being looked at might not be allocated to any file at all.

share|improve this answer
up vote 0 down vote accepted

Finally I was able to find the answer myself. So, it is possible.

echo '1613920' > error_blocks # The value from LBA_of_first_error column less the number of blocks in previous partitions
sudo fsck_hfs -B error_blocks /dev/disk1s2 # In my case, the filesystem is on /dev/disk1s1

The results look like this:

1 blocks to match:
** /dev/rdisk1s2
** Root file system
   Executing fsck_hfs (version diskdev_cmds-557.3~1).
** Verifying volume when it is mounted with write access.
   Journal need to be replayed but volume is read-only
** Checking Journaled HFS Plus volume.
fsck_hfs: Volume is journaled.  No checking performed.
fsck_hfs: Use the -f option to force checking.

So there is no file there !

However, this method needs to be confirmed since I wasn't able to display a path using this command even after checking for many blocks.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .