Mate 21.10 Pi USB stick can't be backed up using dd

Using the 21.10 Mate Pi image we created a 32Gb USB device to boot and run Ubuntu on our test station using balenaEtcher. Everything works extremely well.
Shutting down the Pi we remove the USB stick to make a backup image of the test station using a i386 PC running Ubuntu Mate. During the process we receive an error reading the device. This also happens trying to use dd in a virtual machine running the latest Ubuntu. Tried running ddrescue on the USB device to create an image thinking there was an actual read error but this also failed with a Unaligned read error.
Then resorted to using gparted to examine the device. Looking at the USB drive with gparted the sectors seemed aligned as they are divisible by eight.
Is there something special that needs to be done when creating a Mate Pi USB drive so that we can back up the system? We posted this question over in Ask Ubuntu but have gotten no responses. Any help resolving this would be appreciated.


sudo dd if=/dev/sdb of=server.img iflag=direct bs=16k status=progress

6248251392 bytes (6.2 GB, 5.8 GiB) copied, 363 s, 17.2 MB/s
dd: error reading '/dev/sdb': Input/output error
382013+0 records in
382013+0 records out
6258900992 bytes (6.3 GB, 5.8 GiB) copied, 416.203 s, 15.0 MB/s


tester@OptiPlex-390:~/Downloads$ sudo ddrescue -d -f -r3 /dev/sdb test.img test.logfile
GNU ddrescue 1.23
Press Ctrl-C to interrupt
ipos: 6259 MB, non-trimmed: 65536 B, current rate: 0 B/s
opos: 6259 MB, non-scraped: 0 B, average rate: 18408 kB/s
non-tried: 25821 MB, bad-sector: 0 B, error rate: 0 B/s
rescued: 6258 MB, bad areas: 0, run time: 5m 39s
pct rescued: 19.51%, read errors: 1, remaining time: 19m
time since last successful read: 0s
Copying non-tried blocks... Pass 1 (forwards)
Unaligned read error. Is sector size correct?


Device Info: Samsung Flash Drive FIT
Partition table: msdos
Heads: 255
Sectors/track: 2
Cylinders: 122856
Total sectors: 62656641
Sector size: 512

MSDOS(fat16) /dev/sda1
First sector: 2048
Last sector: 524287
Total sectors: 522240

ext4 /dev/sda2
First sector: 524288
Last sector: 62656607
Total sectors: 62132320

Update: Using Ubuntu Disk Image Writer we took the Ubuntu Mate Pi image and wrote it to a different Samsung 32Gb USB drive. Brought up the Pi and loaded necessary packages to run the test station. We were able to back up that drive using dd on a VMWare virtual machine(Standard Ubuntu i386.) After running the Pi test station for a day we attempted to back it up. dd is failing with Input/output error again but in a different spot. The original USB failed @ the 6.3 GB mark but the new USB drive is consistently failing @ the 9.3 GB mark. The second USB shows no errors running a file system check.
sudo dd if=/dev/sdb of=/mnt/hgfs/temp_2/generic_test_station_25_Feb_2022.img bs=32k status=progress
9334231040 bytes (9.3 GB, 8.7 GiB) copied, 266 s, 35.1 MB/s
dd: error reading '/dev/sdb': Input/output error
284858+1 records in
284858+1 records out
9334231040 bytes (9.3 GB, 8.7 GiB) copied, 265.78 s, 35.1 MB/s

Is using dd a necessity? I ask because when I think of "disk imaging and restoring" I turn to Disks which MATE comes with. Even if dd is necessary you might want to try Disks to see if it will work or not and provide more info.

Best of luck

can you post, lsblk -f

This is from the test station while it is running(not while the USB drive is being backed up):
lsblk -f
NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINT
loop0 squashfs 4.0 0 100% /snap/core18/2248
loop1 squashfs 4.0 0 100% /snap/core20/1332
loop2 squashfs 4.0 0 100% /snap/core20/1360
loop3 squashfs 4.0 0 100% /snap/icon-theme-yaru-mate/1
loop4 squashfs 4.0 0 100% /snap/core18/2289
loop5 squashfs 4.0 0 100% /snap/snapd/14982
loop6 squashfs 4.0 0 100% /snap/gtk-theme-yaru-mate/6
loop7 squashfs 4.0 0 100% /snap/software-boutique/56
loop8 squashfs 4.0 0 100% /snap/ubuntu-mate-pi/11
loop9 squashfs 4.0 0 100% /snap/ubuntu-mate-welcome/669
loop10 squashfs 4.0 0 100% /snap/ubuntu-mate-welcome/656
sda
├─sda1 vfat FAT16 system-boot 112B-1D85 112.9M 56% /boot/firmware
└─sda2 ext4 1.0 writable 3a0b5159-27f8-4d1b-ad4e-2e88736ea93b 22.1G 24% /

We were using dd as a standardized way to back up the test stations. We back the station up using dd and then take the output image and shrink it using using the pishrink shell. This leaves us with a complete backup image that is only about 8Gb in size.

If your disk is sda, the dd command should take as input file that disk, right?

sudo dd if=/dev/sda

You are seeing the system Pi running. When you shut down the Pi and bring the USB stick over to the Ubuntu VM, once it's mounted it becomes /dev/sdb. If you wanted to see the lsblk command when it is not the running drive I can do that.

John, I don't see any fault with what you're doing. I understand that when system is running disk is sda, when offline and usb inserted, disk becomes sdb. The generic error dd: error reading '/dev/sdb': Input/output error implies something wrong with the usb stick.

I would agree that initially it looks like a disk error but this has happened on two different USB sticks where one had no issues at all at first. Disk checks find no errors on the USB drives and using ddrescue kicks out a "Unaligned read error. Is sector size correct?".
I was hoping that some other type of disk utility could explain why dd is having issues with this as we have used dd in the past two years without issue.