Tuesday, March 11, 2025

Process Behind Spotlight

This topic is related to my previous blog on Time Machine Backup Issues

While working on my Mac’s Time Machine backup, I believe I disabled the Spotlight process. Spotlight was indexing my external Time Machine backup drive, which prevented me from resetting and cleaning up the drive.

After resolving my Time Machine backup issue, I realized that Spotlight was no longer working. I could no longer launch applications quickly using Command + Space. It was quite frustrating.

Checking Spotlight Settings

I went to System Settings -> Spotlight, but all the Spotlight settings appeared to be correct. Unfortunately, I couldn’t find an option there to restart Spotlight.

Restarting the Spotlight Process

Eventually, I figured out how to restart the process—the same process I had modified while troubleshooting my Time Machine backup issue. Here’s how you can do it:

Steps to Restart Spotlight

  1. Open Terminal from
    Applications->Utilities->Terminal
    . (Since Spotlight wasn’t working, I had to open it manually.)
  2. Run the following command:
    sudo mdutil -a -i on
    

The mdutil tool is used to manage Spotlight’s indexing process. I realized that I had previously disabled this service, and while I had restored my Time Machine backup, I had not re-enabled Spotlight indexing. That’s why Spotlight was not working.

After running this command, Spotlight started working within minutes. I could once again use Command + Space to launch my frequently used applications, such as Preview, Terminal, MacVim, and Safari.

Spotlight’s Background Process: mds_store

One interesting note about Spotlight’s indexing process is that it is managed by a background process called mds_store. However, when I checked Activity Monitor, I couldn’t find a process with that exact name. It’s possible that the process name has changed, but in any case, the steps above successfully restored Spotlight’s functionality.

If you have disabled this process, you will need to manually enable it using the steps above.

References

Thursday, March 6, 2025

Time Machine Backup Issue

Recently, I discovered that my Time Machine backup to an external hard drive was no longer working. I kept receiving failure messages, but they did not clearly explain the reason for the failure. Eventually, I realized that the available space on the drive was insufficient.

The quickest way to resolve this issue was to erase all backup data on the drive and start a fresh backup from scratch.

Erasing Time Machine Data

The best way to erase Time Machine data from the drive is by using the Disk Utility tool, which wipes out all data and reformats the drive as needed. However, when I attempted to erase the drive, I encountered another failure message. The system reported that the process "mds_store" was preventing the operation (holding the drive).

Following advice from a Google search, I tried terminating the process via Terminal. However, even after killing the process, I encountered the same failure message when attempting to erase the drive again.

Finally, I found a solution! I restarted my Mac in Safe Mode by holding the Shift key during startup. Since Safe Mode runs with minimal processes, I was able to successfully erase the data on the drive by using Disk Utility.

Adding the Drive Back to Time Machine

Once I had the drive ready, another issue appeared—the drive did not show up in the list of available backup drives, preventing me from adding it back to Time Machine.

I recalled receiving a warning message about "Forgetting this drive as a Time Machine backup" when I initially removed the external drive from the Time Machine settings. It seemed that macOS had stored a hidden setting to prevent this drive from being used as a Time Machine backup again. Unfortunately, I wasn’t sure where to change this setting.

Fortunately, I noticed that another partitioned drive appeared as an available Time Machine option. This drive contained important data, such as my picture libraries and historical records. When I selected this drive as a Time Machine backup, the backup process started immediately. However, I did not want to use this drive for backups, so I stopped the process.

One thing I observed was that a Backups.backupdb directory was created on this data drive. I decided to copy this directory to my intended backup drive. To my surprise, after doing this, the drive finally appeared in the Time Machine settings as an available backup option!

Time Machine Permissions

Another interesting discovery was related to permissions on my Time Machine drive.

When I erased and reformatted the drive, the permission settings were as shown in the following picture:

These permissions were the same as those of my data drive. However, when the drive was set up as a Time Machine backup, the permissions changed to the following:

I noticed that I could no longer modify these permissions or add an admin user. If I wanted to copy or erase any data on the drive, I had to enter my admin passwordeach time.

Conclusion

After a long struggle, I finally managed to get my Time Machine backup working again!

Sunday, March 17, 2024

Tips: Caller ID for Phone app

The Phone app is one of the most commonly used iOS apps on the iPhone. You can find a handful of features in the Settings->Phone. For instance, you can configure your caller ID to be either shown or hidden when making a call.

However, occasionally, you might wish to display or hide your caller ID for specific individuals or businesses without having to reset this setting from the Settings menu for every single call, which can be quite laborious. Here are two tips for using the Phone app to achieve this temporarily.

Use the code #31#  before your phone number to hide your caller ID, like in this example:


Use the code *31# before your phone number to display your caller ID, like in another example:


Those codes are very easy to remember. Think of *as a star presenting you, and # as a fence hiding anything. The remaining codes are the same.

Saturday, November 26, 2022

Updated to macVentura 13.0.1

Last night, I updated my macBook Pro macOS to Ventura 13.0.1. I had to to do this because my development tool Xcode 14 is only availalbe for this macOS version. This morning I saw my macOS update is done.

Here is the space difference before and after the update.

Before:



After:



It seems that I got more space after the update.

Thursday, January 6, 2022

Mi Band 4 For Better Health Monitoring

For 2022 New Year, I got a gift of XiaoMi's hand wist device: Mi Band 4 NFC. I have been very interested in Apple Watch for long time. The only things put me on hold are its price and necessity of features I want. This time I got another alternative device to try.

The main interest is its spleep monitor feature. iPhone has a bed time feature in Apple's Clock app. However, it only sets times to the bed and out of bed, ie, bed times. It does not have a way to determin whether if I am really asleep or in deep sleep mode.

Mi Band 4 has a sensor on the back of the watch. This sensor seems being able to monitor my sleep mode: light sleep and deep sleep. The device has an iOS app called Mi Fit. From there I can see my sleep score and data in detail.

The app provides 2 comparisions of my sleep data to other people.

From Heart Rate item in the main screen, the rate information is available from the detail view,

and sleep rate is also avaible from there.

The app also syncs those data back to iOS Health. Unfortunately, it only syncs all light and deep sleep data, back to Health' sleep module as asleep data.

Sometimes, I do see some sleep data duplicated. This might be caused by multiple syncs.

Anyway, I like Mi Band 4 device very much. In addtion to its detail sleep information, it also monitor my heat beat, and movements(walking, running, and cycling). The most important feature is its long lasting battery life, up to 5 days a charge (comparing to Apple Watch 2 days for the most recent model).

UPDATE

I found another trick to record my awake time. When I awake in a night, for example, going to washroom, I shake my left hand with Mi Band on up and down 10 times. I think that this is the way to let the band detect I am really awake. I have tried sever nights, and it is accurate to record my awake time.

In terms of price, Mi Band 4 is about $40.00 on Amazon.ca as to the blog date.

Thursday, December 30, 2021

Secret Cache of WeChat

By chance, yesterday when I clicked on a message with a link to a document file in Mac's WeChat app, I was prompt to Finder. To my surprice, this is a deep and secret space where WeChat stores temporary files.

Further exploration, I found its path from file info in Finder.

From there I copied the full path from Where. Here is the full path
/Users/xxx/Library/Containers/com.tencent.xinWeChat/Data/Library/Application Support/com.tencent.xinWeChat/2.0b4.0.9/f5210b300b4abef170762c8c1ddf67c5/Message/MessageTemp/2d14efe546045554426bdf707c13cead

I understand that WeChat saves some information such as images, files, videos in local cache so that there would be no need to download those information again for displaying (and much qicker) when user clicks on thos items. However, I don't know where they are and how long those items are stored, forever?

From this sneak, I could go up to other folders to see what items are saved. There are quite a lots of items in this library cache. I guess that those items would be purgeble items in system cache.

Tuesday, December 28, 2021

I got Mac mini M1

I just got Mac mini M1 2020 model, refurblished one. I have been kept watching Mac mini M1 for long time. The Mac mini box is very small, powerful, and attactive Mac computer. In addition to that, the cost is another reason, much less that iMac or macBook air or pro. This model saves me CAD$170.

This is my first expirence with Mac mini. Basically, it is just computer box with powerful CPU & GPU, internal speaker and several ports for peripheral connection. To make it work in a way as same as iMac, for example, a monitor, a keyboard, mouse or trackpad are needed as minimal.

In addtion to the minimal, for my case, I purchased a web camera for facetime or web conference. I have an external speaker with better sound quality. The Mac mini box does not have any internal microphone, but I found that web camera's microphone is good enough. There are 2 USB ports in the mini box. I need more ports for my keyboard, mouse, web camera, extrenal HD as time machine, and printer. Therefore, I need two USB hubs (4 USB ports for one hub) for more connections.


For my experienment, I tried to use USB port to connect the Mac mini to my existing iMac 21, using iMac screen as monitor. I thought that if I could see Mac mini HD, I would be able to boot from it through System Preferences' boot disk setting. Unfortunately, I cannot see Mac mini HD from my iMac. Finally I realize that it makes sense. The HD within Mac mini box is not in the same way as external HD to USB port. Any way, it is a good try. Currently I have an old monitor for use. The new one, Samsung 24" FHD 75Hz 5ms GTG IPS LED FreeSync Gaming Monitor (LF24T350FHNXZA), is on the way shipping to my house.

References