Code Monkey home page Code Monkey logo

Comments (10)

xunmengdeganjue avatar xunmengdeganjue commented on May 30, 2024

hi jazzzz,
Can you show your mount options.

from exfat.

relan avatar relan commented on May 30, 2024

Let's first define the sequence of particular steps (with some diagnostic) that reproduce the issue:

sudo exfatfsck /dev/sdb1
mkdir /tmp/sd
sudo mount.exfat-fuse /dev/sdb1 /tmp/sd
echo hello > /tmp/sd/test
sync /tmp/sd/test
sudo umount /tmp/sd
sudo exfatfsck /dev/sdb1
sudo mount.exfat-fuse /dev/sdb1 /tmp/sd
cat /tmp/sd/test

Please run those commands and paste here the full output.

from exfat.

jazzzz avatar jazzzz commented on May 30, 2024

@relan

exfatfsck 1.1.1
Checking file system on /dev/sdb1.
File system version           1.0
Sector size                 512 bytes
Cluster size                128 KB
Volume size                  59 GB
Used space                   56 GB
Available space            3273 MB
Totally 470 directories and 7435 files.
File system checking finished. No errors found.
FUSE exfat 1.2.2
sync: ignoring all arguments
exfatfsck 1.1.1
Checking file system on /dev/sdb1.
File system version           1.0
Sector size                 512 bytes
Cluster size                128 KB
Volume size                  59 GB
Used space                   56 GB
Available space            3273 MB
Totally 470 directories and 7435 files.
File system checking finished. No errors found.
FUSE exfat 1.2.2
cat: /tmp/sd/test: No such file or directory

from exfat.

jazzzz avatar jazzzz commented on May 30, 2024

@xunmengdeganjue /dev/sdb1 on /tmp/sd type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096)

from exfat.

relan avatar relan commented on May 30, 2024

Please remove this line in fuse/main.c to enable additional logging:

#define exfat_debug(format, ...)

Compile and install mount.exfat-fuse. Then run

sudo mount.exfat-fuse /dev/sdb1 /tmp/sd -d

This command won't detach from your terminal. It will produce a lot of logging, please post it all here after you run those commands from another terminal instance:

echo hello > /tmp/sd/test
sync /tmp/sd/test
cat /tmp/sd/test
sudo umount /tmp/sd

from exfat.

jazzzz avatar jazzzz commented on May 30, 2024
FUSE exfat 1.2.2
FUSE library version: 2.9.4
nullpath_ok: 0
nopath: 0
utime_omit_ok: 0
unique: 1, opcode: INIT (26), nodeid: 0, insize: 56, pid: 0
INIT: 7.23
flags=0x0003f7fb
max_readahead=0x00020000
DEBUG: [fuse_exfat_init].
   INIT: 7.19
   flags=0x00000031
   max_readahead=0x00020000
   max_write=0x00020000
   max_background=0
   congestion_threshold=0
   unique: 1, success, outsize: 40
unique: 2, opcode: GETATTR (3), nodeid: 1, insize: 56, pid: 10853
getattr /
DEBUG: [fuse_exfat_getattr] /.
   unique: 2, success, outsize: 120
unique: 3, opcode: LOOKUP (1), nodeid: 1, insize: 47, pid: 10853
LOOKUP /.Trash
getattr /.Trash
DEBUG: [fuse_exfat_getattr] /.Trash.
   unique: 3, error: -2 (No such file or directory), outsize: 16
unique: 4, opcode: LOOKUP (1), nodeid: 1, insize: 52, pid: 10853
LOOKUP /.Trash-1000
getattr /.Trash-1000
DEBUG: [fuse_exfat_getattr] /.Trash-1000.
   unique: 4, error: -2 (No such file or directory), outsize: 16
unique: 5, opcode: GETATTR (3), nodeid: 1, insize: 56, pid: 24712
getattr /
DEBUG: [fuse_exfat_getattr] /.
   unique: 5, success, outsize: 120
unique: 6, opcode: LOOKUP (1), nodeid: 1, insize: 45, pid: 24712
LOOKUP /test
getattr /test
DEBUG: [fuse_exfat_getattr] /test.
   unique: 6, error: -2 (No such file or directory), outsize: 16
unique: 7, opcode: CREATE (35), nodeid: 1, insize: 61, pid: 24712
create flags: 0x8241 /test 0100664 umask=0002
DEBUG: [fuse_exfat_create] /test 0100664.
   create[94314759843824] flags: 0x8241 /test
getattr /test
DEBUG: [fuse_exfat_getattr] /test.
   NODEID: 2
   unique: 7, success, outsize: 160
unique: 8, opcode: FLUSH (25), nodeid: 2, insize: 64, pid: 24712
flush[94314759843824]
DEBUG: [fuse_exfat_flush] /test.
   unique: 8, success, outsize: 16
unique: 9, opcode: GETATTR (3), nodeid: 1, insize: 56, pid: 10854
getattr /
DEBUG: [fuse_exfat_getattr] /.
   unique: 9, success, outsize: 120
unique: 10, opcode: GETXATTR (22), nodeid: 2, insize: 68, pid: 24712
   unique: 10, error: -38 (Function not implemented), outsize: 16
unique: 11, opcode: WRITE (16), nodeid: 2, insize: 86, pid: 24712
write[94314759843824] 6 bytes to 0 flags: 0x8001
DEBUG: [fuse_exfat_write] /test (6 bytes).
   write[94314759843824] 6 bytes to 0
   unique: 11, success, outsize: 24
unique: 12, opcode: FLUSH (25), nodeid: 2, insize: 64, pid: 24712
flush[94314759843824]
DEBUG: [fuse_exfat_flush] /test.
   unique: 12, success, outsize: 16
unique: 13, opcode: RELEASE (18), nodeid: 2, insize: 64, pid: 0
release[94314759843824] flags: 0x8001
DEBUG: [fuse_exfat_release] /test.
   unique: 13, success, outsize: 16
unique: 14, opcode: GETATTR (3), nodeid: 2, insize: 56, pid: 26733
getattr /test
DEBUG: [fuse_exfat_getattr] /test.
   unique: 14, success, outsize: 120
unique: 15, opcode: OPEN (14), nodeid: 2, insize: 48, pid: 26733
open flags: 0x8000 /test
DEBUG: [fuse_exfat_open] /test.
   open[94314759843824] flags: 0x8000 /test
   unique: 15, success, outsize: 32
unique: 16, opcode: READ (15), nodeid: 2, insize: 80, pid: 26733
read[94314759843824] 4096 bytes from 0 flags: 0x8000
DEBUG: [fuse_exfat_read] /test (4096 bytes).
   read[94314759843824] 6 bytes from 0
   unique: 16, success, outsize: 22
unique: 17, opcode: GETATTR (3), nodeid: 2, insize: 56, pid: 26733
getattr /test
DEBUG: [fuse_exfat_getattr] /test.
   unique: 17, success, outsize: 120
unique: 18, opcode: FLUSH (25), nodeid: 2, insize: 64, pid: 26733
flush[94314759843824]
DEBUG: [fuse_exfat_flush] /test.
   unique: 18, success, outsize: 16
unique: 19, opcode: RELEASE (18), nodeid: 2, insize: 64, pid: 0
release[94314759843824] flags: 0x8000
DEBUG: [fuse_exfat_release] /test.
   unique: 19, success, outsize: 16
unique: 20, opcode: GETATTR (3), nodeid: 1, insize: 56, pid: 26736
getattr /
DEBUG: [fuse_exfat_getattr] /.
   unique: 20, success, outsize: 120
unique: 21, opcode: STATFS (17), nodeid: 1, insize: 40, pid: 26736
statfs /
DEBUG: [fuse_exfat_statfs].
   unique: 21, success, outsize: 96
unique: 22, opcode: FORGET (2), nodeid: 2, insize: 48, pid: 0
FORGET 2/1
DELETE: 2
unique: 23, opcode: FORGET (2), nodeid: 1, insize: 48, pid: 0
FORGET 1/1
unique: 24, opcode: DESTROY (38), nodeid: 0, insize: 40, pid: 0
DEBUG: [fuse_exfat_destroy].
   unique: 24, success, outsize: 16

from exfat.

relan avatar relan commented on May 30, 2024

The log looks perfectly OK. This makes me think that the issue is somewhere else. You've said this SD card works fine under Windows. Was it the same PC, card reader, USB cable and USB port as with Ubuntu?

Could you test a different SD card on this Ubuntu PC to ensure that this behavior persists?

Could you test the problematic SD card on a different GNU/Linux PC with a different card reader and USB cable?

from exfat.

xunmengdeganjue avatar xunmengdeganjue commented on May 30, 2024

You can try to add a option umask=000 to your mount command,like following command line:

   mount.exfat -o umask=000 /dev/sd* /tmp/sd

or

   mount -t exfat -o umask=000 /dev/sd* /tmp/sd

the "*" in the command line represent the real number of you disk.
The day before yesterday,when I porting the exfat module into the OpenWRT I meet the problem too.I just add this option and the USB-storage can be wrote.

from exfat.

jazzzz avatar jazzzz commented on May 30, 2024

The log looks perfectly OK. This makes me think that the issue is somewhere else. You've said this SD card works fine under Windows. Was it the same PC, card reader, USB cable and USB port as with Ubuntu?

It was another PC with the same card reader.

Could you test a different SD card on this Ubuntu PC to ensure that this behavior persists?
Could you test the problematic SD card on a different GNU/Linux PC with a different card reader and USB cable?

I will try as soon as I can.

from exfat.

relan avatar relan commented on May 30, 2024

No reply in 6 months, closing. Feel free to reopen if you have any new info.

from exfat.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.