Configure Spotlight Proxy
Spotlight Proxy enables communication between a StorNext MDC and a Xsan Spotlight server. The Spotlight server enables Spotlight search functionality for Xsan clients accessing StorNext volumes. While Spotlight includes two configurable Spotlight search levels, ReadWrite and FsSearch, only the ReadWrite level works with Spotlight Proxy. Quantum recommends not to configure the FsSearch level as it will disable Spotlight Proxy.
Spotlight Search Level | Description |
---|---|
ReadWrite |
The ReadWrite level indexes attributes as well as read and index each file in the volume. By default, Spotlight is configured for ReadWrite indexing. |
FsSearch |
The FsSearch level only indexes file attributes. |
Note: If the ReadWrite search level is configured, every file in the volume is read once by the Spotlight indexing process. For Managed file systems, this includes retrieving and reading all truncated files. Consider the impact of Spotlight indexing and ensure that Spotlight indexing is appropriate for your environment.
Caution: Enabling Spotlight Proxy on a managed file system is not advised. Spotlight indexes data as well as metadata and may cause truncated files to be restored from archival storage.
Note: A macOS X MDC is not supported as a proxy server for an FX LAN client.
- On the Configuration menu, click File Systems. The Configuration > File Systems page appears.
- Perform one of the following:
- Edit an existing file system. See Edit a File System.
- Create a new file system. See Add a File System.
- Expand the Configuration Parameters heading, and then click the Features tab.
- Select the Spotlight Proxy check box.
- Click Apply to save the changes, or click Cancel to return to the Configuration > File Systems page.
Note: You must configure a Mac client to act as a Spotlight Proxy server. You must only set the option enableSpotlightServer on the system that acts as the Spotlight server, and not the system that acts as the Spotlight client.
-
Set with:
defaults write /Library/Preferences/com.apple.xsan enableSpotlightServer -bool trueNote: The enableSpotlightServer flag only takes effect after you restart the Xsan client. Do not attempt the next step before you restart the Xsan client.
-
Enable Spotlight for external volumes (SNFS or otherwise):
mdutil -i on /Volumes/RH6-DATABelow are examples of the output of mdutil -s /Volume/snfs on the server and on the client.
SERVER
# mdutil -s /Volumes/snfs/
/Volumes/snfs: Indexing enabled.
CLIENT
# mdutil -i on /Volumes/snfs
/Volumes/snfs: Server search enabled.
# mdutil -s /Volumes/snfs
/Volumes/snfs: Server search enabled.Note: If the error message, "
Error: unknown indexing state
" is displayed, then use the following commands to reload the Xsan client.launchctl unload /System/Library/LaunchDaemons/com.apple.xsan.plist
launchctl load -w /System/Library/LaunchDaemons/com.apple.xsan.plist
Note: Multiple Xsan clients can be configured as Spotlight proxy servers.
The first proxy server the fsm locates becomes the proxy. If that client leaves the cluster, the fsm sequentially scans the list of clients willing to be the proxy server and requests that each of them try to renegotiate to become the new proxy. The first client to respond affirmatively becomes the new proxy server until it leaves the cluster, even if the previous proxy server rejoins.
Possible Troubleshooting Items
-
To clear the Spotlight state for an external volume, execute the following:
$ sudo mdutil -E -i off /Volumes/peterson_47_acls_OFF
-
With sufficient file system load, and/or sufficient load on the Spotlight proxy server, there can be a noticeable delay between something changing in the file system and Spotlight search reflecting that change.
-
Use the command mdfind to test the Spotlight server. For example:
# mdfind -onlyin /Volumes/snfs -name .jpg
/Volumes/snfs/image-dir/img1.jpg
/Volumes/snfs/image-dir/img2.jpg
/Volumes/snfs/image-dir/img3.jpg
/Volumes/snfs/image-dir/img4.jpg