ERROR: invalid cluster while reading directory (exfat 0.9.4)

701 views
Skip to first unread message

slava.kr...@gmail.com

unread,
May 21, 2011, 4:01:32 AM5/21/11
to ex...@googlegroups.com
Hello!

I have an external HDD, with exFAT FS created by mkexfatfs. It used to work fine until I plugged it into a Win7 (x64) PC and unplugged "improperly". Since then, Linux mount.exfat started complaining and refused to mount the HDD (sorry, I forgot the error message). I did FS checking and repairing in Win7, and it mounted cleanly and never reported any problems... in Windows. But Linux still won't mount the disk, now saying:

sudo mount.exfat-fuse /dev/sdd1 /mnt/mnt1 -d
FUSE exfat 0.9.4
ERROR: invalid cluster while reading directory.

(all dirs/devices exist, file permissions are ok,)

Windows has no problems with it whatsoever, the disk is OK, it says.

Here's some info you might find useful (I hope):

dmesg:

[293332.281268] usb 2-1.2: new high speed USB device using ehci_hcd and address 7
[293332.412951] scsi26 : usb-storage 2-1.2:1.0
[293333.409662] scsi 26:0:0:0: Direct-Access     Toshiba  External USB HDD 1.04 PQ: 0 ANSI: 4
[293333.410511] sd 26:0:0:0: Attached scsi generic sg3 type 0
[293333.410918] sd 26:0:0:0: [sdd] 976773168 512-byte logical blocks: (500 GB/465 GiB)
[293333.411433] sd 26:0:0:0: [sdd] Write Protect is off
[293333.411438] sd 26:0:0:0: [sdd] Mode Sense: 23 00 00 00
[293333.413786] sd 26:0:0:0: [sdd] No Caching mode page present
[293333.413792] sd 26:0:0:0: [sdd] Assuming drive cache: write through
[293333.416652] sd 26:0:0:0: [sdd] No Caching mode page present
[293333.416657] sd 26:0:0:0: [sdd] Assuming drive cache: write through
[293333.443266]  sdd: sdd1
[293333.446576] sd 26:0:0:0: [sdd] No Caching mode page present
[293333.446587] sd 26:0:0:0: [sdd] Assuming drive cache: write through
[293333.446593] sd 26:0:0:0: [sdd] Attached SCSI disk

uname -a:

Linux neptune 2.6.38-9-generic #43-Ubuntu SMP Thu Apr 28 15:23:06 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux

Ubuntu packages:

fuse-exfat version 0.9.4-2
libfuse2 version 2.8.4-1.1ubuntu4


I'll be happy to help track down this issue :-)

Andrew Nayenko

unread,
May 21, 2011, 5:19:30 AM5/21/11
to slava.kr...@gmail.com, ex...@googlegroups.com
Hi,

I need some more diagnostics to track down the issue. Please download
the latest utils
(http://exfat.googlecode.com/files/exfat-utils-0.9.5.tar.gz), untar
them:
tar xf exfat-utils-0.9.5.tar.gz
cd exfat-utils-0.9.5
apply the attached patch:
patch -p0 < ~/Downloads/invcldiag.patch
compile the utils (you'll need scons and libfuse-dev):
scons
run exfatfsck against the failing volume (it works with FS in
read-only mode, so it cannot damage your data):
sudo fsck/exfatfsck /dev/sdd1
and send me the full output it produces.
Thanks in advance.

--
 Andrew Nayenko <res...@gmail.com>

invcldiag.patch

slava.kr...@gmail.com

unread,
May 21, 2011, 5:37:40 AM5/21/11
to ex...@googlegroups.com
Ok, here you go.
exfatfsck.log.gz

Andrew Nayenko

unread,
May 21, 2011, 8:05:29 AM5/21/11
to slava.kr...@gmail.com, ex...@googlegroups.com
> Ok, here you go.

The EOD entry (entry with 0 in the type field) is missing in the root
directory. Looks like Windows checks directory's size field to
determine the end of the directory, meanwhile fuse-exfat uses EOD
entry for this purpose. This is why your disk is readable under
Windows but not under Linux.

Anyway, the absence of EOD is a problem. Most probably it's caused by
the bug in mkfs.exfat 0.9.4 (which was fixed in 0.9.5). So, the most
straightforward way to fix you issue is to recreate the filesystem
using latest mkfs.exfat (currently 0.9.5) or Windows' format.exe.

--
 Andrew Nayenko <res...@gmail.com>

slava.kr...@gmail.com

unread,
May 21, 2011, 11:27:50 AM5/21/11
to ex...@googlegroups.com, slava.kr...@gmail.com
Thanks for the prompt response and analysis, Andrew!

So I figure, exfat-free 0.9.5 is not safe from this issue, and should it happen again, it won't be able to read the disk contents?
I'll reformat the drive to "fix" that for now, as you suggested, but I guess I'll have to wait for 0.9.6 to experiment in a "safer" environment ;)

toonen...@gmail.com

unread,
Mar 16, 2013, 11:54:54 AM3/16/13
to ex...@googlegroups.com, slava.kr...@gmail.com
Is there a way to make exfat-fuse look at the directory size (like windows) instead of the EOD entry?

Op zaterdag 21 mei 2011 10:01:32 UTC+2 schreef slava.kr...@gmail.com het volgende:

Andrew Nayenko

unread,
Mar 17, 2013, 5:07:09 AM3/17/13
to ex...@googlegroups.com, toonen...@gmail.com
> Is there a way to make exfat-fuse look at the directory size (like windows)
> instead of the EOD entry?

It has been done long ago. Do you have any problems with recent version
of fuse-exfat?
--
Andrew Nayenko <res...@gmail.com>

toonen...@gmail.com

unread,
Mar 17, 2013, 12:41:22 PM3/17/13
to ex...@googlegroups.com, toonen...@gmail.com
Whoops, sorry. Turns out I had some conflicting libs installed. After removing and reinstalling the latest version, everything was fine. Very glad it works!

Sorry for the disturbance and thanks for the quick reply!

Op zondag 17 maart 2013 10:07:09 UTC+1 schreef Andrew Nayenko het volgende:
Reply all
Reply to author
Forward
0 new messages