public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Michael <confabulate@kintzios.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] problem formatting new 256 GB USB stick : more info
Date: Mon, 17 Feb 2025 12:02:36 +0000	[thread overview]
Message-ID: <4410210.ejJDZkT8p0@rogueboard> (raw)
In-Reply-To: <Z7L-9bnU4w00qYmO@ca.inter.net>

[-- Attachment #1: Type: text/plain, Size: 4441 bytes --]

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 #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2025-02-17 12:04 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-15  7:41 [gentoo-user] problem formatting new 256 GB USB stick Philip Webb
2025-02-15 11:50 ` [gentoo-user] " Nuno Silva
2025-02-15 13:31   ` Michael
2025-02-16  2:37     ` Philip Webb
2025-02-16  9:08       ` Nuno Silva
2025-02-16 13:41         ` Michael
2025-02-16 14:48           ` Wols Lists
2025-02-17 23:12           ` Frank Steinmetzger
2025-02-18 11:53             ` Michael
2025-02-19 12:10               ` Frank Steinmetzger
2025-02-20  9:58                 ` Michael
2025-02-16 22:57       ` [gentoo-user] problem formatting new 256 GB USB stick : more info Philip Webb
2025-02-17  0:17         ` [gentoo-user] " Nuno Silva
2025-02-17  0:39         ` [gentoo-user] " Michael
2025-02-17  3:43           ` Philip Webb
2025-02-17  9:18             ` Philip Webb
2025-02-17 12:02               ` Michael [this message]
2025-02-17 16:33                 ` Stroller
2025-02-17 16:19             ` Wols Lists
2025-02-17 17:16             ` [gentoo-user] " Grant Edwards
2025-02-17 18:12               ` Michael
2025-02-18  3:46                 ` [gentoo-user] Re: problem formatting new 256 GB USB stick : f3 Philip Webb
2025-02-18  4:43                   ` Grant Edwards
2025-02-18  5:53                     ` Philip Webb
2025-02-18  9:13                       ` Frank Steinmetzger
2025-02-18 19:10                         ` [gentoo-user] Re: problem formatting new 256 GB USB stick : alternatives Philip Webb
2025-02-18 21:18                           ` Grant Edwards
2025-02-18 23:25                             ` Michael
2025-02-19 12:16                               ` Frank Steinmetzger
2025-02-19 12:20                           ` Frank Steinmetzger
2025-02-20 10:47                             ` Michael
2025-02-18 14:40                       ` [gentoo-user] Re: problem formatting new 256 GB USB stick : f3 Grant Edwards
2025-02-18 17:00                         ` Grant Edwards
2025-02-18 11:57                   ` Michael
2025-02-18 18:54                     ` [gentoo-user] Re: problem formatting new 256 GB USB stick : glances at gparted Philip Webb
2025-02-18 23:13                       ` Michael
2025-02-19  0:47                         ` Grant Edwards
2025-02-19  1:12                           ` [gentoo-user] alternatives to USB sticks for reliable archiving Philip Webb
2025-02-19  2:28                             ` [gentoo-user] " Grant Edwards
2025-02-19  9:48                             ` [gentoo-user] " Michael
2025-02-19  3:00                         ` [gentoo-user] Re: problem formatting new 256 GB USB stick : glances at gparted eric
2025-02-20 18:18                         ` Dale
2025-02-20 22:40                           ` Frank Steinmetzger
2025-02-20 23:43                             ` Grant Edwards
2025-02-21  8:10                               ` Dale
2025-03-08 22:09                             ` Frank Steinmetzger
2025-03-08 22:48                               ` Dale
2025-03-09 10:31                                 ` Michael
2025-03-10  3:32                                   ` Dale
2025-03-10 13:01                                     ` Frank Steinmetzger
2025-02-17 16:38 ` [gentoo-user] problem formatting new 256 GB USB stick Stroller
2025-02-17 23:06   ` Frank Steinmetzger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4410210.ejJDZkT8p0@rogueboard \
    --to=confabulate@kintzios.com \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox