Recent USB failure

Hi,
I got this strange USB behaviour recently ...
Having a single partition with ExtFat this usb device is working as expected .

If I partition it I get this in in dmesg output :

Code:
usb_msc_auto_quirk: UQ_MSC_NO_TEST_UNIT_READY set for USB mass storage device Verbatim Pocket SSD (0x18a5:0x0481)
usb_msc_auto_quirk: UQ_MSC_NO_SYNC_CACHE set for USB mass storage device Verbatim Pocket SSD (0x18a5:0x0481)
usb_msc_auto_quirk: UQ_MSC_NO_PREVENT_ALLOW set for USB mass storage device Verbatim Pocket SSD (0x18a5:0x0481)
usb_msc_auto_quirk: UQ_MSC_NO_TEST_UNIT_READY set for USB mass storage device Verbatim Pocket SSD (0x18a5:0x0481)
usb_msc_auto_quirk: UQ_MSC_NO_START_STOP set for USB mass storage device Verbatim Pocket SSD (0x18a5:0x0481)
ugen0.4: <Verbatim Pocket SSD> at usbus0
umass0 on uhub1
umass0: <Verbatim Pocket SSD, class 0/0, rev 2.10/2.14, addr 7> on usbus0
umass0:  SCSI over Bulk-Only; quirks = 0xc005
umass0:9:0: Attached to scbus9
da0 at umass-sim0 bus 0 scbus9 target 0 lun 0
da0: <Verbatim Portable SSD 0214> Fixed Direct Access SPC-4 SCSI device
da0: Serial Number DD56419003963
da0: 40.000MB/s transfers
da0: 976762MB (2000409264 512 byte sectors)
da0: quirks=0x2<NO_6_BYTE>
(da0:umass-sim0:0:0:0): READ(10). CDB: 28 00 77 3b d2 af 00 00 01 00 
(da0:umass-sim0:0:0:0): CAM status: SCSI Status Error
(da0:umass-sim0:0:0:0): SCSI status: Check Condition
(da0:umass-sim0:0:0:0): SCSI sense: ILLEGAL REQUEST asc:21,0 (Logical block address out of range)
(da0:umass-sim0:0:0:0): Error 22, Unretryable error
(da0:umass-sim0:0:0:0): READ(10). CDB: 28 00 77 3b d2 af 00 00 01 00 
(da0:umass-sim0:0:0:0): CAM status: SCSI Status Error
(da0:umass-sim0:0:0:0): SCSI status: Check Condition
(da0:umass-sim0:0:0:0): SCSI sense: ILLEGAL REQUEST asc:21,0 (Logical block address out of range)
(da0:umass-sim0:0:0:0): Error 22, Unretryable error
(da0:umass-sim0:0:0:0): READ(10). CDB: 28 00 77 3b d2 71 00 00 04 00 
(da0:umass-sim0:0:0:0): CAM status: SCSI Status Error
(da0:umass-sim0:0:0:0): SCSI status: Check Condition
(da0:umass-sim0:0:0:0): SCSI sense: ILLEGAL REQUEST asc:21,0 (Logical block address out of range)
(da0:umass-sim0:0:0:0): Error 22, Unretryable error
(da0:umass-sim0:0:0:0): READ(10). CDB: 28 00 77 3b d2 ae 00 00 01 00 
(da0:umass-sim0:0:0:0): CAM status: SCSI Status Error
(da0:umass-sim0:0:0:0): SCSI status: Check Condition
(da0:umass-sim0:0:0:0): SCSI sense: ILLEGAL REQUEST asc:21,0 (Logical block address out of range)
(da0:umass-sim0:0:0:0): Error 22, Unretryable error
(da0:umass-sim0:0:0:0): READ(10). CDB: 28 00 77 3b d2 af 00 00 01 00 
(da0:umass-sim0:0:0:0): CAM status: SCSI Status Error
(da0:umass-sim0:0:0:0): SCSI status: Check Condition
(da0:umass-sim0:0:0:0): SCSI sense: ILLEGAL REQUEST asc:21,0 (Logical block address out of range)
(da0:umass-sim0:0:0:0): Error 22, Unretryable error
(da0:umass-sim0:0:0:0): READ(10). CDB: 28 00 77 3b d2 ae 00 00 01 00 
(da0:umass-sim0:0:0:0): CAM status: SCSI Status Error
(da0:umass-sim0:0:0:0): SCSI status: Check Condition
(da0:umass-sim0:0:0:0): SCSI sense: ILLEGAL REQUEST asc:21,0 (Logical block address out of range)
(da0:umass-sim0:0:0:0): Error 22, Unretryable error
(da0:umass-sim0:0:0:0): READ(10). CDB: 28 00 77 3b d2 af 00 00 01 00 
(da0:umass-sim0:0:0:0): CAM status: SCSI Status Error
(da0:umass-sim0:0:0:0): SCSI status: Check Condition
(da0:umass-sim0:0:0:0): SCSI sense: ILLEGAL REQUEST asc:21,0 (Logical block address out of range)
(da0:umass-sim0:0:0:0): Error 22, Unretryable error
(da0:umass-sim0:0:0:0): READ(10). CDB: 28 00 77 3b d2 af 00 00 01 00 
(da0:umass-sim0:0:0:0): CAM status: SCSI Status Error
(da0:umass-sim0:0:0:0): SCSI status: Check Condition
(da0:umass-sim0:0:0:0): SCSI sense: ILLEGAL REQUEST asc:21,0 (Logical block address out of range)
(da0:umass-sim0:0:0:0): Error 22, Unretryable error
(da0:umass-sim0:0:0:0): READ(10). CDB: 28 00 77 3b d2 af 00 00 01 00 
(da0:umass-sim0:0:0:0): CAM status: SCSI Status Error
(da0:umass-sim0:0:0:0): SCSI status: Check Condition
(da0:umass-sim0:0:0:0): SCSI sense: ILLEGAL REQUEST asc:21,0 (Logical block address out of range)
(da0:umass-sim0:0:0:0): Error 22, Unretryable error

I am with latest 14.3-RELEASE-p2 in an HP Z440 workstation.

Although I could keep the USB device with a single partition and working in FreeBSD but I wish to understand what is happening...

Where do I start ?
 
As far as I know this a formal Verbatim SD 1Tb USB device ...

gpart show da0 fails in this last case.


Although
geom disk list gives :
Code:
Geom name: da0
Providers:
1. Name: da0
   Mediasize: 714240 (698K)
   Sectorsize: 512
   Stripesize: 4096
   Stripeoffset: 0
   Mode: r0w0e0
   descr: Verbatim Portable SSD
   lunname: VerbatimPortable SSD    DD56419003963
   lunid: 3044564190039630
   ident: DD56419003963
   rotationrate: 0
   fwsectors: 32
   fwheads : 64

The odd part is that if I format with a single partition everything works.
I had to format it in another OS though ...
 
Interesting.
dmesg gives:
da0: 976762MB (2000409264 512 byte sectors)
So roughly 1TB

But gpart shows:
Mediasize: 714240 (698K)

That's a big difference.

If you are not committed to saving data on the device, you could try the old trick of dd from /dev/zero to the first 4 MB and last 4MB of the device to clear things out and see if gpart works.
 
Could it be the need of some US_QUIRK ?
because as I wrote before ,
If I format the complete device with a single partition,
FreeBSD does work without any problem .

My main idea is to have a bootable partition with FreeBSD or any other OS (20Gb) or so .
And the remaining space for random storage....

Although I have another details:
The partition table is now GPT , while before it was MBR ...

But once the device has more than a single partition it becomes in this state ...

Nonetheless in other OSes ( both win and linux) there is no problem whatsover ...
 
Could it be the need of some US_QUIRK ?
because as I wrote before ,
If I format the complete device with a single partition,
FreeBSD does work without any problem .

My main idea is to have a bootable partition with FreeBSD or any other OS (20Gb) or so .
And the remaining space for random storage....

Although I have another details:
The partition table is now GPT , while before it was MBR ...

But once the device has more than a single partition it becomes in this state ...

Nonetheless in other OSes ( both win and linux) there is no problem whatsover ...
I think the problem is dmesg reports a size of about 1TB, while geom disk command mediasize is a lot different.
What do Windows and Linux say for the device size, not the partition size?
 
Linux and Windows report the 1Tb size ...
At this moment I have 3 partitions.

first 900Gb exfat
100mb EFI (boot ESP)
20 Gb ext4 ( Artix)

My main problem is that I have information on the FreeBSD system in ZFS that I need to copy out to the USB device.

and there is no Live system that can read the ZFS filesystem present in this FreeBSD installation
 
gpart show da0 fails in this last case.
Then the disk doesn't have a partition table and it's been formatted directly, without a partition table. Possible, not uncommon, especially for USB sticks.
At this moment I have 3 partitions.

first 900Gb exfat
100mb EFI (boot ESP)
20 Gb ext4 ( Artix)
This contradicts what you posted previously. It either has a partition table (and would be shown with gpart show da0) or it doesn't.

You said, gpart show da0 failed? Failed how? What error did you get?
 
gpart show da0 reports :
gpart : no such geom :da0

The disk has now a GPT partition table with the aforementioned 3 partitions.

So my question is more like: what is happening here, as other OSes do see this device (aparently) correct...

Yesterday due to the need of persistent installed system i had to redefine the partition table of the device ...

But before It worked perfectly up until the moment that I made multiple partitions ....
I can format it again with a MBR partition table and a single partition and I believe it would work correctly...


Update:​

In another machine with linux this device is correctly identified with no problem whatsoever.
Also in a 3rd machine with a fresh FreeBSD installation the same dmesg output is present and the device is not available.
So I am pointing to some FreeBSD USB default config / quirk needed to this specific device ...

Another hint:
If I startup FreeBSD with the device connected it soft lock ( delays) some seconds the bootup startup.

If I format it with the 1Mb empty space at the start and have a single partition, FreeBSD accepts it correctly if I insert it after the full boot sequence.

geom disk list :

Geom name: da0
Providers:
1. Name: da0
Mediasize: 1024209543168 (954G)
Sectorsize: 512
Stripesize: 4096
Stripeoffset: 0
Mode: r1w1e2
descr: Verbatim Portable SSD
lunname: VerbatimPortable SSD DD56419003963
lunid: 3044564190039630
ident: DD56419003963
rotationrate: 0
fwsectors: 63
fwheads: 255

gpart show da0:
=> 63 2000409201 da0 MBR (954G)
63 1985 - free - (993K)
2048 2000406528 1 fat32 (954G)
2000408576 688 - free - (344K)

So what is going on ?
Any ideas ?
 
How do you format the drive? On what operating system and what command do you use?

In the output of geom disk list notice that not only the Mediasize changed but also fwsectors and fwheads.

If you format the drive the way it was before, show the output of diskinfo -v da0.

When gpart show da0 says that there is no such geom, look in dmesg for any messages that might explain why. More messages will be produced if you boot in verbose mode. Post the output of file -s /dev/da0 for that case.

My hypothesis is that an MBR partition table was written with weird disk geometry (cylinders, heads, sectors) which FreeBSD considered to be invalid.
 
Replying to JordanG :

I format the drive via Gparted ( systemrescue, Manjaro, etc) which as far as I know uses parted;

Related to the dmesg all of them related to the moment where I insert the usb device are on the first post.

Last FreeBSD iterations keep showing the device as not valid although in Linux ( Artix, Manjaro, Systemrescue ) always appears as valid.


diskinfo -v da0 output :
da0
512 # sectorsize
714240 # mediasize in bytes (698K)
1395 # mediasize in sectors
4096 # stripesize
0 # stripeoffset
0 # Cylinders according to firmware.
64 # Heads according to firmware.
32 # Sectors according to firmware.
Verbatim Portable SSD # Disk descr.
DD56419003963 # Disk ident.
umass-sim0 # Attachment
No # TRIM/UNMAP support
0 # Rotation rate in RPM
Not_Zoned # Zone Mode

file -s /dev/da0 simply reports :
/dev/da0: data
 
Calling usbconfig I get:

usbconfig
ugen0.1: <XHCI root HUB Intel> at usbus0, cfg=0 md=HOST spd=SUPER (5.0Gbps) pwr=SAVE (0mA)
ugen1.1: <EHCI root HUB Intel> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
ugen2.1: <EHCI root HUB Intel> at usbus2, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
ugen1.2: <Hub Intel Corp.> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
ugen2.2: <8 channel internal hub Intel Corp.> at usbus2, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
ugen0.3: <TUSB8041 4-Port Hub Texas Instruments, Inc.> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
ugen0.5: <Wheel Mouse Optical Microsoft Corp.> at usbus0, cfg=0 md=HOST spd=LOW (1.5Mbps) pwr=ON (100mA)
ugen0.6: <USB Card Reader Realtek Semiconductor Corp.> at usbus0, cfg=0 md=HOST spd=SUPER (5.0Gbps) pwr=ON (200mA)
ugen0.7: <TUSB8041 4-Port Hub Texas Instruments, Inc.> at usbus0, cfg=0 md=HOST spd=SUPER (5.0Gbps) pwr=SAVE (0mA)
ugen0.2: <Pocket SSD Verbatim, Ltd> at usbus0, cfg=0 md=HOST spd=SUPER (5.0Gbps) pwr=ON (224mA)

Any more ideas ?
how to use the usb_quirks ?

Update:
After some fidling with gparted I get this to work in FreeBSD:

gpart show da0 :
=> 63 2000409201 da0 MBR (954G)
63 20417 - free - (10M)
20480 1863680000 1 fat32 (889G)
1863700480 136708784 - free - (65G)

Lets hope it become stable .
 
Back
Top