USB devices are not happy (sometimes)

Developer discussions.

USB devices are not happy (sometimes)

Postby haer22 » Thu May 08, 2014 7:27 am

I do not have a Hackintosh, just a miniMac (16GB, i5) so my external drives are connected via USB. Works fine most of the time.

BUT sometimes something happens with the USB bus or whatever with the result that the disks gets renumbered and the ZFS detects a lot of Read and Write errors and stops. It happens more often if I remove or add a USBdevice, like a mouse, but sometimes it just "happens" :-(

When it happens and zfs "screams" the only remedy out of it seems to be a reboot. Export does not work and replace is non-viable as there are more than one disk (usually) FAULTed.

It "never" happens on HFS, or maybe I see it more now when I am setting up a multi disk server.

I assume that the problem does not occur with only "internal" disks, or? But only Hackintoshes has several internal disks whereas Apple-toshes must have external.

Can ZFS do something more intelligent when there is a Read/Write failure and check if it has been renumbered? Or something?
haer22
 
Posts: 123
Joined: Sun Mar 23, 2014 2:13 am

Re: USB devices are not happy (sometimes)

Postby haer22 » Thu May 08, 2014 7:35 am

I just had a look at the Road Map and see this issue listed there. Sounds like it will be a while, or?



Handle disk renumbering[edit]
Labels: Enhancement
Description: ZFS needs to be able to recognize a device as happy and present even if it is unplugged, then replugged in and assigned a new disk#s# number by OS X. Currently ZFS will think the disk has gone away, and the pool has become degraded.
Status: Needs a design
Milestone: 1.4.x
Issue: https://github.com/openzfsonosx/zfs/issues/167
Blocked by: Implement the other 57% of vdev_disk.c.
Notes: No design decided on yet. ZEVO used the GPT partition UUIDs but this is a non-solution since file vdevs do not have partitions, and because Core Storage does not permit partitioning. It's worth noting that this exact same problem affects ZFS on Linux when the user is relying on /dev/sd[a-z] nodes, which can end up re-lettered when a drive is unplugged and replugged in. This is less of an issue for ZFS on Linux because they have alternate ways of specifying devices (e.g., /dev/disk/by-id) which are unavailable on OS X. We will probably need some sort of equivalent.
haer22
 
Posts: 123
Joined: Sun Mar 23, 2014 2:13 am

Re: USB devices are not happy (sometimes)

Postby Brendon » Thu May 08, 2014 12:00 pm

haer22,

The common wisdom is that ZFS should not be used on USB 2 devices. There are plenty of people saying that on the web, search goggle. The reasons are never specific, but usually are oriented around the nature of USB IDE controllers and HDDs. Reputedly they tend to misrepresent data status, which can lead to a reduction in the effectiveness of the data integrity features of the filesystem. Having said that many people do use USB and are happy enough with it. One of my disks is on USB and apart from the fact that its slow, I don't really have a problem with it.

Can you please define "Screams" a bit better. I don't think that anybody is working on your issue at all. Can you please raise an issue in github describing exactly what you experience.

In the mean time I'm going to issue doctors advice...Patient to Doctor -> "Doctor when I <insert activity here>, my <insert appendage name here> hurts, what shall I do?" Doctor to patient -> "Don't do <insert activity here>". In other words unless and until we figure out whatever your problem is, please stop mucking around with your USB bus, clearly whatever you are doing is causing a problem.

Cheers
Brendon

haer22 wrote:I just had a look at the Road Map and see this issue listed there. Sounds like it will be a while, or?



Handle disk renumbering[edit]
Labels: Enhancement
Description: ZFS needs to be able to recognize a device as happy and present even if it is unplugged, then replugged in and assigned a new disk#s# number by OS X. Currently ZFS will think the disk has gone away, and the pool has become degraded.
Status: Needs a design
Milestone: 1.4.x
Issue: https://github.com/openzfsonosx/zfs/issues/167
Blocked by: Implement the other 57% of vdev_disk.c.
Notes: No design decided on yet. ZEVO used the GPT partition UUIDs but this is a non-solution since file vdevs do not have partitions, and because Core Storage does not permit partitioning. It's worth noting that this exact same problem affects ZFS on Linux when the user is relying on /dev/sd[a-z] nodes, which can end up re-lettered when a drive is unplugged and replugged in. This is less of an issue for ZFS on Linux because they have alternate ways of specifying devices (e.g., /dev/disk/by-id) which are unavailable on OS X. We will probably need some sort of equivalent.
Brendon
 
Posts: 286
Joined: Thu Mar 06, 2014 12:51 pm

Re: USB devices are not happy (sometimes)

Postby haer22 » Fri May 09, 2014 2:16 am

I only run USB3. I also read the plentiful advice about not using USB but as I have a miniMac and not a hackintosh, I have to.

You said "USB 2", does that mean that USB3's reputation is better or maybe people have not made the distinction yet?

Today (or Monday) I will get my ICY BOX enclosure with eSATA, I just got a Akitio Thunder Dock with eSATA so hopefully my USB problems will go away. That solution seems on paper very good and is a lot cheaper then Thunderbolt boxes.

Hehe, yes Doc :-) I have tried to leave them alone. But sometimes "something" happens even if I have not touch the stuff for hours (I am sleeping). And by "something" (and "screams") I mean that when I do a spool status it looks like (not authentic):

Code: Select all
   NAME                      STATE     READ WRITE CKSUM
   zeus                      FAULTED     0     0     4
     raidz1-0                FAULTED     0     0     8
       disk9s2               ONLINE       98     150     0
       disk8s2               ONLINE       123    56     0
       disk6s2               ONLINE       0     0     0
       disk10s2              ONLINE       0     0     0
   logs
     disk3s4                 ONLINE       0     0     0
   cache
     disk3s5                 ONLINE       0     0     0

i.e. a lot of Read/Write errors dues to device being renumbered by the OS. The only remedy I have found is to reboot and re-import.

By Monday I hope to have the complexity of my set-up reduced quite a bit and if something happens then, I should be able to come back with a shorter list of possible triggers. If everything works fine, I will come back and say that as well of course.
haer22
 
Posts: 123
Joined: Sun Mar 23, 2014 2:13 am


Return to OpenZFS on OS X Development

Who is online

Users browsing this forum: No registered users and 12 guests

cron