From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 03D8F1582EF for ; Sun, 16 Feb 2025 09:09:24 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id DF486343131 for ; Sun, 16 Feb 2025 09:09:23 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id 09C4011047E; Sun, 16 Feb 2025 09:08:19 +0000 (UTC) Received: from ciao.gmane.io (ciao.gmane.io [116.202.254.214]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id E2CEE1102CD for ; Sun, 16 Feb 2025 09:08:17 +0000 (UTC) Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1tjadL-0007bw-J1 for gentoo-user@lists.gentoo.org; Sun, 16 Feb 2025 10:08:15 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: gentoo-user@lists.gentoo.org From: Nuno Silva Subject: [gentoo-user] Re: problem formatting new 256 GB USB stick Date: Sun, 16 Feb 2025 09:08:10 +0000 Message-ID: References: <5062708.0VBMTVartN@rogueboard> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply Mime-Version: 1.0 Content-Type: text/plain User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) X-Archives-Salt: f6eaedfd-4cdf-4f5e-8f3c-2a97b045030a X-Archives-Hash: 164ede38e2de8d72edc42e802bd49495 On 2025-02-16, Philip Webb wrote: > 250215 Michael wrote: >> On Saturday 15 February 2025 11:50:23 Greenwich Mean Time Nuno Silva wrote: >> > On 2025-02-15, Philip Webb wrote: >> > > Recently, I bought 2 new Kingston Exodia 256 GB USB sticks >> > > from Canada Computers, the store in Toronto I've used for 25 yr . >> > > With many previous new USB sticks of sizes <= 128 GB >> > > & which came with a VFat filesystem, >> > > I simply repartitioned them using Fdisk, which created a Linux partition >> > > & then used 'mke2fs' to format them with an Ext2 filesystem. >> > > >> > > This time, something has gone wrong : >> > > root:538 ~> mke2fs /dev/sdb1 >> > > mke2fs 1.47.0 (5-Feb-2023) [...] >> > > Writing superblocks and filesystem accounting information: >> > > mke2fs: Input/output error while writing out and closing file system [...] >> > > Has anyone else encountered this ? Does anyone have suggestions ? >> > >> > Are there kernel error or warning messages when this happens? >> >> An ext2fs with 4K block size has a maximum filesystem size limit of 16TiB. >> Your 256GB drive will not experience a formatting problem because of its size. >> >> Formatting a 256GB USB drive, especially if it is a USB 3.0 or later spec, >> should not take hours, but minutes if not seconds. > > See listing below. My notes tell me that in many previous cases, > it has taken these rates to format : 2 : 6 min/GB ; 3 : 1,8 min/GB ; > today, it took 2 h 51 m to format a 64 GB partition (mainly inodes). > >> Assuming there was no power cut or interruption to the formatting operation, >> the error has the smell of a hardware problem, >> hence dmesg should reveal if something went wrong with the device. >> You can try reformatting the USB drive, >> while keeping an eye on the output of 'dmesg -W'. > > Here's the output of the formatting + 'dmesg -W' ; > I used a different port, which is known to behave properly, > + the other stick now re-partitioned to offer a 64 GB partition : > > root:554 ~> t ; mke2fs /dev/sdb1 ; t > 2025-02-15 Sat 17.57.46 > mke2fs 1.47.0 (5-Feb-2023) > Creating filesystem with 16777216 4k blocks and 4194304 inodes > Filesystem UUID: 93b5ff29-fe5d-48e5-85b0-35b12bee226e > 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: mke2fs: Input/output error while writing out and closing file system > 2025-02-15 Sat 20.48.04 > > dmesg 250215 21:12 : no messages while writing inode tables ; > different 3.0 port normally used without problem by scanner ; > 'ls /dev' shows /dev/sdb sdb1 sdb2 sdb3 sdb4 still listed ; > stick is still in the port > > root:635 ~> dmesg -W > [2023143.202399] usb 10-2: USB disconnect, device number 2 > [2023143.210193] blk_print_req_error: 716 callbacks suppressed > [2023143.210196] device offline error, dev sdb, sector 95422464 op 0x1:(WRITE) flags 0x800 phys_seg 1 prio class 2 > [2023143.210202] buffer_io_error: 1328 callbacks suppressed > [2023143.210203] Buffer I/O error on dev sdb1, logical block 11927552, lost async page write > [2023143.210218] device offline error, dev sdb, sector 95422472 op 0x1:(WRITE) flags 0x100000 phys_seg 1 prio class 2 [...] > [2023143.210401] device offline error, dev sdb, sector 97257472 op 0x1:(WRITE) flags 0x800 phys_seg 2 prio class 2 > [2023143.926864] usb 10-2: new SuperSpeed USB device number 3 using xhci_hcd > [2023143.946392] usb 10-2: New USB device found, idVendor=0951, idProduct=1666, bcdDevice= 1.10 > [2023143.946397] usb 10-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3 > [2023143.946400] usb 10-2: Product: DataTraveler 3.0 > [2023143.946402] usb 10-2: Manufacturer: Kingston > [2023143.946404] usb 10-2: SerialNumber: E0D55EA57410E8B189D80112 > [2023143.946819] usb-storage 10-2:1.0: USB Mass Storage device detected > [2023143.946993] scsi host12: usb-storage 10-2:1.0 > [2023144.950983] scsi 12:0:0:0: Direct-Access Kingston DataTraveler 3.0 PMAP PQ: 0 ANSI: 6 > [2023144.951249] sd 12:0:0:0: Attached scsi generic sg1 type 0 > [2023144.951349] sd 12:0:0:0: [sdb] 484540416 512-byte logical blocks: (248 GB/231 GiB) > [2023144.951913] sd 12:0:0:0: [sdb] Write Protect is off > [2023144.951917] sd 12:0:0:0: [sdb] Mode Sense: 45 00 00 00 > [2023144.952478] sd 12:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA > [2023145.369087] sdb: sdb1 sdb2 sdb3 sdb4 < > > [2023145.369453] sd 12:0:0:0: [sdb] Attached SCSI removable disk > > I can't make sense of the "USB disconnect" at the beginning > nor the "Attached SCSI removable disk" at the end : > I didn't touch anything during the whole process & have no removable > disks. > >> If both of these sticks are behaving the same way, >> it could be the port on your PC which has a problem. >> You can try using a different USB port >> to eliminate this causing the formatting failure. > > I used the port normally used by my scanner with no problems. > The behaviour is the same. The device disconnected and then reconnected, this hopefully means there is nothing wrong with the flash stick itself, that you just have to figure out what is disconnecting it: lack of power, bad cable (if applicable), usb power saving... I've seen USB3 devices be very unstable when connected directly to some USB ports. Adding a (USB extension, all of this with USB A) cable solved the issue on the machine I saw that on. But that's probably not the case, unless what you're seeing is mostly reproducible but random in how long it takes to manifest (i.e. time between mkfs and the first disconnect message in the kernel log). -- Nuno Silva