I have been using openzfs on osx for years but never managed to fix one annoying problem:
When I let Spotlight scan my zfs datasets, my system gets unresposive and the mds and mds_stores processes skyrocket. Even after a few days the problem persists like the datasets never get properly indexed. Btw. all datasets are encrypted.
Since it's clearly stated everywhere that Spotlight is supposed to be working it must be my setup so could you help me debug this problem?
Here is what I'f got:
Hackintosh System:
- Code: Select all
user@host ~ % sw_vers
ProductName: Mac OS X
ProductVersion: 10.15.7
BuildVersion: 19H15
ZFS Version:
- Code: Select all
user@host ~ % zfs --version
zfs-macOS-2.1.6-1
zfs-kmod-2.1.6-1
Pool creation line:
- Code: Select all
zpool create -f -o ashift=12 -O casesensitivity=insensitive -O atime=off -O normalization=formD -O compression=lz4 -O utf8only=on tank -O mirror 'diskX' 'diskY'
zpool set feature@encryption=enabled tank
zfs create -o encryption=on -o keylocation=prompt -o keyformat=passphrase tank/datasetset
zpool status:
- Code: Select all
user@host ~ % sudo zpool status -v tank
Password:
pool: tank
state: ONLINE
scan: resilvered 178M in 00:01:16 with 0 errors on Tue Mar 14 02:57:36 2023
remove: Removal of vdev 1 copied 360M in 0h0m, completed on Mon Feb 15 21:34:17 2021
52.6K memory used for removed device mappings
config:
NAME STATE READ WRITE CKSUM
tank ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
media-8C49AF1C-D1ED-DE47-A338-624B21E841CX ONLINE 0 0 0
media-B4C01C46-8D99-844A-876A-1DF20CD4639X ONLINE 0 0 0
errors: No known data errors
Pool features:
- Code: Select all
user@host ~ % zpool get all tank
NAME PROPERTY VALUE SOURCE
tank size 3.62T -
tank capacity 91% -
tank altroot - default
tank health ONLINE -
tank guid 15725515092470506706 -
tank version - default
tank bootfs - default
tank delegation on default
tank autoreplace off default
tank cachefile - default
tank failmode wait default
tank listsnapshots off default
tank autoexpand off default
tank dedupratio 1.00x -
tank free 318G -
tank allocated 3.31T -
tank readonly off -
tank ashift 12 local
tank comment - default
tank expandsize - -
tank freeing 0 -
tank fragmentation 17% -
tank leaked 0 -
tank multihost off default
tank checkpoint - -
tank load_guid 7012514564047341978 -
tank autotrim off default
tank compatibility off default
tank feature@async_destroy enabled local
tank feature@empty_bpobj active local
tank feature@lz4_compress active local
tank feature@multi_vdev_crash_dump enabled local
tank feature@spacemap_histogram active local
tank feature@enabled_txg active local
tank feature@hole_birth active local
tank feature@extensible_dataset active local
tank feature@embedded_data active local
tank feature@bookmarks enabled local
tank feature@filesystem_limits enabled local
tank feature@large_blocks enabled local
tank feature@large_dnode enabled local
tank feature@sha512 enabled local
tank feature@skein enabled local
tank feature@edonr enabled local
tank feature@userobj_accounting active local
tank feature@encryption active local
tank feature@project_quota active local
tank feature@device_removal active local
tank feature@obsolete_counts active local
tank feature@zpool_checkpoint enabled local
tank feature@spacemap_v2 active local
tank feature@allocation_classes enabled local
tank feature@resilver_defer enabled local
tank feature@bookmark_v2 enabled local
tank feature@redaction_bookmarks enabled local
tank feature@redacted_datasets enabled local
tank feature@bookmark_written enabled local
tank feature@log_spacemap active local
tank feature@livelist enabled local
tank feature@device_rebuild enabled local
tank feature@zstd_compress enabled local
tank feature@draid enabled local
tank feature@zilsaxattr active local
tank feature@head_errlog active local
tank feature@blake3 enabled local
- Code: Select all
user@host ~ % zfs get encryption tank/dataset
NAME PROPERTY VALUE SOURCE
tank/dataset encryption aes-256-ccm -
Spotlight indexing status after several days:
- Code: Select all
user@host ~ % mdutil -s /Volumes/tank/
/System/Volumes/Data/Volumes/tank:
Indexing enabled.
user@host ~ % mdutil -s /Volumes/tank/dataset
/System/Volumes/Data/Volumes/tank/dataset:
Error: unknown indexing state.
MacOS Log entries about mds:
- Code: Select all
Mar 27 10:36:19 host com.apple.xpc.launchd[1] (com.apple.mdworker.shared.08000000-0000-0000-0000-000000000000[43768]): Service exited due to SIGKILL | sent by mds[43343]
Mar 27 10:30:29 host mdsync[43345]: objc[43345]: Class _MDSPathFilter is implemented in both /System/Library/PrivateFrameworks/SpotlightIndex.framework/Versions/A/SpotlightIndex and /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Support/mdsync. One of the two will be used. Which one is undefined.
mds_stores and mdworker keep crashing. Crash info is attached.
Thank you for your help.