External hard-drive keeps ejecting itself

11,062

Solution 1

I'm not sure it applies to this RAID but WD's custom drive software (disable it once you can get your data off) is indicated a few times in this thread, as is disabling hard drive sleep mode, also mentioned recently here.

Energy Saver Preferences | Uncheck put drives to sleep when idle

There are disk diagnostics like smartmontools that report (and can run self-tests) on single disks, if you reach a point where you have to consider checking individually. Standard caveats about not spinning up your RAID set missing a disk / writing to the disk you're testing apply.

Footnote only: It seems unlikely your power is marginal (since an external array of this size should require external power) but I'll include standard procedure to dismiss weak power, bad cables and ports anyway:

  • Another port; ideally on the computer
  • Another USB3.0 cable, or the other technology supported by the array (I see eSATA and USB3 here).
  • Another computer
  • Another power supply

Solution 2

After almost a year, I've managed to find a solution that works. Judging by the number of people who've viewed this question I thought it was worth coming back and updating what I'd found. ǝɲǝɲbρɯͽ's answer is decent advice and props to him for suggesting. I've included it here for simplicity's sake:

  1. Check all cables, ports, power supplies, and machines to ensure it's nothing hardware related. Check everything more than once too, just to be sure.
  2. Turn off any "smart" tools or "efficiency" tools that allow the drives to sleep/go into a low power mode.

The fix that's floating around online about turning off Energy Saver Preferences' "put drives to sleep when idle" doesn't do anything for me - either on or off. Strange but, again, worth a shot.

What I found to work

I've got a 5 bay HDD caddy. There were 5 HDDs in it with the ability for me to set up a hardware RAID (0,1,5,6,10, or JBOD). Format the first physical drive in bay 1 as a single drive (no RAID, and don't use it). Format the next two as a software RAID (or as individual drives) and then the same with the next two.

This has resulted in 8 months of zero down time or disconnections. I'm absolutely positive it's to do with the first drive being in a RAID.

Tl;dr -

  1. There's no quick fix
  2. Check everything (cables, ports, hardware, software)
  3. Turn off any HDD firmware
  4. Try playing with the OS X Energy Saver Preferences pane settings
  5. Format the first physical drive as a single drive

Further info (August 2018)

What once worked temporarily (a year) for me no longer does. I’ve unmarked this answer as correct based on this. A few others have added updates that may work for them, but they don’t for me.

Share:
11,062

Related videos on Youtube

ScottMcGready
Author by

ScottMcGready

Tech from Glasgow #SOreadytohelp

Updated on September 18, 2022

Comments

  • ScottMcGready
    ScottMcGready over 1 year

    I've got a Sharkoon 5 bay RAID station with 5 x 2TB drives in it. I've let my Mac do a software RAID on it but it seems I've ran into a bit of a problem - at very random intervals the drives eject themselves and I get the usual "Disk Not Ejected Properly" error message. Usually there's a large file transfer that causes this to happen and so I decided to investigate and fix. Turns out, there's a bit of an issue with drives like this and the only way it'll work is formatting 4 of the drives as a RAID and leaving the "top" drive (the first drive in the bay) as a standalone unit. I decided to start pulling as much of the data off the drives to start that process but I've now ran into quite a large one.

    There's about 200 Gb of information left on there that I need to transfer off. Every time I try and navigate the drive now (either via Finder or terminal), the drives eject and then reconnect themselves - leaving the data on the drive, giving me the message, then remounting the drive in a few seconds (repeat). My guess is there's something scanning/reading those drives from the initial mount, reading bad data, chucking them for whatever reason, and it remounts. Weird thing is, I managed to get about 500Gb off it initially with it only ejecting rarely.

    I've disabled spotlight and made sure no .Trashes, .DS_Store or similar files are being dumped when traversing but there must be some other "thing" that's looking through/at the drive when it's initially plugged in causing me not to be able to navigate it.

    Just for added information, I've ran the Verify / Repair disk a number of times with no issues (when it actually runs and doesn't eject mid repair...).

    • ScottMcGready
      ScottMcGready almost 6 years
      @fixer1234 none of the answers fully answer the question. I un-accepted my own answer literally a few hours ago because it did not fully answer the question.
    • Oliver Slay
      Oliver Slay about 4 years
      It's a Sharkoon RAID - the manual says it will switch the disks off internally after 5 minutes of inactivity - putting it into sleep mode. So nothing you can do in the Mac will prevent that disconnection. In a PC disks going into sleep mode do not cause the disk to be 'ejected'. The manual doesn't say how to switch off sleep mode. manualslib.com/manual/696859/…
  • Giacomo1968
    Giacomo1968 almost 6 years
    The sad reality is this might just be idiosyncratic to your specific hardware. Could be a cable or connection or even power issues.
  • kworr
    kworr almost 4 years
    Thanks for the help Mike. It's just your answer has no info on how exactly the problem can be fixed. Adding a link is very nice, but in case link content is not available anymore your answer turns useless. If you have some spare time please add a minimal solution description to the answer. Thanks in advance!
  • DavidPostill
    DavidPostill almost 4 years
    Welcome to Super User! Please quote the essential parts of the answer from the reference link(s), as the answer can become invalid if the linked page(s) change.