RIGHT:[[Mac 関係覚え書き]]
*Spotlight の機能をオフにする(Tiger まで) [#i0bcab46]
Spotlight の索引作成をバックグラウンドで行う mdimport などのプロセスを起動しないようにします
/etc/hostconfig を編集して
SPOTLIGHT=-YES-
となっている項目を
SPOTLIGHT=-NO-
に変更する.
*Spotlight のインデックス作成を抑制する [#t11d294e]
マウントしているボリュームに対して
$ mdutil /Volumes/ldm -i off
を実行する.
確認は
$ mdutil /Volumes/ldm -s
/Volumes/ldm:
No index.
ちなみに,インデックス作成が有効な場合,
/Volumes/ldm/:
Status: Indexing Enabled
と表示される.
**ネットワークドライブのインデックス作成を抑制する [#s49565ee]
Leopard 以降(?),ネットワークドライブに対しても
インデックスを作成するようになり,
サーバに負荷がかかるようになった.
これを抑制するためには次のようにするのがよいようだ.
>If you want Spotlight to function
and just disable indexing on the automount, you can add an empty file
named .metadata_never_index to the top level directory of the mount
point.
試した限りでは,NFS マウントされているトップディレクトリ,
例えば /home に .metadata_never_index を touch しておけば大丈夫そうだった.
*検索用インデックスを再作成する [#dd4ffe38]
次のようにコマンドを実行する.
$ sudo mdutil -E /