EDIT: I appear to have a temporary fix using
mdutil - see the end of the post - but I am not sure if it is a permanent fix, so I am still interested in answers.
I have an iMac running Mac OS 10.15.4 (Catalina). My problem is that every few minutes,
/System/Library/Frameworks/CoreServices.framework/Frameworks/Metadata.framework/Versions/A/Support/mds_stores starts up, and keeps going until my hard drive is full, and then seems to give up and give me my disk space back. (I believe it is not a "disk" now, but I will stick with the terminology). Not only does it make my disk full at unpredictable times, it also uses a lot of memory.
mds_stores appears to be the indexing program used by Spotlight; I am happy to disable both. I never use Spotlight.
I have followed the suggestions at https://www.technipages.com/macos-sierra-enable-disable-spotlight , i.e. disable System Integrity Protection, run
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
and then re-enable System Integrity Protection. But it does not work. It does not appear to have disabled Spotlight (I can still see a magnifying glass icon in the top right corner of my status bar) and it certainly does not stop my real problem: mds_stores running and filling up my disk.
I have also seen it suggested that I remove the index files via:
sudo rm -rf /.Spotlight-V100/*
However on this version of Mac OS (10.15.4, Catalina), there is no directory
20-Apr-20,15:26:46 ~> sudo ls -a / Password: . .VolumeIcon.icns .vol System bin etc private usr .. .file Applications Users cores home sbin var .DS_Store .fseventsd Library Volumes dev opt tmp
I have also see the suggestion (at http://itechinspector.com/mds_stores-process-consuming-high-cpu-usage.html and also at https://discussions.apple.com/thread/8658455 ) to run
sudo mdutil -a -i off . When I originally posted this was not working, but when I tried later in the day it did work:
20-Apr-20,21:35:27 ~> sudo mdutil -a -i off Password: /: 2020-04-20 21:35:40.665 mdutil[8406:156351] mdutil disabling Spotlight: / -> kMDConfigSearchLevelFSSearchOnly Indexing disabled. /System/Volumes/Data: 2020-04-20 21:35:40.778 mdutil[8406:156351] mdutil disabling Spotlight: /System/Volumes/Data -> kMDConfigSearchLevelFSSearchOnly Indexing disabled.
[It also gave me back a ton of disk space. I was sitting at 27 Gi free, which mds_stores would gradually gobble up. After running the above command, I suddenly have 55 Gi free; so I got back 28 Gi, more than 10% of my disk!]
So I appear to have a temporary fix, which I assume will go away next time I reboot. Does anyone know if that (or something else) disables Spotlight and mds_stores, permanently, for Catalina? (Because it looks like it might work a little differently to earlier Mac OS versions).