Benjamin-Loison / nemo

File browser for Cinnamon
GNU General Public License v2.0
0 stars 0 forks source link

Unable to mount HDD 6 TB #15

Open Benjamin-Loison opened 1 month ago

Benjamin-Loison commented 1 month ago

Distribution

Not read.

Package version

Not read.

Frequency

Always

Bug description

With LDLC: PB00466755.

image

image

image

image

image

Steps to reproduce

Not read.

Expected behavior

Not read.

Additional information

No response

Benjamin-Loison commented 1 month ago
df -h

does not return anything relevant.

sudo fdisk -l
...
Disk /dev/sda: 5.46 TiB, 6001175125504 bytes, 11721045167 sectors
Disk model: Expansion Desk  
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Benjamin-Loison commented 1 month ago
sudo gparted
GParted 1.5.0
configuration --enable-libparted-dmraid --enable-online-resize
libparted 3.6
/dev/mapper/nvme0n1p3_crypt: unrecognised disk label

image

image

sudo apt install -y apt-show-versions
Output: ``` Reading package lists... Done Building dependency tree... Done Reading state information... Done The following NEW packages will be installed: apt-show-versions 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 28.9 kB of archives. After this operation, 97.3 kB of additional disk space will be used. Get:1 http://mirrors.ircam.fr/pub/ubuntu/archive noble/universe amd64 apt-show-versions all 0.22.15 [28.9 kB] Fetched 28.9 kB in 0s (225 kB/s) Selecting previously unselected package apt-show-versions. (Reading database ... 962167 files and directories currently installed.) Preparing to unpack .../apt-show-versions_0.22.15_all.deb ... Unpacking apt-show-versions (0.22.15) ... Setting up apt-show-versions (0.22.15) ... ** initializing cache. This may take a while ** Created symlink /etc/systemd/system/timers.target.wants/apt-show-versions.timer → /usr/lib/systemd/system/apt-show-versions.timer. apt-show-versions.service is a disabled or a static unit, not starting it. Processing triggers for man-db (2.12.0-4build2) ... ```

Source: the Unix Stack Exchange answer 6286

apt-show-versions e2fsprogs
e2fsprogs:amd64/noble-updates 1.47.0-2.4~exp1ubuntu4.1 uptodate
e2fsprogs:i386 not installed

I suspect the disk to be NTFS.

Benjamin-Loison commented 1 month ago

On Linux Mint 22 Cinnamon Framework 13 VirtualBox Windows (trust) virtual machine even with 3 USB versions, nothing detected for each in This PC and Disk Management. Note that I paid attention not to mount the HDD on the host.

Should try on a native Windows. Same issue...

As administrator:

diskpart
Microsoft DiskPart version 10.0.22621.1

Copyright (C) Microsoft Corporation.
On computer: PEGASUS_WINDOWS

DISKPART> lis dis

Disk ### Status Size Free Dyn Gpt

Disk 0 Online 931 GB 1024 KB *

Maybe the disk was not correctly plugged.

Benjamin-Loison commented 1 month ago

Maybe I already opened a similar issue at Benjamin_Loison/linux/issues. Does not seem to be the case after a per title review.

Benjamin-Loison commented 1 month ago
sudo mount /dev/sda usb0
mount: /mnt/usb0: wrong fs type, bad option, bad superblock on /dev/sda, missing codepage or helper program, or other error.
       dmesg(1) may have more information after failed mount system call.
Benjamin-Loison commented 1 month ago
dmesg
[76675.271525] sd 0:0:0:0: [sda] 11721045167 512-byte logical blocks: (6.00 TB/5.46 TiB)
[76675.271906] sd 0:0:0:0: [sda] Write Protect is off
[76675.271912] sd 0:0:0:0: [sda] Mode Sense: 4f 00 00 00
[76675.272185] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[76675.272386] sd 0:0:0:0: [sda] Preferred minimum I/O size 512 bytes
[76675.272394] sd 0:0:0:0: [sda] Optimal transfer size 33553920 bytes
[76675.286206] sd 0:0:0:0: [sda] Attached SCSI disk
[76675.551672] EXT4-fs (sda): bad geometry: block count 1465130646 exceeds size of device (1465130645 blocks)
Benjamin-Loison commented 1 month ago
sudo e2fsck /dev/sda
e2fsck 1.47.0 (5-Feb-2023)
The filesystem size (according to the superblock) is 1465130646 blocks
The physical size of the device is 1465130645 blocks
Either the superblock or the partition table is likely to be corrupt!
Abort<y>? no
/dev/sda contains a file system with errors, check forced.
Pass 1: Checking inodes, blocks, and sizes
Inode 38 extent tree (at level 1) could be narrower.  Optimize<y>? yes to all
Pass 1E: Optimizing extent trees
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information

/dev/sda: ***** FILE SYSTEM WAS MODIFIED *****
/dev/sda: 1151814/183144448 files (0.1% non-contiguous), 1349520583/1465130646 blocks
sudo e2fsck /dev/sda
e2fsck 1.47.0 (5-Feb-2023)
The filesystem size (according to the superblock) is 1465130646 blocks
The physical size of the device is 1465130645 blocks
Either the superblock or the partition table is likely to be corrupt!
Abort<y>?
Benjamin-Loison commented 1 month ago

DuckDuckGo and Google search for "bad geometry: block count" "exceeds size of device" differs by 1 "1465130646" "1465130645":

https://www.truenas.com/community/threads/troubleshooting-disk-format-warnings-in-truenas-scale.106051/page-4 https://bugzilla.redhat.com/show_bug.cgi?id=1344102 https://cloud.tencent.com/developer/ask/sof/116468043 https://www.truenas.com/community/threads/error-formating-hdd-from-4k-type-2-protection-to-512.106632/

Benjamin-Loison commented 1 month ago

image

Benjamin-Loison commented 1 month ago

gparted Resize/Move does not seem block precise.

Benjamin-Loison commented 1 month ago

https://www.linuxquestions.org/questions/linux-general-1/cannot-mount-hard-disk-block-count-exceeds-size-of-device-bad-partition-table-880149/:

sudo fsck -b 32768 /dev/sda
fsck from util-linux 2.39.3
e2fsck 1.47.0 (5-Feb-2023)
The filesystem size (according to the superblock) is 1465130646 blocks
The physical size of the device is 1465130645 blocks
Either the superblock or the partition table is likely to be corrupt!
Abort<y>? cancelled!

/dev/sda: ***** FILE SYSTEM WAS MODIFIED *****

/dev/sda: ********** WARNING: Filesystem still has errors **********
sudo sfdisk -d /dev/sda
sfdisk: /dev/sda: does not contain a recognized partition table
sudo fdisk -s /dev/sda
5860522583

gparted Searching for file systems on /dev/sda takes a while.

When I stop it before it finishes:

image

Benjamin-Loison commented 1 month ago

image

image

Benjamin-Loison commented 1 month ago

image

Benjamin-Loison commented 1 month ago
sudo mount -t ext4 -o ro /dev/sda usb0
mount: /mnt/usb0: wrong fs type, bad option, bad superblock on /dev/sda, missing codepage or helper program, or other error.
       dmesg(1) may have more information after failed mount system call.
Benjamin-Loison commented 1 month ago
sudo resize2fs /dev/sda
resize2fs 1.47.0 (5-Feb-2023)
Resizing the filesystem on /dev/sda to 1465130645 (4k) blocks.
resize2fs: Attempt to read block from filesystem resulted in short read while trying to resize /dev/sda
Please run 'e2fsck -fy /dev/sda' to fix the filesystem
after the aborted resize operation.
sudo mount -t ext4 -o ro /dev/sda usb0
mount: /mnt/usb0: wrong fs type, bad option, bad superblock on /dev/sda, missing codepage or helper program, or other error.
       dmesg(1) may have more information after failed mount system call.
dmesg
...
EXT4-fs (sda): bad geometry: block count 1465130646 exceeds size of device (1465130645 blocks)
sudo e2fsck -fy /dev/sda
e2fsck 1.47.0 (5-Feb-2023)
The filesystem size (according to the superblock) is 1465130646 blocks
The physical size of the device is 1465130645 blocks
Either the superblock or the partition table is likely to be corrupt!
Abort? yes
sudo e2fsck -f /dev/sda
e2fsck 1.47.0 (5-Feb-2023)
The filesystem size (according to the superblock) is 1465130646 blocks
The physical size of the device is 1465130645 blocks
Either the superblock or the partition table is likely to be corrupt!
Abort<y>? no
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/sda: 1151814/183144448 files (0.1% non-contiguous), 1349520583/1465130646 blocks
sudo resize2fs /dev/sda
resize2fs 1.47.0 (5-Feb-2023)
Resizing the filesystem on /dev/sda to 1465130645 (4k) blocks.
resize2fs: Attempt to read block from filesystem resulted in short read while trying to resize /dev/sda
Please run 'e2fsck -fy /dev/sda' to fix the filesystem
after the aborted resize operation.
Benjamin-Loison commented 1 month ago
man resize2fs
Output: ``` RESIZE2FS(8) System Manager's Manual RESIZE2FS(8) NAME resize2fs - ext2/ext3/ext4 file system resizer SYNOPSIS resize2fs [ -fFpPMbs ] [ -d debug-flags ] [ -S RAID-stride ] [ -z undo_file ] device [ size ] DESCRIPTION The resize2fs program will resize ext2, ext3, or ext4 file systems. It can be used to enlarge or shrink an unmounted file sys‐ tem located on device. If the file system is mounted, it can be used to expand the size of the mounted file system, assuming the kernel and the file system supports on-line resizing. (Modern Linux 2.6 kernels will support on-line resize for file sys‐ tems mounted using ext3 and ext4; ext3 file systems will require the use of file systems with the resize_inode feature enabled.) The size parameter specifies the requested new size of the file system. If no units are specified, the units of the size para‐ meter shall be the file system blocksize of the file system. Optionally, the size parameter may be suffixed by one of the fol‐ lowing units designators: 'K', 'M', 'G', 'T' (either upper-case or lower-case) or 's' for power-of-two kilobytes, megabytes, gi‐ gabytes, terabytes or 512 byte sectors respectively. The size of the file system may never be larger than the size of the parti‐ tion. If size parameter is not specified, it will default to the size of the partition. The resize2fs program does not manipulate the size of partitions. If you wish to enlarge a file system, you must make sure you can expand the size of the underlying partition first. This can be done using fdisk(8) by deleting the partition and recreating it with a larger size or using lvextend(8), if you're using the logical volume manager lvm(8). When recreating the partition, make sure you create it with the same starting disk cylinder as before! Otherwise, the resize operation will certainly not work, and you may lose your entire file system. After running fdisk(8), run resize2fs to resize the ext2 file system to use all of the space in the newly enlarged partition. If you wish to shrink an ext2 partition, first use resize2fs to shrink the size of file system. Then you may use fdisk(8) to shrink the size of the partition. When shrinking the size of the partition, make sure you do not make it smaller than the new size of the ext2 file system! The -b and -s options enable and disable the 64bit feature, respectively. The resize2fs program will, of course, take care of resizing the block group descriptors and moving other data blocks out of the way, as needed. It is not possible to resize the file system concurrent with changing the 64bit status. OPTIONS -b Turns on the 64bit feature, resizes the group descriptors as necessary, and moves other metadata out of the way. -d debug-flags Turns on various resize2fs debugging features, if they have been compiled into the binary. debug-flags should be com‐ puted by adding the numbers of the desired features from the following list: 2 - Debug block relocations 4 - Debug inode relocations 8 - Debug moving the inode table 16 - Print timing information 32 - Debug minimum file system size (-M) calculation -f Forces resize2fs to proceed with the file system resize operation, overriding some safety checks which resize2fs normally enforces. -F Flush the file system device's buffer caches before beginning. Only really useful for doing resize2fs time trials. -M Shrink the file system to minimize its size as much as possible, given the files stored in the file system. -p Print out percentage completion bars for each resize2fs phase during an offline (non-trivial) resize operation, so that the user can keep track of what the program is doing. (For very fast resize operations, no progress bars may be dis‐ played.) -P Print an estimate of the number of file system blocks in the file system if it is shrunk using resize2fs's -M option and then exit. -s Turns off the 64bit feature and frees blocks that are no longer in use. -S RAID-stride The resize2fs program will heuristically determine the RAID stride that was specified when the file system was created. This option allows the user to explicitly specify a RAID stride setting to be used by resize2fs instead. -z undo_file Before overwriting a file system block, write the old contents of the block to an undo file. This undo file can be used with e2undo(8) to restore the old contents of the file system should something go wrong. If the empty string is passed as the undo_file argument, the undo file will be written to a file named resize2fs-device.e2undo in the directory speci‐ fied via the E2FSPROGS_UNDO_DIR environment variable. WARNING: The undo file cannot be used to recover from a power or system crash. KNOWN BUGS The minimum size of the file system as estimated by resize2fs may be incorrect, especially for file systems with 1k and 2k blocksizes. AUTHOR resize2fs was written by Theodore Ts'o . COPYRIGHT Resize2fs is Copyright 1998 by Theodore Ts'o and PowerQuest, Inc. All rights reserved. As of April, 2000 Resize2fs may be re‐ distributed under the terms of the GPL. SEE ALSO fdisk(8), e2fsck(8), mke2fs(8), lvm(8), lvextend(8) E2fsprogs version 1.47.0 February 2023 RESIZE2FS(8) ```
sudo resize2fs -f /dev/sda
resize2fs 1.47.0 (5-Feb-2023)
Resizing the filesystem on /dev/sda to 1465130645 (4k) blocks.
resize2fs: Attempt to read block from filesystem resulted in short read while trying to resize /dev/sda
Please run 'e2fsck -fy /dev/sda' to fix the filesystem
after the aborted resize operation.
sudo resize2fs -b /dev/sda
resize2fs 1.47.0 (5-Feb-2023)
Please run 'e2fsck -f /dev/sda' first.
Benjamin-Loison commented 1 month ago
sudo sfdisk -luS /dev/sd?
Disk /dev/sda: 5.46 TiB, 6001175125504 bytes, 11721045167 sectors
Disk model: Expansion Desk  
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Benjamin-Loison commented 1 month ago

DuckDuckGo and Google results for "resize2fs: Attempt to read block from filesystem resulted in short read while trying to resize" "Either the superblock or the partition table is likely to be corrupt!" do not seem to help much.

Benjamin-Loison commented 1 month ago
sudo mke2fs -n /dev/sda
mke2fs 1.47.0 (5-Feb-2023)
/dev/sda contains a ext4 file system
    last mounted on /mnt/sata0 on Thu May  2 17:10:27 2024
Proceed anyway? (y,N) y
Creating filesystem with 1465130645 4k blocks and 183144448 inodes
Filesystem UUID: 6397dd91-f06e-4cf5-89c5-c495099a462e
Superblock backups stored on blocks: 
    32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
    4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968, 
    102400000, 214990848, 512000000, 550731776, 644972544
Benjamin-Loison commented 1 month ago
sudo e2fsck -b 32768 -f /dev/sda

output.txt

Benjamin-Loison commented 1 month ago
sudo e2fsck -b 32768 -f /dev/sda

output.txt

Benjamin-Loison commented 1 month ago

https://www.debian-fr.org/t/erreur-gparted-redimensionner/78632/21

time sudo e2fsck -c /dev/sda; echo $?; matrix-commander-rs -m 'e2fsck finished!'
e2fsck 1.47.0 (5-Feb-2023)
Benjamin-Loison commented 1 month ago

https://www.linuxquestions.org/questions/linux-general-1/cannot-mount-hard-disk-block-count-exceeds-size-of-device-bad-partition-table-880149/ https://www.cgsecurity.org/wiki/Advanced_Find_ext2_ext3_Backup_SuperBlock https://www.cgsecurity.org/wiki/TestDisk https://www.truenas.com/community/threads/troubleshooting-disk-format-warnings-in-truenas-scale.106051/page-4 https://bugzilla.redhat.com/show_bug.cgi?id=1344102 https://cloud.tencent.com/developer/ask/sof/116468043 https://www.truenas.com/community/threads/error-formating-hdd-from-4k-type-2-protection-to-512.106632/ https://groups.google.com/g/alt-f/c/nuGn555lzVA/m/960dmg3b99IJ https://ubuntuforums.org/showthread.php?t=1820896

Benjamin-Loison commented 1 month ago

Maybe the issue comes from my adapter? Let us try to access it from a Debian 12 GNOME with SATA.

It works fine...

Benjamin-Loison commented 1 month ago

So can just work from this setup as it detects correctly my Linux Mint 22 Cinnamon Framework 13 M.2 disk:

image