Other Can't use FUSE mounts

ybungalobill

Member

Reaction score: 4
Messages: 30

Hi, I can mount the card successfully, but when I ls it, it fails. The card reads fine on another machine, and I could properly mount it a few months ago on FreeBSD 11.2. Here's the terminal log:

Code:
# uname -a
FreeBSD orthanc 12.0-RELEASE-p3 FreeBSD 12.0-RELEASE-p3 GENERIC  amd64
# dmesg
...
ugen0.6: <Realtek USB3.0 Card Reader> at usbus0
umass0 on uhub0
umass0: <Bulk-In, Bulk-Out, Interface> on usbus0
umass0:  SCSI over Bulk-Only; quirks = 0x4000
umass0:7:0: Attached to scbus7
da0 at umass-sim0 bus 0 scbus7 target 0 lun 0
da0: <Generic- USB3.0 CRW   -SD 1.00> Removable Direct Access SPC-2 SCSI device
da0: Serial Number 201506301013
da0: 40.000MB/s transfers
da0: 61119MB (125171712 512 byte sectors)
da0: quirks=0x2<NO_6_BYTE>
da1 at umass-sim0 bus 0 scbus7 target 0 lun 1
da1: <Generic- USB3.0 CRW   -SD 1.00> Removable Direct Access SPC-2 SCSI device
da1: Serial Number 201506301013
da1: 40.000MB/s transfers
da1: Attempt to query device size failed: NOT READY, Medium not present
da1: quirks=0x2<NO_6_BYTE>
# mount.exfat /dev/da0s1 /mnt
FUSE exfat 1.2.8
WARN: '/dev/da0s1' is write-protected, mounting read-only.
# cd /mnt
# ls
ls: .: No such file or directory

If I toggle the write protection notch it still fails.

Looking for help. Thanks!
 

Vull

Aspiring Daemon

Reaction score: 369
Messages: 642

I would consider trying Vermaden's automount utility. This is not the same as the base system's automount and you would probably have to build the ports sysutils/exfat-utils and sysutils/fusefs-exfat unless you can find them in the package repositories-- I can't find them in my "lastest" repository for 12.0. I've used Vermaden's automount before; version 1.5.8 is available as a package. 1.5.8 works on FreeBSD-11.2, but doesn't work with FreeBSD-12.0, and so, for 12.0, it has to be upgraded to 1.6.0 or 1.6.1 using the github link. I haven't tried it on an exfat sdcard but I assume it would most likely work, after installing 1.6.0 or 1.6.1 plus exfat-utils and fusefs-exfat.

Or you might be able to use the two exfat ports with whatever else you might be using. When I run pkg search exfat I get nothing from either the "latest" or the "quarterly" repositories for i386 machine architecture so it seems one would have to build them from ports.
 
OP
Y

ybungalobill

Member

Reaction score: 4
Messages: 30

Thank you guys, but your suggestions don't resolve the issue.

I would consider trying Vermaden's automount utility. This is not the same as the base system's automount and you would probably have to build the ports sysutils/exfat-utils and sysutils/fusefs-exfat unless you can find them in the package repositories--
... snip ...

I'm not using the automounter. I already have fusefs-exfat installed and running, and that's what I'm using to mount the card above. I'm not sure how configuring the automounter to call fuse instead of calling fuse manually would solve the issue.

exfat filesystem switches in read-only mode when it detects an unclean dismounting event .
... snip ...

It was mounted in read-only because I toggled the the write-protection notch. If I turn the notch off then it mounts fine without the "read-only" message but still doesn't work (everything past that line is still the same.

The sdcard is written by a camera which uses exfat only, so recommending other filesystems is not a solution. And it's definitely not corrupt. I don't have a Windows box, but a linux one reads the entire thing and writes it perfectly.
 

Criosphinx

Active Member

Reaction score: 50
Messages: 107

sysutils/exfat-utils includes exfatfsck although the man page says:

exfatfsck checks an exFAT file system for errors. Note that it cannot repair corrupted FS,it just reports found errors.

My guess is that the camera puts some header or something that is not 100% compliant with the spec.

I would try checking it on a Windows PC and format it using SD Memory Card Formatter
 
OP
Y

ybungalobill

Member

Reaction score: 4
Messages: 30

Hi, so I've been using testdisk to read exfat cards for a while, therefore this wasn't a critical issue so far. Yet this issue persists, so I gave another shot at trying to fix it.

As it appears the problem is not with the card, nor with exfat. There's something wrong with FUSE in general. I used the sample code from https://man.openbsd.org/fuse_main.3 to compile a simple utility to test fuse... and guess what? It fails in the same way:

Code:
# fuse-test -o debug /mnt
FUSE library version: 2.9.9
nullpath_ok: 0
nopath: 0
utime_omit_ok: 0
unique: 1, opcode: INIT (26), nodeid: 0, insize: 56, pid: 82775
INIT: 7.23
flags=0x00010033
max_readahead=0x00010000
   INIT: 7.19
   flags=0x00000011
   max_readahead=0x00010000
   max_write=0x00020000
   max_background=0
   congestion_threshold=0
   unique: 1, success, outsize: 40
^Z
Suspended
# bg
[1]    fuse-test -o debug /mnt &
# stat /mnt
unique: 2, opcode: GETATTR (3), nodeid: 1, insize: 56, pid: 82916
getattr /
   unique: 2, success, outsize: 120
stat: /mnt: stat: No such file or directory

By now it's 12.1-RELEASE, and needless to say I have fuse_load="YES" in /boot/loader.conf and fusefs_enable="YES" in /etc/rc.conf.
 
Top