You might try the console. It could give a hint as to why the disks are changing state.
Tried this, but didn't really see anything obvious correlated. There's some stuff about power but nothing about usb, mounting, unmounting, spin up/down, etc. Here's what I see that *might* be meaningful (snipped out irrelevant stuff about bluetooth, etc.) around the time the drive spins down:
Code:
default 18:17:37.556953-0500 powerd stored ts 1642183848, current ts 1642202257
default 18:17:37.622484-0500 PowerUIAgent Handling data dictionary: <private>
default 18:17:37.622874-0500 PowerUIAgent Called for battery level=100, externalConnected=1
default 18:17:37.663109-0500 PerfPowerServices NetworkUsage outcome has payload size: 151
default 18:17:37.770075-0500 powerd posted 'com.apple.system.powermanagement.poweradapter'
default 18:17:37.770188-0500 powerd stored ts 1642183848, current ts 1642202257
default 18:17:37.897136-0500 sharingd Wi-Fi power changed (interface on: YES)
default 18:17:38.588849-0500 powerd stored ts 1642183848, current ts 1642202258
default 18:17:38.591960-0500 PerfPowerServices Flush cache start with Reason: Cache Size on Queue:<private>
default 18:17:38.594506-0500 PowerUIAgent Handling data dictionary: <private>
default 18:17:38.594810-0500 PowerUIAgent Called for battery level=100, externalConnected=1
default 18:17:38.996879-0500 mDNSResponder mDNSPlatformSetAllowSleep Destroying NoIdleSleep power assertion
default 18:17:38.997313-0500 powerd Process mDNSResponder.459 Released MaintenanceWake "mDNSResponder:maintenance" age:00:00:02 id:55834616828 [System: PrevIdle DeclUser kDisp]
default 18:17:38.997378-0500 powerd updateAppSleepStates: Setting app nap state to false for 459 because all assertions are released
One possible explanation would be that macOS tries to save energy by powering down (but not off) the USB port when it’s not actively used. That might make the USB controller of the enclosure to think it’s being disconnected and tell the hard drive to shut down.
The System Information.app gives some insight in the USB section about the Current available/necessary to the connected peripheral.
From Terminal the same information can be obtained with:
system_profiler SPUSBDataType
and for the current power state
pmset -g powerstate
The values in the plists are set by System Preferences or pmset.
OK, tried this and the first command shows that the hard drive is plugged into USB ports using driver AppleUSBXHCIFL1100. Calling pmset -g powerstate | grep AppleUSBXHCIFL1100 in a loop and waiting for the drives to spin down, I see this:
Code:
18:13:23 ================================
AppleUSBXHCIFL1100 3 3 USEABLE
AppleUSBXHCIFL1100 3 3 USEABLE
AppleUSBXHCIFL1100 3 3 USEABLE
AppleUSBXHCIFL1100 3 3 USEABLE
18:13:32 ================================
AppleUSBXHCIFL1100 1 1 None
AppleUSBXHCIFL1100 1 1 None
AppleUSBXHCIFL1100 1 1 None
AppleUSBXHCIFL1100 1 1 None
18:13:35 ================================
AppleUSBXHCIFL1100 3 3 USEABLE
AppleUSBXHCIFL1100 3 3 USEABLE
AppleUSBXHCIFL1100 3 3 USEABLE
AppleUSBXHCIFL1100 3 3 USEABLE
So for whatever reason, those USB ports go from "USEABLE" to "None" state, causing the drive to spin down. Within seconds though, they return to normal. Hence me constantly hearing the drive spin down then back up almost immediately.
I had been running this with the drive plugged into a Thunderbolt dock, but I saw the same behavior with it plugged directly into a USB-C port on the MacBook. Just as a sanity check, I just tried it in the Mac's USB port again, and although the driver is different now (AppleT8103USBXHCI) I see the same behavior with my looping on pmset -g script, where the ports go from USEABLE to None briefly, then back to USEABLE, exactly when the drive spins down and back up.