Page 1 of 1

com.apple.mimic settings

PostPosted: Tue Jul 26, 2022 6:16 pm
by dmz
I'm curious about the com.apple.mimic settings, and what they're supposed to do. I know that there used to be com.apple.mimic_hfs, and it was replaced by com.apple.mimic, which can be hfs, apfs, or off - but is there a the difference between hfs and apfs? And if so, what is it? Regardless of which I choose, Finder reports that the volume is "Mac OS Extended" format...

I ask primarily because I've been having some panics on my new Mac Studio, and I'm fairly sure they're all due to ZFS (since they don't happen when I have no ZFS pools connected), but they often implicate other kernel modules in the backtrace, like smbfs or hfs. So I'm wondering whether the fact that I have some of my filesystems mimicing apfs (I have none mimicing hfs) is potentially to blame.

Re: com.apple.mimic settings

PostPosted: Sun Mar 17, 2024 7:01 pm
by nathansvt
me too

Re: com.apple.mimic settings

PostPosted: Mon Mar 18, 2024 2:41 pm
by lundman
It has no effect on how things work. All it does is, when you query the filesystem, for example you can run "mount" command:

Code: Select all
/dev/disk3s1s1 on / (apfs, sealed, local, read-only, journaled)
devfs on /dev (devfs, local, nobrowse)
/dev/disk3s6 on /System/Volumes/VM (apfs, local, noexec, journaled, noatime, nobrowse)
/dev/disk3s2 on /System/Volumes/Preboot (apfs, local, journaled, nobrowse)
/dev/disk4s1 on /Volumes/zpool (zfs, local, noatime)


the mimic setting changes the string name type returned. Ie, in that list, "apfs" or "zfs". In this example, mimic is off, so "zpool" returns "zfs".

That is it.

Why is it needed? So many pieces of software of macOS will unfortunately query the filesystem, usually at Install time, or when you try to save
you data, and it does a string comparison with "hfs" or "apfs" - and if they don't match, pop up a message saying "not supported" or similar garbage.

This includes Apple's own software, which is especially frustrating. macOS has a nice way to ask if filesystems can do each feature from a large set of possible features, but instead they
do a string comparison with the type name.