Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

etaleb

macrumors 6502a
Original poster
Apr 7, 2012
600
27
Guys - my external 18TB HDD connected to my Mac mini usb port keeps making noises when I try to access it. It seems normal but there is some sort of latency when viewing files initially in Finder for the first few second. Once I keep browsing files within it, that works but then if I exit out go back to Finder, same issue exists for the first 1-2 seconds. Even saving a small file takes about 1-2 seconds vs instant if it's saved to the Mac mini SSD. Obviously spinning HDD is slower than SSD but didn't think it's that much slower for small files like this

I checked pmset -g and it's showing disksleep set to 10 mins. Is there any other setting that is overriding this?

Thanks
 
Last edited:
System Settings > Energy Saver > Put hard disks to sleep (toggle off).
If that doesn't change pmset -g, you can set the value of disksleep to 0.
There isn't much else you can do from the software side.

Hardware settings: Many disks park the heads (or some other 'resting' state) automatically. For example my WD HDDs park the heads after 7 seconds. You should scour the web for information on your particular HDD family. If it is of concern to you (lots of parking may be a longevity issue, and can cause delays on unparking) you can take steps to keep the drive more awake - write something to it however often needed.

What drive are we talking about?
 
Recording of noise - https://file.io/7ceebooq5VAJ

Seagate 18TB HardDrive Exos X18 7200RPM SATA 6Gb/s 3.5" Manufacturer Recertified Enterprise HDD (ST18000NM000J) × 1

Purchased from serverpartdeals.com - they have a good reputation for good refurbished hard drives
$189.99​
 
But given that, it does sound normal to my ears.
In that case:
Once I keep browsing files within it, that works but then if I exit out go back to Finder, same issue exists for the first 1-2 seconds.
Delays may be due to the disk having spun down or using some power saving mode in the EXOS. Have a read of https://www.seagate.com/www-content...x18-channel/_shared/en-us/docs/100865854d.pdf which describes three idle states and standby.

Power ConditionDefault delay
Idle_a100 ms
Idle_b2 min
Idle_c4 min
Standby_z15 min

So the delays you are getting may be normal for your drive. I have no idea how fast the drive comes back from Idle_b and Idle_c (I assume it is fast from Idle_a).

If it is the power up from Idle_B or C which is the issue, you need keep the drive active so that it doesn't go into Idle_b/c. I use a background python script which writes to my consumer WD drives every 6 seconds. But some time ago I tried this app http://jon.stovell.info/software/keep-drive-spinning/ which does something similar - the app is just a wrapper around some AppleScript. The help file is included in the download.

Try it and see if it makes any difference. I don't know what side effects it may have for your Exos.
 
Last edited:
With Ventura I have had problems with major delays in finder operations on disks, particularly externals. In some cases it took minutes to open large directories (1000's of files) on a fast external RAID device. Contacted Apple, went to development and was told that they were aware of the problem. Unclear if that is true. Latest Ventura is better, but still experience the issue.
 
Keep disks spinning seems like it'll do the trick but I can't install it - can't be opened because apple cannot validate it for malicious software

Also I can't find hdparm for Mac anywhere

Thx
 
Keep disks spinning seems like it'll do the trick but I can't install it - can't be opened because apple cannot validate it for malicious software
Control-click and open.

Also I can't find hdparm for Mac anywhere
Linux only? Unless Seagate have an app for it, you will not be able to read or write drive internal settings from macOS.
 
Last edited:
Ctrl-click worked, thanks! you really know your stuff but getting this error now

Could not create a valid launch agent.
Could not load the launch agent. Make sure that the correct permissions are set on /Users/etaleb/Library/LaunchAgents
 
Is your username an administrator?

Does the directory /Users/etaleb/Library/LaunchAgents exist?
Does it contain the file info.stovell.KeepDriveSpinning_agent.plist?
 
Directory exists and it has other files but not info.stovell.KeepDriveSpinning_agent.plist
It has files for Logitech, nulana, microsoft

thanks
 
What are the permissions on the folder ~/Library/LaunchAgents? They should allow owner (that is you) read/write.
 
What I saw was this - system - read & write, wheel - read & write, everyone - read
I added my username, then admin to read & write and since I got the same error, I simply switched everyone to read & write and get the same error

I then went to the keep driving spinning.app and did open package contents, then went into macOS folder there and opened keep drive spinning which it opened in Terminal and then chose my Ext drive and get this. I was expecting another notification

"All drives are now allowed to sleep"
 
What I saw was this - system - read & write, wheel - read & write, everyone - read
I think you are looking at /Library/LaunchAgents. The info.stovell.KeepDriveSpinning_agent.plist goes into ~/Library/LaunchAgents which should have permissions User (you) r/w, group (staff) read only, everyone read only.
 
I did finder - go to folder and chose ~/Library and then. right clicked on LaunchAgents to see permissions. I wasn't listed so I added me in. I now see the file info.stovell.KeepDriveSpinning_agent.plist Is in the Launchagents folder

Got it to run and it gave message - The following drives will be kept awake: 18Tb External HDD

Then I go to diagnostics and get this report which seems to indicate it's not working right or maybe it is working fine based on the last line in the report?


Result:
-------
The Keep Drive Spinning launch agent for External 18TB HDD is not working correctly.
The reason for the failure could not be determined automatically.
The diagnostic information below may yield a clue.


Details:
--------
OS version:
10.16

Volume info:
Name: External 18TB HDD
Path: /Volumes/External 18TB HDD
Format: APFS format

Current date:
2023-06-05 19:52:09 EDT

Contents of hidden file:
2023-06-05 19:51:41 EDT

Launch agent path:
/Users/etaleb/Library/LaunchAgents/info.stovell.KeepDriveSpinning_agent.plist

Launch agent status:
- 1 info.stovell.KeepDriveSpinning_agent

Launch agent contents:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>info.stovell.KeepDriveSpinning_agent</string>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/open</string>
<string>-b</string>
<string>info.stovell.KeepDriveSpinning</string>
<string>--args</string>
<string>/Volumes/External 18TB HDD</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>StartInterval</key>
<integer>60</integer>
</dict>
</plist>

Writing to the hidden file:
Succeeded
 
Current date:
2023-06-05 19:52:09 EDT

Contents of hidden file:
2023-06-05 19:51:41 EDT
This also suggests it is working. The hidden file has been updated in the last minute.

You can check for the hidden file in /Volumes/External 18TB HDD/.keepThisDriveSpinning which is updated every minute and has the date/time as content. For example with Terminal more "/Volumes/External 18TB HDD/.keepThisDriveSpinning"

Diagnostic for me starts with
Result:
-------
The Keep Drive Spinning launch agent for MyBook6A is working correctly.
If the drive falls asleep despite this, it may be suffering from a bad connection or failing hardware.

Otherwise just like yours.
 
  • Like
Reactions: kryten2
Btw, I really appreciate you helping me through this - if solved, this would help my productivity tremendously! I used the More command it showed a time stamp of yesterday 19:53:36. So I ran the program again and it showed a new time stamp
% more "/Volumes/External 18TB HDD/.keepThisDriveSpinning"
2023-06-06 09:19:56 EDT

I ran the same command 20 mins later and then again 90 mins later and it seems it's still at the same time stamp which shows the program isn't running. I would think it writes to the hidden file every couple of mins which it's not going. I do see this file in LaunchAgents and last modified is 9:19am - info.stovell.KeepDriveSpinning_agent.plist

Next I did a diagnosis and here it is

Result:
-------
The Keep Drive Spinning launch agent for External 18TB HDD is not working correctly.
The reason for the failure could not be determined automatically.
The diagnostic information below may yield a clue.


Details:
--------
OS version:
10.16

Volume info:
Name: External 18TB HDD
Path: /Volumes/External 18TB HDD
Format: APFS format

Current date:
2023-06-06 09:43:14 EDT

Contents of hidden file:
2023-06-06 09:19:56 EDT

Launch agent path:
/Users/etaleb/Library/LaunchAgents/info.stovell.KeepDriveSpinning_agent.plist

Launch agent status:
- 1 info.stovell.KeepDriveSpinning_agent

Launch agent contents:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>info.stovell.KeepDriveSpinning_agent</string>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/open</string>
<string>-b</string>
<string>info.stovell.KeepDriveSpinning</string>
<string>--args</string>
<string>/Volumes/External 18TB HDD</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>StartInterval</key>
<integer>60</integer>
</dict>
</plist>

Writing to the hidden file:
Succeeded
 
Last edited:
Done and no difference. I initiated the program again & more command showed a new time stamp but an hour later, the time stamp in terminal is the same. Do you suspect the launch agents is still the issue here? Is there another way to keep the program active in the background?
 
What happens if you run the following in Terminal twice with a few seconds in between?
Bash:
date '+%F %T %Z' > '/Volumes/External 18TB HDD/.keepThisDriveSpinning'
Does the time stamp change? If so try something similar with a simple launch agent.
LaunchControl and Lingon are useful. The keys StandardOutPath and StandardErrorPath are useful for debugging a job.

Info: https://www.launchd.info/
 
The first time I run terminal command after a while, it takes about 5 seconds to give me output given HDD is probably in sleep state. Time stamp doesn't change if I issue command again a few seconds later and then again a few seconds later

LaunchControl error - /Users/etaleb/Library/LaunchAgents is not owned by the current user. Jobs will only be executed when force-loaded

Does that mean I have to use some sort of chown command to become owner of folder and not just have read/write rights?
 
LaunchControl error - /Users/etaleb/Library/LaunchAgents is not owned by the current user. Jobs will only be executed when force-loaded

Does that mean I have to use some sort of chown command to become owner of folder and not just have read/write rights?
Those permissions are not the default.

/Users/etaleb/Library/LaunchAgents should be owned by you and group staff. And you (the owner) should have r/w permissions. At the bottom on Finder's Get Info for /Users/gilby/Library/LaunchAgents I see:

Capto_2023-06-08_10-11-38_.png


Change the owner (in Terminal) with sudo chown etaleb:staff /Users/etaleb/Library/LaunchAgents
And set the permissions in Get Info (or the chmod command).

You will probably need to set the owner for all the plists inside LaunchAgents.

It is only /Library/LaunchAgents which should be owner: system, group: wheel.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.