Machine : amd64
I put a ~3.7TiB hard disk into an external enclosure and
connected it with USB. Depending on details described below,
either the kernel panics a few minutes later, or I'm simply
unable to read the disk.
I experimented with a few different combinations of enclosure,
disk and kernel. I've only included detailed information about
one combination; let me know if you'd like others.
Note: I'm using 6.7 stable. I did try with a snapshot bsd.rd,
and was able to reproduce the read failure but not the panic.
Note that 6.7 stable's bsd.rd doesn't panic either. I don't know
why bsd.rd behaves differently. Let me know if you'd like me to
try setting up a real snapshot installation so I can test a more
Note: I don't have the disk attached right now. sendbug's
automatic dmesg won't include it.
1. One particular combination, in detail.
Kernel: Default 6.7-stable SMP kernel, single user mode (boot
Disk size: About 3.7TiB
External USB enclosure: StarTech UNI3510U2E
I've attached photos of the console scrollback: see main_0.jpg,
Immediately after I plug in the disk, I see console messages
about umass0, scsibus5 and sd2.
~28 seconds later, I saw "umass0: Invalid CSW: tag 55 should be
56" and "umass0: Phase Error, residue = 0". It's not always 55
and 56. Sometimes the Phase Error message appears more than
once., after a delay.
About 15 seconds after that, I ran "fdisk sd2". The command
hanged. Note: the kernel still panics even if I don't run that
command; this is just my way to see if I can read the disk.
About a minute after that, the kernel panics. See attached
main_*.jpg. The panic message is
"panic: ehci_device_clear_toggle: queue active"
Variations I've tried
* Without single user mode: similar to above.
* Booting /bsd.sp: similar to above.
* Booting /bsd.rd: No kernel panic, but I still see the
"Invalid CSW" and "Phase Error" messages. "fdisk sd2" hangs
for a while and eventually returns with "fdisk: Can't read
* Booting a snapshot bsd.rd from today: similar to the -stable
* A smaller disk (about 750 GB). Works without a problem.
* A different USB enclosure (brand "Consus"; let me know if
you'd like more detail). I still wasn't able to read the
disk, but the kernel didn't panic. The output of "fdisk sd2"
is "Not Found"; I never saw this with the Startech enclosure.
I've attached a console photo: see different_enclosure.png.
Here, you see two working fdisk outputs for a smaller disk,
followed by what happens when I try to run fdisk after
plugging in a large disk.
* Having the disk already plugged in before boot: I see a
kernel panic during boot. (I'm not 100% sure I'm remembering
that right. Let me know if you'd like me to confirm that's
Put a large hard disk into a USB enclosure and plug it into an
Symptoms: the disk cannot be read. Depending on the details,
the kernel may panic after a few minutes.
I don't know a real fix. A smaller disk seems to work. I
haven't tried connecting directly with SATA; hopefully that
would work too.
Re: Kernel panic or read failure after connecting large external USB disk
> * A different USB enclosure (brand "Consus"; let me know if
> you'd like more detail). I still wasn't able to read the
> disk, but the kernel didn't panic. The output of "fdisk sd2"
> is "Not Found"; I never saw this with the Startech enclosure.
> I've attached a console photo: see different_enclosure.png.
> Here, you see two working fdisk outputs for a smaller disk,
> followed by what happens when I try to run fdisk after
> plugging in a large disk.
Actually, I discovered this enclosure can't handle disks this large.
When I plug it into a Linux system, the disk size is reported as 1.7 TiB.
(On the other hand, Linux was perfectly happy to treat it as a
functioning 1.7TiB drive; I created a filesystem on it without issue
before noticing the wrong size. So, it may still be interesting that
OpenBSD can't read the drive through this enclosure either.)