Recently, my Mac kept freezing and showing the rainbow spinning wheel over and over again. Even after closing all running apps, nothing changed. 

The first thing that came to mind was: 

A machine with an M4 Pro chip… behaving like this? Seriously? Did I spend all that money for *this* experience?! 

To check which process was eating up the CPU, I opened Applications → Utilities → Activity Monitor and found that the culprit was Spotlight infinite indexing .

1. What is Spotlight on Mac?

On the top menu bar, next to the clock, there’s a little magnifying-glass icon. 

Screenshot ▲ The Spotlight icon in the macOS menu bar

Clicking this opens a “Spotlight Search” window. Mac users rely heavily on this feature to search for files or apps.

Spotlight is macOS’s built-in search engine. It scans all files, apps, emails, and documents on your Mac and stores them in an index database. When you type a keyword, Spotlight instantly returns results using this index—much like Google does.

The problem is: when indexing enters a bug loop of repeated error → reindex → error → reindex, CPU usage skyrockets and the entire Mac slows to a crawl. I stopped and deleted the index to fix the issue, but didn’t think about letting it rebuild, so I was confused when Spotlight stopped showing *any* search results. -_-

2. Basic Terminal Commands for Spotlight

Here are the core commands for managing Spotlight indexing:

# Stop Spotlight indexing
sudo mdutil -i off /

# Re-enable Spotlight indexing
sudo mdutil -i on /

# Completely erase Spotlight index (reset)
sudo mdutil -E /

# Check indexing status
mdutil -s /

# Force-restart mds/mdworker (only if needed)
sudo killall mds
sudo killall mdworker
  

You can run these commands anywhere in Terminal. If you encounter an infinite indexing loop, fix it in this order:

① Stop indexing → ② Delete the index → ③ Re-enable indexing

macOS will automatically rebuild the entire Spotlight index afterward. Once it finishes, file and app search will work normally again!

3. Deep Dive: Where is Spotlight’s Index Stored?

Here’s the question I became curious about:

“Where exactly does macOS store the Spotlight index?”

First, let’s check the top-level structure in Finder (root, “/”).

Screenshot ▲ The root-level structure visible in Finder

Inside that root, we have the /System folder.

Screenshot ▲ The actual macOS system folder

Next, /System/Volumes.

Screenshot ▲ The hidden “Volumes” directory inside the system

But strangely, we can’t see the ‘Data’ volume here.

Screenshot ▲ The Data volume is invisible in Finder

The actual Spotlight index path is:

/System/Volumes/Data/.Spotlight-V100/

So the Data volume does exist inside /System/Volumes—Finder simply hides it.

4. Why Can’t You See the Data Volume in Finder?

This is because macOS uses the APFS (Apple File System) structure. A “volume” is a partition-like storage container, and modern Macs always include these:

The operating system (macOS Sequoia, etc.) is stored on Macintosh HD, while user-installed apps and files are stored on Macintosh HD – Data.

But Finder does not show this real structure. It merges both volumes into a single virtual view called “Macintosh HD.” (In reality they are separate, but Finder blends them together—because Apple said so.)

That’s why /System/Volumes/Data exists but is hidden in Finder.

5. What’s Actually Inside the Data Volume?

You can inspect it in Terminal:

ls -al /System/Volumes/Data
  

Inside it are many system-level folders used by macOS, not just user files.

Here’s what’s interesting:

In Finder, the root folder appears to contain Library, Users, System, Applications, and so on. When you open your own user folder, you see Desktop, Documents, Downloads, etc. When you open Applications, you see all your apps.

But these are *not* the actual physical locations. The real files live in the Data volume (“System → Volumes → Data”), and Finder simply presents those locations as virtual folders under the root for convenience.

So, can we peek inside the Spotlight index folder itself?

Unfortunately, no. macOS intentionally blocks all access to it.

…next topic to explore: SIP (System Integrity Protection)