Re: USB key && NTFS

From: Ian Smith <smithi_at_nimnet.asn.au>
Date: Thu, 18 Jan 2024 03:43:23 UTC
On 17 January 2024 5:16:27 pm AEDT, Matthias Apitz <guru@unixarea.de> wrote:
 > El día martes, enero 16, 2024 a las 05:01:54 -0700, Gary Aitken
 > escribió:

 > > As pointed out by Alexander, it's actually exFAT, not NTFS.  Since
 > > you've already reformatted it, you're ok, but if you want to NOT
 > > reformat a new one in the future, use mount.exfat.  manpage is
 > > man mount.exfat-fuse

 > I haven't reformatted the key. I compiled the port
 > sysutils/fusefs-exfat
 > on my poudriere server, installed it and could mount the key fine.

Another advantage of exFAT is that you can read and write it natively from Android phones with an 'OTG' cable.

 > I used f3write (from the ports) to check the capacity by writing
 > 117 files of 1 GByte and to check the write performance which is very
 > poor.

From your first post:

 > Jan 16 17:50:52 c720-1400094 kernel: da0: 40.000MB/s transfers
 > Jan 16 17:50:52 c720-1400094 kernel: da0: 120000MB (245760000 512 byte sectors)

So either the memstick is only USB2 and/or your port is only USB2; USB3 is ~10 times faster.

 > [guru@c720-1400094 ~]$ mkdir   /mnt/f3
 > [guru@c720-1400094 ~]$ f3write /mnt/f3
 > ..
 > Creating file 115.h2w ... OK!
 > Creating file 116.h2w ... OK!
 > Creating file 117.h2w ... OK!
 > Creating file 118.h2w ... Write failure: Input/output error
 > 
 > WARNING:
 > The write error above may be due to your memory card overheating
 > under constant, maximum write rate. You can test this hypothesis
 > touching your memory card. If it is hot, you can try f3write
 > again, once your card has cooled down, using parameter
 > --max-write-rate=2048
 > to limit the maximum write rate to 2MB/s, or another suitable rate.
 > 
 > Free space: 0.00 Byte
 > Average writing speed: 9.27 MB/s

Looks like it just ran out of space; maybe you haven't accounted for space for a) MBR plus, b) the FAT and c) directories? (see dumpexfat below, and gpart).

 > [guru@c720-1400094 ~]$ df -kh /mnt/f3
 > Filesystem    Size    Used   Avail Capacity  Mounted on
 > /dev/da0s1    117G    117G      0B   100%    /mnt

You may also like to install sysutils/exfat-utils, providing exfatfsck(8), mkexfatfs(8), dumpexfat(8) and exfatlabel(8).

cheers, Ian