8 votes

Please help me understand and manage external hdd sleep

I have an external drive (3.5" hdd, SATA) in an enclosure (usb 3) (purchased separately), connected to a thunderbolt dock (OWC) connected alternately to an iMac and a macbook pro. The HDD goes to sleep, and causes problems. Freezes, weird internet access problems, kernel panics.

I have done some research, and can't seem to figure out:

how to know whether it is the drive, enclosure, or computer causing the sleep, although, fiddling with various settings on the mac seemed to have no effect, although it may have increased my battery usage :(

how to adjust settings on the drive, or in the enclosure.

How to determine what the sleep behavior of prospective drives will be.

As a workaround, I tried to write a zsh script to touch the drive ever few seconds. This kinda worked, but was a struggle to figure out appropriate permissions issues and how to make it run automatically.

I welcome all guidance, pointers to resources, clarifications, incantations, well-wishes.

5 comments

  1. [3]
    cfabbro
    (edited )
    Link
    Make & model number of the drive, enclosure, and dock? That would help narrow it down when it comes to google searches. I'm not very familiar with macOS, so I likely can't help you on the software...

    Make & model number of the drive, enclosure, and dock? That would help narrow it down when it comes to google searches.

    I'm not very familiar with macOS, so I likely can't help you on the software side, if that's the cause. But just as general tech support advice, I would recommend trying to remove the variables one by one, in order to identify the culprit. That's what I do for most tech support issues I can't find a solution on google for.

    E.g. In this instance, see if the same issue occurs with another SATA drive (if you have one handy) in the same enclosure. If it does, remove the drive from the enclosure, and plug it into the dock using a SATA to USB adapter (make sure it supports 3.5" drives, since they require external power). If it still happens, try using a different dock (if you have one handy) or by plugging the drive directly into the iMac. If it still happens, it's probably something in the OS.

    p.s. That's the thorough approach, but you could probably just start by buying the powered SATA to USB adapter and plugging the HDD directly into the iMac. If the issue persists, then it's either the HDD or something in the OS. If it doesn't persist then it's likely your enclosure or dock. My money would be on the enclosure, BTW, since a lot of them come with built-in, poorly designed, power saver / auto sleep bullshit.

    7 votes
    1. [2]
      NoblePath
      Link Parent
      That’s a great analysis and I thank you. A better worded question would have saved you the trouble. It is definitely the enclosure dock combo which causes kernel panics. The enclosure connected...

      That’s a great analysis and I thank you. A better worded question would have saved you the trouble.

      It is definitely the enclosure dock combo which causes kernel panics. The enclosure connected directly to mac results in “ekect before disconnection” errors. Research suggests this is a faitly commin problem amon external enclosures, potentially resolved by using usb 3.1 gen 2 usb-c connections.

      I guess my question is more about how to identify devices before purchase regarding their sleep behavior, more specifically finding devices which won’t exhibit this issue.

      1 vote
      1. cfabbro
        (edited )
        Link Parent
        Ah, okay. To identify enclosures that have a built-in sleep mode that will potentially override the system settings and cause problems... about the only thing you can do is google the make/model,...

        Ah, okay. To identify enclosures that have a built-in sleep mode that will potentially override the system settings and cause problems... about the only thing you can do is google the make/model, read all their marketing BS, and dig into their spec sheets (if they provide any). If you see a mention of auto sleep mode, power/energy saving features, or an "intelligent" or "smart" management chip, you probably want to avoid it.

        p.s. If you're looking for enclosure recommendations, you could try asking on /r/datahoarder, but they mostly deal with multi-drive ones so might not be able to help you. And as for myself, IME most Sabrent enclosures/docking stations are pretty simple, don't have any of that BS, and so they might be worth looking into.

        2 votes
  2. [2]
    simplify
    (edited )
    Link
    I have an OWC USB-C enclosure for an SSD that caused problems when my Mac Mini went to sleep. I've "solved" it by disabling "put hard disks to sleep when possible" in Settings > Energy Saver. My...

    I have an OWC USB-C enclosure for an SSD that caused problems when my Mac Mini went to sleep. I've "solved" it by disabling "put hard disks to sleep when possible" in Settings > Energy Saver. My actual solution is going to be just getting rid of the OWC enclosure, because I think it's garbage. I used to believe OWC was a decent brand, but this "premium" enclosure does not feel premium at all and it's fairly slow. I'm just going to use my fileserver for extra storage on the Mini, which is what I should have done in the first place.

    EDIT: Just an addendum to this comment, because it made me start running some tests on my OWC enclosure. As it turns out, it was my Anker USB-C cable that was causing the slowness. Both the Anker and an Apple USB-C cable yielded ~40MB/s write / ~35MB/s read. However, when using the USB-C cable that came with the enclosure, speeds jumped much higher to ~800MB/s write / ~370MB/s read. Looking into the Anker cable I was using, it's only rated for 60 MB/s(!) because it's primarily marketed as a charging cable. So chalk this one up to my own idiocy. I'm still not pleased with the chintzy build quality of the enclosure, but my speed problem here was the cable.

    5 votes
    1. teaearlgraycold
      Link Parent
      My vote is on the enclosure as well. It’s the part that has the lowest barrier to entry for manufacturing, but it’s expensive to actually test it with all of the possible drives you could put in...

      My vote is on the enclosure as well. It’s the part that has the lowest barrier to entry for manufacturing, but it’s expensive to actually test it with all of the possible drives you could put in it. And if you’re making an enclosure because it’s cheap to make you’ll skimp on testing.

      My recommendation is to buy an “all in one” solution with a drive in a bespoke enclosure from a good manufacturer. Western Digital should be a reasonable quality bar. I’m sure they aren’t perfect but they have a good reputation. It’s much easier to test when you have 1 drive and 1 enclosure combo.

      1 vote