On Monday 17 February 2025 09:18:45 Greenwich Mean Time Philip Webb wrote:
> 250216 Philip Webb wrote:
> > I'm currently testing a 2.0/1.1 port to write an Ext2 file system.
> 
> it succeeded ! -- results below :
> 
>   root:668 ~> t ; mke2fs /dev/sdb1 ; t
>     2025-02-16   Sun   22.21.11
>   mke2fs 1.47.0 (5-Feb-2023)
>   Creating filesystem with 16777216 4k blocks and 4194304 inodes
>   Filesystem UUID: c5de9632-b97e-4b9c-bfd5-d5c5af785d48
>   Superblock backups stored on blocks:
>     32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
>     4096000, 7962624, 11239424
>   Allocating group tables: done
>   Writing inode tables: done
>   Writing superblocks and filesystem accounting information: done
>     2025-02-17   Mon   02.36.25
> 
> as cb seen, it took  4 h 15 m .

This is an excessively long time for a USB 2.0 port, but thankfully the dmesg 
output no longer showed any disconnections.


> there are differences in output from 'dmesg -W' :
> 
>   root:502 ~> dmesg -W
>   [2125533.280237] usb 5-6.2: reset high-speed USB device number 6 using
> xhci_hcd [2126092.734294] wlp5s0: disconnect from AP 7a:ff:7b:47:c8:7f for
> new auth to 68:ff:7b:47:c9:13 [2126092.829576] wlp5s0: authenticate with
> 68:ff:7b:47:c9:13
>   [2126092.859893] wlp5s0: send auth to 68:ff:7b:47:c9:13 (try 1/3)
[snip ...]

> wlp5s0: authenticate with 7a:ff:7b:47:c8:7f
>   [2132139.154945] wlp5s0: send auth to 7a:ff:7b:47:c8:7f (try 1/3)
[snip ...]

[NOTE: Your wireless appears to be hunting for different AP BSSIDs to connect 
to.  You could stop it doing this and interrupting your internet connection, 
by selecting the AP BSSID with the stronger signal (larger SNR).  Set this in 
your wpa_supplicant.conf to stop it roaming.]


> [2135034.469269] EXT4-fs (sdb1): mounting
> ext2 file system using the ext4 subsystem [2135043.577142] EXT4-fs (sdb1):
> mounted filesystem c5de9632-b97e-4b9c-bfd5-d5c5af785d48 r/w without
> journal. Quota mode: none. 
> [2135217.544967] EXT4-fs (sdb1): unmounting
> filesystem c5de9632-b97e-4b9c-bfd5-d5c5af785d48.
> 
> This seems to narrow the problem down to the USB 3.2 performance,
> which well mb affected by inferior devices on the stick.

Barring some temporary dust/debris in the USB port or USB stick's electrical 
contacts, in my mind the flash controller on these sticks seems highly 
suspect.  I would not trust them with my data, unless I was transferring files 
from one device to another and data loss was not an issue.

USB sticks are manufactured rather cheaply today and sadly their reliability 
leaves much to be desired.  I recall reading somewhere, the flash controller 
on many USB sticks performs no (meaningful) wear levelling at all.


> I was able to mount the partition, edit a file & browse it,
> but re-actions to commands are very slow.
> I'll try to format the other partitions on both sticks,
> tho' a final verdict will take some time (wry grin).

Instead of FAT or ext2 you may want you try formatting with f2fs, which was 
specifically designed for NAND flash devices, or if you want to have 
compatibility with MSWindows OS you can use exfat.  Both are superior to FAT 
and F2FS in particular was designed for NAND flash storage.  I have found F2FS 
to be faster and more reliable than alternatives on USB sticks.  The only 
caution I have taken is to always access it with the same or more recent 
kernels compared to the one I formatted with.

For exfat you'll need to set in your kernel:

~ $ grep EXFAT /usr/src/linux/.config
# DOS/FAT/EXFAT/NT Filesystems
CONFIG_EXFAT_FS=m
CONFIG_EXFAT_DEFAULT_IOCHARSET="utf8"
# end of DOS/FAT/EXFAT/NT Filesystems

For F2FS:

~ $ grep F2FS /usr/src/linux/.config
CONFIG_F2FS_FS=y
CONFIG_F2FS_STAT_FS=y
CONFIG_F2FS_FS_XATTR=y
CONFIG_F2FS_FS_POSIX_ACL=y
CONFIG_F2FS_FS_SECURITY=y
# CONFIG_F2FS_CHECK_FS is not set
# CONFIG_F2FS_FAULT_INJECTION is not set
CONFIG_F2FS_FS_COMPRESSION=y
CONFIG_F2FS_FS_LZO=y
CONFIG_F2FS_FS_LZORLE=y
CONFIG_F2FS_FS_LZ4=y
CONFIG_F2FS_FS_LZ4HC=y
CONFIG_F2FS_FS_ZSTD=y
CONFIG_F2FS_IOSTAT=y
# CONFIG_F2FS_UNFAIR_RWSEM is not set

For storage of (many) text and other compressible files you'd probably want to 
give some forethought to deploying compression, which will further reduce the 
load on the stick.

NOTE: Read up on F2FS and exFAT before you used in production them as there 
are some warnings/considerations specific to them, which may make them 
unsuitable for your use cases.

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to