Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

2 Answers

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
add comment
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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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