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

2178965

Cancelled
Original poster
Jun 21, 2009
82
17
I have two Western Digital Passport 3 TB drives. For a couple years I used both as TimeMachine backups and made them bootable recovery disks. They were both connected to my iMac, late 2015, macOS 10.15.4 and now 10.15.5 via USB j5Create USB 4-port adapter.

As far as I can tell they worked well. I could read both drives, access every backup, read/write files from/to both drives. The problem is that one of the two identical drives does not spin down predictably. The one that "works as expected" spins down as soon as TimeMachine completes its backup (within a few "moments"). Sometimes I can see the mdworker_shared is running. But as soon as it completes the drive spins down.

However the second drive does not spin down for a long time, sometimes hours. Even after Spotlight completes (no mdworker_shared or mdworker processes or threads running) it is spinning at "top speed" for hours. It does stop eventually, but I cannot correlate the times it stops with the completion of a process or thread shown in top of ps -elf. Moreover, iostat frequently shows no i/o to that drive when it is still spinning at top speed.

I've seen lots of discussion on similar problems on various forums, but they seem to describe different situations than mine, namely that people are asking how to kill a process such as photoanalysisd so that the drive will spin down. I've seen a few threads discussing disabling features via nvram. But because I have two drives that have the exact same content yet behave so differently, I'm wondering if there is some hardware setting in the drive's registers or some MacOS setting that is treating the two drives differently.

I have the "Put hard disks to sleep when possible" box checked in System Preferences -> Energy Saver.

I can post some output of top if requested. At this point I don't know what to look for.
 
  • Like
Reactions: LankyNibbs

2178965

Cancelled
Original poster
Jun 21, 2009
82
17
Well, I killed Google Chrome and the disk spun down. I restarted Disk Utility and Activity Monitor but so far the drive has not spun up again. Now I'm suspicious of Chrome. I think I will restart Chrome (had no Chrome window open but Chrome was running) and monitor sudo fs_usage -e. I'll monitor and update this thread.
[automerge]1593035331[/automerge]
OK, here is some out put of sudo fs_usage -e | grep "WD-" (my external drive file systems are on /Volumes/WD-disk*"):

Code:
$ sudo fs_usage -e | grep "WD-"
14:39:04  open              /System/Volumes/Data/Volumes/WD-disk2s3                                          0.000026   mds         
14:39:04  open              /System/Volumes/Data/Volumes/WD-disk2s3                                          0.000022   mds         
14:39:04  open              /System/Volumes/Data/Volumes/WD-disk2s2                                          0.000018   mds         
14:39:04  open              /System/Volumes/Data/Volumes/WD-disk2s2                                          0.000010   mds         
14:39:04  open              /System/Volumes/Data/Volumes/WD-disk2s1                                          0.000019   mds         
14:39:04  open              /System/Volumes/Data/Volumes/WD-disk2s1                                          0.000010   mds         
14:39:04  open              /System/Volumes/Data/Volumes/WD-disk2s2                                          0.000010   mds         
14:39:04  open              /System/Volumes/Data/Volumes/WD-disk2s2                                          0.000009   mds         
14:39:04  open              /System/Volumes/Data/Volumes/WD-disk2s3                                          0.000010   mds         
14:39:04  open              /System/Volumes/Data/Volumes/WD-disk2s3                                          0.000009   mds         
14:39:04  open              /System/Volumes/Data/Volumes/WD-disk2s1                                          0.000010   mds         
14:39:04  open              /System/Volumes/Data/Volumes/WD-disk2s1                                          0.000009   mds         
14:39:04  getattrlist       /Volumes/WD-disk2s1                                                              0.000013   Google Chrom
14:39:04  getattrlist       /Volumes/WD-disk2s1                                                              0.000005   Google Chrom
14:39:04  getattrlist       /Volumes/WD-disk2s1                                                              0.000004   Google Chrom
14:39:04  pathconf          /Volumes/WD-disk2s1                                                              0.000003   Google Chrom
14:39:04  pathconf          /Volumes/WD-disk2s1                                                              0.000003   Google Chrom
14:39:04  getattrlist       /Volumes/WD-disk2s3                                                              0.000011   Google Chrom
14:39:04  getattrlist       /Volumes/WD-disk2s3                                                              0.000005   Google Chrom
14:39:04  getattrlist       /Volumes/WD-disk2s3                                                              0.000004   Google Chrom
14:39:04  pathconf          /Volumes/WD-disk2s3                                                              0.000003   Google Chrom
14:39:04  pathconf          /Volumes/WD-disk2s3                                                              0.000003   Google Chrom
14:39:04  getattrlist       /Volumes/WD-disk2s2                                                              0.000016   Google Chrom
14:39:04  getattrlist       /Volumes/WD-disk2s2                                                              0.000005   Google Chrom
14:39:04  getattrlist       /Volumes/WD-disk2s2                                                              0.000005   Google Chrom
14:39:04  pathconf          /Volumes/WD-disk2s2                                                              0.000003   Google Chrom
14:39:04  pathconf          /Volumes/WD-disk2s2                                                              0.000003   Google Chrom

Looks like Chrome is the culprit. But I cannot figure out what it is doing.

In my first post I said the drive in question was a TimeMachien drive The disk in question how has 3 ExFAT partitions (it's no longer a TimeMachine disk). However, my other Western Digital drive is still fully TimeMachine (with a boot partition so I can boot from it). But that drive is unaffected. It remains spun down.
 
Last edited:
  • Like
Reactions: LankyNibbs

2178965

Cancelled
Original poster
Jun 21, 2009
82
17
OK, I was wrong. Google Chrome is not running, but the disk spun up again. Here is some additional output from sudo fs_usage -e,

Code:
14:47:25  open              /System/Volumes/Data/Volumes/WD-disk2s3                                          0.000028   mds        
14:47:25  open              /System/Volumes/Data/Volumes/WD-disk2s3                                          0.000011   mds        
14:47:25  open              /System/Volumes/Data/Volumes/WD-disk2s2                                          0.000010   mds        
14:47:25  open              /System/Volumes/Data/Volumes/WD-disk2s2                                          0.000009   mds        
14:47:25  open              /System/Volumes/Data/Volumes/WD-disk2s1                                          0.000010   mds        
14:47:25  open              /System/Volumes/Data/Volumes/WD-disk2s1                                          0.000009   mds        
14:47:25  open              /System/Volumes/Data/Volumes/WD-disk2s2                                          0.000010   mds        
14:47:25  open              /System/Volumes/Data/Volumes/WD-disk2s2                                          0.000009   mds        
14:47:25  open              /System/Volumes/Data/Volumes/WD-disk2s3                                          0.000010   mds        
14:47:25  open              /System/Volumes/Data/Volumes/WD-disk2s3                                          0.000009   mds        
14:47:25  open              /System/Volumes/Data/Volumes/WD-disk2s1                                          0.000009   mds        
14:47:25  open              /System/Volumes/Data/Volumes/WD-disk2s1                                          0.000009   mds        
com.apple.ap
14:47:25  getattrlist       /Volumes/WD-disk2s1/Users                                                        0.000008   com.apple.ap
14:47:25  getattrlist       /Volumes/WD-disk2s1/Users                                                        0.000004   com.apple.ap
14:47:25  getattrlist       /Volumes/WD-disk2s1/Users                                                        0.000028   com.apple.ap
14:47:25  getattrlist       /Volumes/WD-disk2s1/Users                                                        0.000006   com.apple.ap
14:47:25  getattrlist       /Volumes/WD-disk2s1/Users                                                        0.000004   com.apple.ap
14:47:25  stat64            /Volumes/WD-disk2s1/Users/.localized                                             0.000007   com.apple.ap
14:47:25  getattrlist       /Volumes/WD-disk2s1                                                              0.000008   com.apple.ap
14:47:25  getattrlist       /Volumes/WD-disk2s1                                                              0.000005   com.apple.ap
14:47:25  getattrlist       /Volumes/WD-disk2s1                                                              0.000022   com.apple.ap
14:47:25  getattrlist       /Volumes/WD-disk2s1                                                              0.000005   com.apple.ap
14:47:25  getattrlist       /Volumes/WD-disk2s1                                                              0.000004   com.apple.ap
14:47:25  stat64            /Volumes/WD-disk2s1/.localized                                                   0.000004   com.apple.ap
14:47:25  statfs64          /Volumes/WD-disk2s1                                                              0.000021   com.apple.ap
14:47:25  access            /Volumes/WD-disk2s1/.Trashes>>>>>>>>>>>>>>>>>>>>>>>>>>>>                         0.000005   com.apple.ap
14:47:25  statfs64          /Volumes/WD-disk2s1                                                              0.000013   com.apple.ap
14:47:25  access            /Volumes/WD-disk2s1/.Trashes>>>>>>>>>>>>>>>>>>>>>>>>>>>>                         0.000005   com.apple.ap
14:47:27  getattrlist       /Volumes/WD-disk2s3                                                              0.000010   com.apple.ap
14:47:27  getattrlist       /Volumes/WD-disk2s1                                                              0.000022   com.apple.ap
14:47:27  getattrlist       /Volumes/WD-disk2s2                                                              0.000007   com.apple.ap
14:47:41  getattrlist       /Volumes/WD-disk2s3                                                              0.000010   Finder    
14:47:41  getattrlist       /Volumes/WD-disk2s1                                                              0.000007   Finder    
14:47:41  getattrlist       /Volumes/WD-disk2s2                                                              0.000007   Finder    
14:47:44  getattrlist       /Volumes/WD-disk2s3                                                              0.000009   Finder    
14:47:44  getattrlist       /Volumes/WD-disk2s1                                                              0.000007   Finder    
14:47:44  getattrlist       /Volumes/WD-disk2s2                                                              0.000006   Finder    
15:00:33  getattrlist       /Volumes/WD-disk2s1                                                              0.000016   com.apple.We
15:00:33  getattrlist       /Volumes/WD-disk2s1                                                              0.000005   com.apple.We
15:00:33  getattrlist       /Volumes/WD-disk2s1                                                              0.000004   com.apple.We
15:00:33  pathconf          /Volumes/WD-disk2s1                                                              0.000004   com.apple.We
15:00:33  pathconf          /Volumes/WD-disk2s1                                                              0.000003   com.apple.We
15:00:33  getattrlist       /Volumes/WD-disk2s3                                                              0.000017   com.apple.We
15:00:33  getattrlist       /Volumes/WD-disk2s3                                                              0.000005   com.apple.We
15:00:33  getattrlist       /Volumes/WD-disk2s3                                                              0.000004   com.apple.We
15:00:33  pathconf          /Volumes/WD-disk2s3                                                              0.000003   com.apple.We
15:00:33  pathconf          /Volumes/WD-disk2s3                                                              0.000003   com.apple.We
15:00:33  getattrlist       /Volumes/WD-disk2s2                                                              0.000027   com.apple.We
15:00:33  getattrlist       /Volumes/WD-disk2s2                                                              0.000019   com.apple.We
15:00:33  getattrlist       /Volumes/WD-disk2s2                                                              0.000004   com.apple.We
15:00:33  pathconf          /Volumes/WD-disk2s2                                                              0.000003   com.apple.We
15:00:33  pathconf          /Volumes/WD-disk2s2                                                              0.000003   com.apple.We
15:00:35  getattrlist       /Volumes/WD-disk2s1                                                              0.000014   com.apple.We
15:00:35  getattrlist       /Volumes/WD-disk2s1                                                              0.000005   com.apple.We
15:00:35  getattrlist       /Volumes/WD-disk2s1                                                              0.000004   com.apple.We
15:00:35  pathconf          /Volumes/WD-disk2s1                                                              0.000004   com.apple.We
15:00:35  pathconf          /Volumes/WD-disk2s1                                                              0.000003   com.apple.We
15:00:35  getattrlist       /Volumes/WD-disk2s3                                                              0.000015   com.apple.We
15:00:35  getattrlist       /Volumes/WD-disk2s3                                                              0.000006   com.apple.We
15:00:35  getattrlist       /Volumes/WD-disk2s3                                                              0.000005   com.apple.We
15:00:35  pathconf          /Volumes/WD-disk2s3                                                              0.000004   com.apple.We
15:00:35  pathconf          /Volumes/WD-disk2s3                                                              0.000003   com.apple.We
15:00:35  getattrlist       /Volumes/WD-disk2s2                                                              0.000025   com.apple.We
15:00:35  getattrlist       /Volumes/WD-disk2s2                                                              0.000014   com.apple.We
15:00:35  getattrlist       /Volumes/WD-disk2s2                                                              0.000005   com.apple.We
15:00:35  pathconf          /Volumes/WD-disk2s2                                                              0.000017   com.apple.We
15:00:35  pathconf          /Volumes/WD-disk2s2                                                              0.000004   com.apple.We
15:03:52  open              /System/Volumes/Data/Volumes/WD-disk2s3                                          0.000031   mds        
15:03:52  open              /System/Volumes/Data/Volumes/WD-disk2s3                                          0.000024   mds        
15:03:52  open              /System/Volumes/Data/Volumes/WD-disk2s2                                          0.000018   mds        
15:03:52  open              /System/Volumes/Data/Volumes/WD-disk2s2                                          0.000010   mds        
15:03:52  open              /System/Volumes/Data/Volumes/WD-disk2s1                                          0.000028   mds        
15:03:52  open              /System/Volumes/Data/Volumes/WD-disk2s1                                          0.000009   mds        
15:03:52  open              /System/Volumes/Data/Volumes/WD-disk2s2                                          0.000010   mds        
15:03:52  open              /System/Volumes/Data/Volumes/WD-disk2s2                                          0.000009   mds        
15:03:52  open              /System/Volumes/Data/Volumes/WD-disk2s3                                          0.000011   mds        
15:03:52  open              /System/Volumes/Data/Volumes/WD-disk2s3                                          0.000009   mds        
15:03:52  open              /System/Volumes/Data/Volumes/WD-disk2s1                                          0.000010   mds        
15:03:52  open              /System/Volumes/Data/Volumes/WD-disk2s1                                          0.000009   mds

I'm not sure what the com.apple.We process is.

Code:
$ ps -elf | grep 17239
  501 17239     1     4004   0   4  0 107177480 389196 -      Ss                  0 ??         0:14.48 /System/Library/  3:00PM
  501 17249   540     4006   0  31  0  4399288    720 -      S+                  0 ttys005    0:00.00 grep 17239        3:03PM

At the same time I captured the fs_usage data above, I captured some output from iostat.

Code:
$ iostat -w 5
              disk0               disk2               disk3       cpu    load average
    KB/t  tps  MB/s     KB/t  tps  MB/s     KB/t  tps  MB/s  us sy id   1m   5m   15m
   24.84   11  0.27    18.41    0  0.00    16.00    0  0.00   5  3 92  1.34 1.40 1.27
  160.00    0  0.03     0.00    0  0.00     0.00    0  0.00   2  1 97  1.32 1.40 1.27
    0.00    0  0.00     0.00    0  0.00     0.00    0  0.00   1  1 97  1.29 1.39 1.27
   73.52   38  2.71     0.00    0  0.00     0.00    0  0.00   5  3 92  1.27 1.38 1.26
    4.00    0  0.00     0.00    0  0.00     0.00    0  0.00   4  2 94  1.25 1.38 1.26
    0.00    0  0.00     0.00    0  0.00     0.00    0  0.00   5  3 93  1.31 1.39 1.27
    4.00    0  0.00     0.00    0  0.00     0.00    0  0.00   4  3 93  1.28 1.38 1.26
   18.12   24  0.43     0.00    0  0.00     0.00    0  0.00  22  7 71  1.34 1.39 1.27
    0.00    0  0.00     0.00    0  0.00     0.00    0  0.00   8  4 88  1.39 1.40 1.27
   66.70   37  2.40     0.00    0  0.00     0.00    0  0.00   5  4 91  1.36 1.39 1.27
    4.00    0  0.00     0.00    0  0.00     0.00    0  0.00   7  4 89  1.41 1.40 1.27
    0.00    0  0.00     0.00    0  0.00     0.00    0  0.00   4  3 94  1.46 1.41 1.28

The disk in question is disk2. disk0 is my internal iMac hard drive. I believe this shows that there is no i/o yet the disk is still spun up at nominal speed.
 
Last edited:
  • Like
Reactions: LankyNibbs

2178965

Cancelled
Original poster
Jun 21, 2009
82
17
Latest diagnostics....


Code:
15:37:15  open              /System/Volumes/Data/Volumes/WD-disk2s3                                          0.000044   mds         
15:37:15  open              /System/Volumes/Data/Volumes/WD-disk2s3                                          0.000011   mds         
15:37:15  open              /System/Volumes/Data/Volumes/WD-disk2s2                                          0.000016   mds         
15:37:15  open              /System/Volumes/Data/Volumes/WD-disk2s2                                          0.000010   mds         
15:37:15  open              /System/Volumes/Data/Volumes/WD-disk2s1                                          0.000016   mds         
15:37:15  open              /System/Volumes/Data/Volumes/WD-disk2s1                                          0.000009   mds         
15:37:15  open              /System/Volumes/Data/Volumes/WD-disk2s2                                          0.000010   mds         
15:37:15  open              /System/Volumes/Data/Volumes/WD-disk2s2                                          0.000009   mds         
15:37:15  open              /System/Volumes/Data/Volumes/WD-disk2s3                                          0.000011   mds         
15:37:15  open              /System/Volumes/Data/Volumes/WD-disk2s3                                          0.000009   mds         
15:37:15  open              /System/Volumes/Data/Volumes/WD-disk2s1                                          0.000010   mds         
15:37:15  open              /System/Volumes/Data/Volumes/WD-disk2s1                                          0.000009   mds         
15:37:30  getattrlist       /Volumes/WD-disk2s1                                                              0.000016   com.apple.We
15:37:30  getattrlist       /Volumes/WD-disk2s1                                                              0.000004   com.apple.We
15:37:30  getattrlist       /Volumes/WD-disk2s1                                                              0.000019   com.apple.We
15:37:30  pathconf          /Volumes/WD-disk2s1                                                              0.000003   com.apple.We
15:37:30  pathconf          /Volumes/WD-disk2s1                                                              0.000003   com.apple.We
15:37:30  getattrlist       /Volumes/WD-disk2s3                                                              0.000027   com.apple.We
15:37:30  getattrlist       /Volumes/WD-disk2s3                                                              0.000005   com.apple.We
15:37:30  getattrlist       /Volumes/WD-disk2s3                                                              0.000018   com.apple.We
15:37:30  pathconf          /Volumes/WD-disk2s3                                                              0.000004   com.apple.We
15:37:30  pathconf          /Volumes/WD-disk2s3                                                              0.000003   com.apple.We
15:37:30  getattrlist       /Volumes/WD-disk2s2                                                              0.000012   com.apple.We
15:37:30  getattrlist       /Volumes/WD-disk2s2                                                              0.000005   com.apple.We
15:37:30  getattrlist       /Volumes/WD-disk2s2                                                              0.000004   com.apple.We
15:37:30  pathconf          /Volumes/WD-disk2s2                                                              0.000004   com.apple.We
15:37:30  pathconf          /Volumes/WD-disk2s2                                                              0.000003   com.apple.We
15:37:33  getattrlist       /Volumes/WD-disk2s1                                                              0.000017   com.apple.We
15:37:33  getattrlist       /Volumes/WD-disk2s1                                                              0.000005   com.apple.We
15:37:33  getattrlist       /Volumes/WD-disk2s1                                                              0.000004   com.apple.We
15:37:33  pathconf          /Volumes/WD-disk2s1                                                              0.000004   com.apple.We
15:37:33  pathconf          /Volumes/WD-disk2s1                                                              0.000003   com.apple.We
15:37:33  getattrlist       /Volumes/WD-disk2s3                                                              0.000015   com.apple.We
15:37:33  getattrlist       /Volumes/WD-disk2s3                                                              0.000005   com.apple.We
15:37:33  getattrlist       /Volumes/WD-disk2s3                                                              0.000004   com.apple.We
15:37:33  pathconf          /Volumes/WD-disk2s3                                                              0.000004   com.apple.We
15:37:33  pathconf          /Volumes/WD-disk2s3                                                              0.000003   com.apple.We
15:37:33  getattrlist       /Volumes/WD-disk2s2                                                              0.000013   com.apple.We
15:37:33  getattrlist       /Volumes/WD-disk2s2                                                              0.000005   com.apple.We
15:37:33  getattrlist       /Volumes/WD-disk2s2                                                              0.000004   com.apple.We
15:37:33  pathconf          /Volumes/WD-disk2s2                                                              0.000003   com.apple.We
15:37:33  pathconf          /Volumes/WD-disk2s2                                                              0.000003   com.apple.We
15:37:33  pathconf          /Volumes/WD-disk2s2                                                              0.000003   com.apple.We

What the heck is mds doing? On that external drive I only copy the contents of my home directory, minus the following directories, to the external drive:

Code:
Applications/
ARISExpress/
Books/
Library/
Movies/
Music/
Digital?Editions
Photos?Library.photoslibrary
Pictures/iPhoto?Library/
Public/
Sites/
 
  • Like
Reactions: LankyNibbs

Taz Mangus

macrumors 604
Mar 10, 2011
7,815
3,504
Few things to try:
  • Try SMC reset.
  • Create a new user account, reboot and login to the new user. See if the disk issue still happens.
 
  • Like
Reactions: LankyNibbs

2178965

Cancelled
Original poster
Jun 21, 2009
82
17
Thank you, @Taz Mangus.

I have an iMac late 2015, so I followed the instructions for desktop computers without the T2 chip at the bottom of the page you referenced. That did not seem to do anything.

I also went to System Preferences -> Spotlight -> Privacy and entered the file system directory mount points of the 3 file systems on my external drive. I rebooted.

The disk still spins when I restart or login, but it now spins down pretty quickly... maybe a few minutes; I didn't time it. So adding the mount points to ignore in Spotlight preferences might have solved it.

However, I'll monitor it for a day or two in order to be sure it's working as expected.
 
  • Like
Reactions: LankyNibbs

2178965

Cancelled
Original poster
Jun 21, 2009
82
17
Update... this seems to be working now after entering the volumes to ignore in Spotlight -> Privacy settings. The external disk stills spins for a time after I do an rsync backup to the drive. But this could be normal; it stops within a few minutes.

I still can't associate any running process with that drive or volume. But honestly I don't have the time to go down a rabbit hole right now to investigate further.

I wish there were any easy way to associate iostat output with PIDs. Then I could associate disk activity with the process to get a clue about which processes(es) is(are) accessing the drive.

I'll mark this resolved....
 
  • Like
Reactions: LankyNibbs

2178965

Cancelled
Original poster
Jun 21, 2009
82
17
Well, I know I marked this as resolved, but I'm now having problems again. My external drive does not spin down.

I've prevented Spotlight from searching on all volumes on the physical drive in system preferences.
I've tried to reset the SMC per @Taz Mangus post above.

I logged in as Guest (enabled the Guest account). The disk is not spinning down here either.

However, I've noticed something new. Activity Monitor Disk View does update the process list pane. This was not happening (is not happening) when I'm logged in as myself. I should post another issue about this. But I'm thinking that I need to reset the SMC still.

The problem is that, on my desktop iMac late 2015 (Catalina 10.15.5) the instructions given by @Taz Mangus seemed to not do anything. I just logged out, shut down, disconnected from power, waited a minute, plugged back and rebooted.

According to the referenced page, and according to my "About This Mac" I do not have a T2 chip. And I'm not on a notebook.
 
  • Like
Reactions: LankyNibbs

2178965

Cancelled
Original poster
Jun 21, 2009
82
17
I believe (non-scientific and not fully tested with tools) that I've noticed that the disk is spun down when there are no mdworker or mdworker_shared processes running according to top.

If that is true (I just tested it by doing ps -elf | grep mdworker) then that suggests that adding the volumes for Spotlight to exclude on the hard drive with the problem in System Preferences -> Spotlight -> Privacy is not working.

But I do not see the little dot in the Spotlight icon in the menu bar at the top of my desktop when I see the mdworker threads or processes running (in top or ps).
 
  • Like
Reactions: LankyNibbs

Morgenland

macrumors 65816
May 28, 2009
1,490
2,222
Europe
Thanks for the detailed description of the known problem.

- You might this free software to analyse the issue (you can donate if you like it)

mdworker loves movies... I feel always uncertain whether this is an Apple programming error or whether it is supposed to be.

- If you have a hard drive left for swapping, you could test if the problem happens after reformatting to other file systems. After reformatting, always save a large video file of the ones the software has detected. Maybe you will find one Apple formatting that works. (I have not gone this way yet).

I hope I've given you some ideas. Good luck!
 
Last edited by a moderator:
  • Like
Reactions: LankyNibbs

2178965

Cancelled
Original poster
Jun 21, 2009
82
17
Thanks for the reference, but I prefer not to use 3rd party products, especially "free" ones. I prefer to find out the core problem and fix it.

FYI, I have no movies anywhere on any drive.
 
Last edited by a moderator:
  • Like
Reactions: LankyNibbs

2178965

Cancelled
Original poster
Jun 21, 2009
82
17
Here is the latest.... The volumes on the hard drive in question are named "Volumes/WD-disk..." as shown below.

Code:
$ df -h
Filesystem      Size   Used  Avail Capacity  iused      ifree %iused  Mounted on
/dev/disk1s5   931Gi   11Gi  630Gi     2%   487495 9765089945    0%   /
devfs          204Ki  204Ki    0Bi   100%      709          0  100%   /dev
/dev/disk1s1   931Gi  274Gi  630Gi    31%  1429501 9764147939    0%   /System/Volumes/Data
/dev/disk1s4   931Gi   16Gi  630Gi     3%        2 9765577438    0%   /private/var/vm
map auto_home    0Bi    0Bi    0Bi   100%        0          0  100%   /System/Volumes/Data/home
/dev/disk2s2   1.8Ti  822Gi  1.0Ti    45% 13330041 4281637238    0%   /Volumes/WD Passport disk1s0
/dev/disk2s3   931Gi  633Mi  931Gi     1%      105 4294967174    0%   /Volumes/WD Passport disk1s1
/dev/disk3s2   931Gi   93Gi  838Gi    10%   761265    6867359   10%   /Volumes/WD-disk2s1
/dev/disk3s3   931Gi  1.9Mi  931Gi     1%       15    7628609    0%   /Volumes/WD-disk2s2
/dev/disk3s4   931Gi  1.9Mi  931Gi     1%       15    7629737    0%   /Volumes/WD-disk2s3

Running sudo fs_usage -e -w -f diskio -f pathname | grep "WD-disk" produced a lot of the following (abbreviated to show the fs_usage data related to the hard drive in question):

Code:
16:36:25.336198  getattrlist                            /Volumes/WD-disk2s3                                                                                                                                                   0.000010   Finder.3314
16:36:25.336217  getattrlist                            /Volumes/WD-disk2s1                                                                                                                                                   0.000008   Finder.3314
16:36:25.336233  getattrlist                            /Volumes/WD-disk2s2                                                                                                                                                   0.000007   Finder.3314
16:36:25.536474  getattrlist                            /Volumes/WD-disk2s3                                                                                                                                                   0.000024   Finder.3314
16:36:25.536504  getattrlist                            /Volumes/WD-disk2s1                                                                                                                                                   0.000007   Finder.3314
16:36:25.536520  getattrlist                            /Volumes/WD-disk2s2                                                                                                                                                   0.000007   Finder.3314

16:40:04.289396  getattrlist                            /Volumes/WD-disk2s1                                                                                                                                                   0.000013   com.apple.WebKit.WebContent.602839
16:40:04.289400  getattrlist                            /Volumes/WD-disk2s1                                                                                                                                                   0.000005   com.apple.WebKit.WebContent.602839
16:40:04.289404  getattrlist                            /Volumes/WD-disk2s1                                                                                                                                                   0.000004   com.apple.WebKit.WebContent.602839
16:40:04.289549  pathconf                               /Volumes/WD-disk2s1                                                                                                                                                   0.000007   com.apple.WebKit.WebContent.602839
16:40:04.289553  pathconf                               /Volumes/WD-disk2s1                                                                                                                                                   0.000003   com.apple.WebKit.WebContent.602839
16:40:04.291019  getattrlist                            /Volumes/WD-disk2s2                                                                                                                                                   0.000017   com.apple.WebKit.WebContent.602839
16:40:04.291024  getattrlist                            /Volumes/WD-disk2s2                                                                                                                                                   0.000005   com.apple.WebKit.WebContent.602839
16:40:04.291028  getattrlist                            /Volumes/WD-disk2s2                                                                                                                                                   0.000004   com.apple.WebKit.WebContent.602839
16:40:04.291098  pathconf                               /Volumes/WD-disk2s2                                                                                                                                                   0.000005   com.apple.WebKit.WebContent.602839
16:40:04.291101  pathconf                               /Volumes/WD-disk2s2                                                                                                                                                   0.000003   com.apple.WebKit.WebContent.602839
16:40:04.292447  getattrlist                            /Volumes/WD-disk2s3                                                                                                                                                   0.000017   com.apple.WebKit.WebContent.602839
16:40:04.292452  getattrlist                            /Volumes/WD-disk2s3                                                                                                                                                   0.000005   com.apple.WebKit.WebContent.602839
16:40:04.292456  getattrlist                            /Volumes/WD-disk2s3                                                                                                                                                   0.000004   com.apple.WebKit.WebContent.602839
16:40:04.292532  pathconf                               /Volumes/WD-disk2s3                                                                                                                                                   0.000003   com.apple.WebKit.WebContent.602839
16:40:04.292535  pathconf                               /Volumes/WD-disk2s3                                                                                                                                                   0.000003   com.apple.WebKit.WebContent.602839

The Finder process seems to do some file system accesses (top of the fs_usage output above) when I first bring the system out of sleep. The same is true of the com.apple.WebKit.WebContent.

But the com.apple.WebKit.WebContent accesses happen periodically as well. However, a large portion of them appear to be accesses to in-memory cache (does macOS use a buffer cache like the original ATT System V buffer cache?). That is, I put my hand on the drive and it is not always spinning when I see the screen output of fs_usage occurring.

Scrolling far right shows that the command or process doing the accesses is com.apple.WebKit.WebContent. But I'm not sure I understand this. My research indicates (I think) that it's the browser (I only have Safari running) that uses Webkit.WebContent.

The drive does spin down more than before now. I enabled the Develop menu in Safari and cleared the Safari cache via Develop -> Empty caches. Not sure if that was the reason the disk spins down more. It might be as previously I had not emptied the cache after specifying the volumes on the hard drive in question to be ignored by Spotlight.

I'm wondering, however, why the drive continues to spin for about 4 minutes after bringing the system out of sleep. After the first few seconds (literally about 3 seconds) there is no more output from fs_usage indicating the drive in question is being accessed.
 
  • Like
Reactions: LankyNibbs

2178965

Cancelled
Original poster
Jun 21, 2009
82
17
Some more data on the problem. I just brought the system out of sleep and started TurboTax, and here is some related fs_usage data.

Code:
17:44:20.090250  getattrlist                            /Volumes/WD-disk2s3                                                                                                                                                   0.000010   Finder.3314
17:44:20.090267  getattrlist                            /Volumes/WD-disk2s1                                                                                                                                                   0.000007   Finder.3314
17:44:20.090283  getattrlist                            /Volumes/WD-disk2s2                                                                                                                                                   0.000007   Finder.3314
17:44:20.290376  getattrlist                            /Volumes/WD-disk2s3                                                                                                                                                   0.000009   Finder.3314
17:44:20.290393  getattrlist                            /Volumes/WD-disk2s1                                                                                                                                                   0.000008   Finder.3314
17:44:20.290408  getattrlist                            /Volumes/WD-disk2s2                                                                                                                                                   0.000007   Finder.3314
17:54:48.200741  getattrlist                            /Volumes/WD-disk2s1                                                                                                                                                   0.000011   atsd.633687
17:54:48.200833  getattrlist                            /Volumes/WD-disk2s2                                                                                                                                                   0.000010   atsd.633687
17:54:48.200919  getattrlist                            /Volumes/WD-disk2s3                                                                                                                                                   0.000010   atsd.633687
17:54:48.897546  getattrlist                            /Volumes/WD-disk2s1                                                                                                                                                   0.000011   atsd.633687
17:54:48.897596  getattrlist                            /Volumes/WD-disk2s2                                                                                                                                                   0.000009   atsd.633687
17:54:48.897645  getattrlist                            /Volumes/WD-disk2s3                                                                                                                                                   0.000009   atsd.633687
17:54:56.531361  getattrlist                            /Volumes/WD-disk2s1                                                                                                                                                   0.000011   TurboTax 2019.633653
17:54:56.531410  getattrlist                            /Volumes/WD-disk2s2                                                                                                                                                   0.000009   TurboTax 2019.633653
17:54:56.531461  getattrlist                            /Volumes/WD-disk2s3                                                                                                                                                   0.000008   TurboTax 2019.633653

I understand that getattrlist is an "enhanced version of stat" according to the man page at the Apple developer site URL here:

However, I don't understand why an application such as TurboTax, which stores the user tax returns file in ~ would need to access an external drive.
 

Morgenland

macrumors 65816
May 28, 2009
1,490
2,222
Europe
Thanks for the reference, but I prefer not to use 3rd party products, especially "free" ones. I prefer to find out the core problem and fix it.

FYI, I have no movies anywhere on any drive.

- OK, I fully understand your reservations about 3rd party freeware and spyware such as Chrome, Edge, Skype, Firefox etc...
You can use Terminal and take a look at the invisible VolumeConfiguration.plist of your hard disk and compare it with one of the working ones on other HDs. A good thing to do here is to check Apple-related sources to learn the parameters. Beware: You can break a lot.

- Otherwise, you might try to copy part of your content to a freshly formatted HD (a small trial portion to start with) and see if the problem is passed on.

- You can also contact Apple-related forums, here at MR you can't expect much expertise in such issues..

I am also surprised that so little is heard about this problem and appropriate solutions. After all, not everyone has a "quite" SSD.

Screenshot 2020-07-04 at 10.42.25.png
 
Last edited:
  • Like
Reactions: LankyNibbs

me55

macrumors regular
Jul 26, 2019
131
63
Try creating a ".metadata_never_index" file with the touch command in the root folder of your USB hard drive. That should exempt the whole drive from Spotlight indexing.
 
  • Like
Reactions: LankyNibbs

2178965

Cancelled
Original poster
Jun 21, 2009
82
17
OK, here is an update.

I reformatted my second Western Digital Passport 3TB external USB drive to have 3, 1TB ExFAT partitions, exactly the same as the first one with the problem not spinning down.

Using System Preferences -> Spotlight -> Privacy, I specified all 6 partitions to direct Spotlight to prevent searching these partitions. So Spotlight should not search the two external drives.

I have continued to monitor the spin up-spin down behavior. The second drive spins down much more quickly--after less than a minute. The original drive, however, spins down after about 4-5 minutes, but at least it is spinning down now.

To be clear, I cannot confirm that Spotlight is searching (indexing) anything on the original drive before it spins down. Using "top" I do not always see any md_worker threads or processes running when I feel the original drive is spinning (I just put my palm on it and can feel it spinning at nominal speed).

Referring back to my previous post, I have no idea why WebKit would be accessing that external drive. So I cannot correlate any process or thread to the spinning drive.

I created a backup of my internal macOS hard drive using rsync on this second external drive. So now both external drives have exactly the same content... a backup on one partition and two unused partitions.

So I cannot explain why the second drive spins down in less than a minute while the original one continues on for 4-5 minutes.

I'm wondering if there is some nvram setting that controls how long the drive spins before spin down?
 

Morgenland

macrumors 65816
May 28, 2009
1,490
2,222
Europe
Unfortunately I can tell you that I also had all these considerations and then gave up at some point. I don't do that quickly either.
Therefore I have put a link to your case, maybe somebody still has an idea that leads to a goal.
Thanks for your update...

One more thing: As you can see, Apple has created (and filled) a Spotlight folder even though the disc is excluded as 'private' since reformatting. I have not yet found the time/occasion to report this directly to Apple.
[automerge]1593927575[/automerge]
Try creating a ".metadata_never_index" file with the touch command in the root folder of your USB hard drive. That should exempt the whole drive from Spotlight indexing.
Didn't work here.
 
Last edited:

2178965

Cancelled
Original poster
Jun 21, 2009
82
17
Yes., thanks @Morgenland. I noticed that formatting the disk on macOS results in a .Spotlight-V100 folder being created. I deleted this folder on all volumes.

I also did $ touch .metadata_never_index as suggested by @me55.

I will monitor for a day or so. I'll post my findings here just in case it's useful for anyone else. I am getting the feeling that there a lot of "bugs" and I include in that "inconsistencies." For example, using Disk Utility, I could not put an ExFAT partition on the same drive as an Apple-proprietary formatted partition. However, according to someone who responded to something I posted, you can mix and match using the command line diskutil command.

Also, System Preferences -> Spotlight -> Privacy entries seem to still be searched. Certainly this is a bug. I would be happy to file the bug with Apple if your report would not include these observations.
 

Morgenland

macrumors 65816
May 28, 2009
1,490
2,222
Europe
Yes., thanks @Morgenland. I noticed that formatting the disk on macOS results in a .Spotlight-V100 folder being created. I deleted this folder on all volumes.

I also did $ touch .metadata_never_index as suggested by @me55.

I will monitor for a day or so. I'll post my findings here just in case it's useful for anyone else. I am getting the feeling that there a lot of "bugs" and I include in that "inconsistencies." For example, using Disk Utility, I could not put an ExFAT partition on the same drive as an Apple-proprietary formatted partition. However, according to someone who responded to something I posted, you can mix and match using the command line diskutil command.

Also, System Preferences -> Spotlight -> Privacy entries seem to still be searched. Certainly this is a bug. I would be happy to file the bug with Apple if your report would not include these observations.
 

2178965

Cancelled
Original poster
Jun 21, 2009
82
17
I did as that article suggested for all file systems on my external drives:
Code:
$ cd /Volumes/WD-disk2s3/.fseventsd/
$ touch no_log
$ ls -alF
total 768
drwxrwxrwx  1 rhimbo  staff  131072 Jun 26 17:13 ./
drwxrwxrwx  1 rhimbo  staff  131072 Dec 31  1979 ../
-rwxrwxrwx  1 rhimbo  staff      36 Jul  5 08:50 fseventsd-uuid*
-rwxrwxrwx  1 rhimbo  staff       0 Jul  5 22:39 no_log*
$
$
I previously deleted the .Spotlight directory.

I'll monitor to see what happens. As of now, the first drive still takes 4-5 minutes to spin down. But the second external drive spins down almost "immediately."
 

Morgenland

macrumors 65816
May 28, 2009
1,490
2,222
Europe
Two more thoughts.
Of course you can also do analyses. But for me the evaluation is then too complicated, I have too little knowledge.
Screenshot 2020-07-07 at 18.46.27.png


My above mentioned check program shows even more precisely which processes record a HD.
(I have a little bit more confidence in that program than for example in the data-whore Chrome.)

Screenshot 2020-07-07 at 18.47.58.png

photoanalysis starts the indexing of the photos library, this can also take some time if you have not completed it properly. If you have a lot of pictures, and you have stopped the faces-analysis at some point prematurely, it is possible that you have these annoying accesses.

I haven't known OSDUI for long.
Both processes block spindown of HDs (too), you have to force-eject.
 

2178965

Cancelled
Original poster
Jun 21, 2009
82
17
Thanks. I'll try a spin dump and examine the output.

Warning: high-intensity heat flame:

photoanalysisd is another Apple disaster. The only way to stop it running is to keep Photos application running (even if the window is minimized). But I have to periodically give focus to Photos, do something, then minimize the window again in order to stop photoanalysisd.

I've seen some posts on various forums showing you you can disable it via the launchtrl command. Here is a thread on macrumors:

I haven't done it yet as I'm trying to isolate system problems and basic system integrity such as with the disk problem and Activity Monitor not working since upgrading to Catalina.

I'll post results of my findings....
 

Morgenland

macrumors 65816
May 28, 2009
1,490
2,222
Europe
One last remark on my part:
You can use the terminal to check access processes on your HD:

lsof | grep (volume)

Maybe you will recognize a process that operates Faces under Photos. This process is very tedious and always starts by itself to finally finish the face recognition of photos (which can take days in case of a large DB).

It's not a bug, its a complicated feature that unfortunately you cannot disable (as far as I know).
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.