Bug#989571: linux-image-5.10.0-0.bpo.3-amd64: Incorrect large USB disk sizing leading to data corruption

2021-06-07 Thread Anton Ivanov

Close please.

The 17G was from trying to blank the drive, which for some reason 
disconnected in the process resulting in a file written in /dev with the 
name sda. From there on the loop and so on. So there was a /dev/sda file 
as a left-over after that. Thanks for pointing me in the right direction 
and apologies.


I am going to continue investigating why I got the data corruption in 
the first place, before I tried to blank it, but it looks like it may 
have been a hardware issue with the original USB-to-ATA bridge.


--
Anton R. Ivanov
https://www.kot-begemot.co.uk/



Bug#989571: linux-image-5.10.0-0.bpo.3-amd64: Incorrect large USB disk sizing leading to data corruption

2021-06-07 Thread Bastian Blank
Control: severity -1 important
Control: tags -1 moreinfo

On Mon, Jun 07, 2021 at 08:43:21PM +0100, Anton Ivanov wrote:
> Version: 5.10.13-1~bpo10+1

This is not the latest version. 5.10.24 (at least) is in buster-backports.

> [801076.291139] scsi host10: uas
> [801076.291557] scsi 10:0:0:0: Direct-Access ASMT 2115 0  
>   PQ: 0 ANSI: 6
> [801076.292065] sd 10:0:0:0: Attached scsi generic sg0 type 0
> [801076.292232] sd 10:0:0:0: [sda] Spinning up disk...
> [801077.321342] ..ready
> [801082.447597] sd 10:0:0:0: [sda] 7814037168 512-byte logical blocks: (4.00 
> TB/3.64 TiB)
> [801082.447600] sd 10:0:0:0: [sda] 4096-byte physical blocks
> [801082.447673] sd 10:0:0:0: [sda] Write Protect is off
> [801082.447674] sd 10:0:0:0: [sda] Mode Sense: 43 00 00 00
> [801082.447832] sd 10:0:0:0: [sda] Write cache: enabled, read cache: enabled, 
> doesn't support DPO or FUA
> [801082.448032] sd 10:0:0:0: [sda] Optimal transfer size 33553920 bytes not a 
> multiple of physical block size (4096 bytes)
> [801082.494646] sd 10:0:0:0: [sda] Attached SCSI disk

So it detects a 4TB disk called sda.  Not a <20GB as you claimed.

> [801150.687429] loop: module loaded
> [801150.815997] EXT4-fs (loop0): mounted filesystem with ordered data mode. 
> Opts: (null)
> [803002.579925] blk_update_request: I/O error, dev loop0, sector 0 op 
> 0x1:(WRITE) flags 0x800 phys_seg 0 prio class 0
> [803002.579960] blk_update_request: I/O error, dev loop0, sector 0 op 
> 0x1:(WRITE) flags 0x800 phys_seg 0 prio class 0

But you mount an unrelated loop0.  Don't do that?  Okay, write requests
fail.

> [803318.984016] EXT4-fs (loop0): mounting ext3 file system using the ext4 
> subsystem
> [803318.984583] EXT4-fs (loop0): mounted filesystem with ordered data mode. 
> Opts: (null)

Again you mount loop0, but now it sees an ext3, not an ext4 on it.

Something on your system creates loop devices.  You have to find it.

Maybe the output of "lsblk" can help to see what you actually have.

Bastian

-- 
There's a way out of any cage.
-- Captain Christopher Pike, "The Menagerie" ("The Cage"),
   stardate unknown.



Bug#989571: linux-image-5.10.0-0.bpo.3-amd64: Incorrect large USB disk sizing leading to data corruption

2021-06-07 Thread Anton Ivanov
Package: src:linux
Version: 5.10.13-1~bpo10+1
Severity: critical
Justification: causes serious data loss

Dear Maintainer,

Large USB drives (example - Seagate 4TB Backup) which work perfectly fine with 
4.19 are identified as incorrect size. In the case of the 4TB sized USB it's 
identified as a 17GB and for some unfatomable reason mounted as loop. The 
result is severe data corruption making all 4TB of data on the drive 
unrecoverable.

Tested with the original USB bridge coming with the drive and after attaching 
the SATA drive inside to an alternative USB bridge. Same result in both cases.

-- Package-specific info:
** Version:
Linux version 5.10.0-0.bpo.3-amd64 (debian-ker...@lists.debian.org) (gcc-8 
(Debian 8.3.0-6) 8.3.0, GNU ld (GNU Binutils for Debian) 2.31.1) #1 SMP Debian 
5.10.13-1~bpo10+1 (2021-02-11)

** Command line:
BOOT_IMAGE=diskless/amd64/vmlinuz-5.10.0-0.bpo.3-amd64 
initrd=diskless/amd64/initrd.img-5.10.0-0.bpo.3-amd64 root=/dev/nfs ip=dhcp 
nfsroot=192.168.3.3:/exports/boot/madding mitigations=off rw  --

** Tainted: S (4)
 * SMP kernel oops on an officially SMP incapable processor

** Kernel log:
[754632.929276] nfs: server 192.168.3.3 OK
[754635.600887] rpc_check_timeout: 443 callbacks suppressed
[754635.600889] nfs: server 192.168.3.3 not responding, still trying
[754635.612996] nfs: server 192.168.3.3 not responding, still trying
[754635.625266] nfs: server 192.168.3.3 not responding, still trying
[754635.625462] nfs: server 192.168.3.3 not responding, still trying
[754635.637374] nfs: server 192.168.3.3 not responding, still trying
[754635.649472] nfs: server 192.168.3.3 not responding, still trying
[754635.661739] nfs: server 192.168.3.3 not responding, still trying
[754635.661922] nfs: server 192.168.3.3 not responding, still trying
[754635.673850] nfs: server 192.168.3.3 not responding, still trying
[754635.686131] nfs: server 192.168.3.3 not responding, still trying
[791938.374623] lxc-bridge0: port 3(tap-opsft2-0) entered blocking state
[791938.374628] lxc-bridge0: port 3(tap-opsft2-0) entered forwarding state
[791938.374654] lxc-bridge0: port 4(tap-opsft3-0) entered blocking state
[791938.374655] lxc-bridge0: port 4(tap-opsft3-0) entered forwarding state
[791938.375075] lxc-bridge0: port 2(tap-opsft1-0) entered blocking state
[791938.375078] lxc-bridge0: port 2(tap-opsft1-0) entered forwarding state
[791938.388241] k8-bridge0: port 2(tap-opsft1-1) entered blocking state
[791938.388243] k8-bridge0: port 2(tap-opsft1-1) entered forwarding state
[791938.388402] k8-bridge0: port 4(tap-opsft3-1) entered blocking state
[791938.388405] k8-bridge0: port 4(tap-opsft3-1) entered forwarding state
[791938.388481] k8-bridge0: port 3(tap-opsft2-1) entered blocking state
[791938.388484] k8-bridge0: port 3(tap-opsft2-1) entered forwarding state
[801076.265404] usb 4-2.4: new SuperSpeed Gen 1 USB device number 5 using 
xhci_hcd
[801076.289933] usb 4-2.4: New USB device found, idVendor=174c, idProduct=55aa, 
bcdDevice= 1.00
[801076.289937] usb 4-2.4: New USB device strings: Mfr=2, Product=3, 
SerialNumber=1
[801076.289939] usb 4-2.4: Product: ASM105x
[801076.289940] usb 4-2.4: Manufacturer: ASMT
[801076.289942] usb 4-2.4: SerialNumber: 
[801076.291139] scsi host10: uas
[801076.291557] scsi 10:0:0:0: Direct-Access ASMT 2115 0
PQ: 0 ANSI: 6
[801076.292065] sd 10:0:0:0: Attached scsi generic sg0 type 0
[801076.292232] sd 10:0:0:0: [sda] Spinning up disk...
[801077.321342] ..ready
[801082.447597] sd 10:0:0:0: [sda] 7814037168 512-byte logical blocks: (4.00 
TB/3.64 TiB)
[801082.447600] sd 10:0:0:0: [sda] 4096-byte physical blocks
[801082.447673] sd 10:0:0:0: [sda] Write Protect is off
[801082.447674] sd 10:0:0:0: [sda] Mode Sense: 43 00 00 00
[801082.447832] sd 10:0:0:0: [sda] Write cache: enabled, read cache: enabled, 
doesn't support DPO or FUA
[801082.448032] sd 10:0:0:0: [sda] Optimal transfer size 33553920 bytes not a 
multiple of physical block size (4096 bytes)
[801082.494646] sd 10:0:0:0: [sda] Attached SCSI disk
[801150.687429] loop: module loaded
[801150.815997] EXT4-fs (loop0): mounted filesystem with ordered data mode. 
Opts: (null)
[803002.579925] blk_update_request: I/O error, dev loop0, sector 0 op 
0x1:(WRITE) flags 0x800 phys_seg 0 prio class 0
[803002.579960] blk_update_request: I/O error, dev loop0, sector 0 op 
0x1:(WRITE) flags 0x800 phys_seg 0 prio class 0
[803017.725341] EXT4-fs (loop0): mounted filesystem with ordered data mode. 
Opts: (null)
[803081.125594] blk_update_request: I/O error, dev loop0, sector 0 op 
0x1:(WRITE) flags 0x800 phys_seg 0 prio class 0
[803081.125635] blk_update_request: I/O error, dev loop0, sector 0 op 
0x1:(WRITE) flags 0x800 phys_seg 0 prio class 0
[803085.522063] EXT4-fs (loop0): mounted filesystem with ordered data mode. 
Opts: (null)
[803239.336895] blk_update_request: I/O error, dev loop0, sector 0 op 
0x1:(WRITE) flags 0x800 phys_seg 0 prio class 0
[803239.336950] blk_update_request: I/O err