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.

Re: com.apple.mimic settings

PostPosted: Mon May 06, 2024 8:48 pm
by iosengineer
Bumping this thread for a closely-related question (this is one of the only results internet-wide!)

I've been using OpenZFS on OS X for a long time, and some snapshots I'd like to retain in my most important datasets still include the com.apple.mimic-hfs property.

It's great to see this generalized to com.apple.mimic, but after much research (and yes, asking some LLMs too ^_^), I cannot figure out how to zfs send / recv a snapshot that has com.apple.mimic-hfs set.

I'm willing to slosh tens of TB of data back and forth to make it happen if needed, so at the moment the only limitation is how I can actually achieve it, not the speed or space requirements. I've tried using the -x property on zfs recv, but for some reason that has no effect, and I still encounter the error.

Command:
Code: Select all
zfs send -RLev NVM/LowLatency@2-27-24 | zfs recv -s -F -o recordsize=128k -x com.apple.mimic_hfs -d Vault


Error:
Code: Select all
cannot receive com.apple.mimic_hfs property


In any case, my sincere thanks to @lundman for your heroic maintenance of this project. It has been a key part of my digital life, and I'm grateful to have access to it each day.