I am just trying to salvage files off the disk I pulled from a dying Maxtor Shared Storage enclosure (failed to come back up after powering it off, presumably because the OS image on the disk got corrupted, no files on shares were in use at the time). The firmware of the MSS is Linux-based.

I took out the disk, placed into a SATA USB enclosure and plugged it into my laptop, which runs Ubuntu MATE 16.04.

I've been able to mount the partition that holds all user data and can see the files on it. It appears to be an ext3/ext4 filesystem – Linux recognizes it as such, and I can browse the directory tree.

However, there are issues on certain files/directories. Example below:

$ ls -la Photos/
ls: cannot access 'Photos/2012-06 Königssee': No such file or directory
ls: cannot access 'Photos/2003-08 Fußballspiel': No such file or directory
ls: cannot access 'Photos/2013-06 München': No such file or directory
total 8
drwxrwxrwx  6 michael michael 12288 Nov 19 21:05 .
drwxrwxrwx  3 michael michael  4096 Nov 19 21:05 ..
d?????????  ? ?       ?           ?            ? 2003-08 Fußballspiel
d?????????  ? ?       ?           ?            ? 2012-06 Königssee
d?????????  ? ?       ?           ?            ? 2013-06 München

This seems to affect only files with characters beyond the 7-bit limit. Some files with such characters work, however – I should mention that at some point I restored some files from backup (using the appliance's backup/recovery feature), while others were created from a client machine via Samba.

It is reproducible in that it's the same files leading to this error on every attempt. Other operations, such as chown -R . on the whole dir, also give the same error for the same files. When I try to move the parent dir to a different filesystem, I get the same error and the parent dirs of such problematic objects don't get removed because they are not empty. The MSS had been able to read these files/dirs with no problem.

What's happening here, and how can I regain access to these files?


After trying everything else (mounting the drive on a different machine, restoring old backups), I eventually decided to risk it and fsck the partition.

fsck -Dfp complained about errors and requested to be run again without the -p option.

fsck -Df then found a couple of errors:

Pass 2 (directory structure) found a few errors like:

Problem in HTREE directory inode 4997425: block #1 has bad max hash
Problem in HTREE directory inode 4997425: block #2 has bad min hash
Invalid HTREE directory inode 4997425 (/misc/Downloads).  Clear HTree index<y>? yes

Pass 3 discovered some non-unique filenames and suggested to create a copy. IIRC these were files which I'd recreated because they were not visible through Samba.

I allowed fsck to fix all these errors, then mounted the partition again.

lost+found contains nothing. The offending objects are present in their original locations. I'm now happily copying the remainder of my files off the partition.

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.