<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://openzfsonosx.org/w/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://openzfsonosx.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Foobaron</id>
		<title>OpenZFS on OS X - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://openzfsonosx.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Foobaron"/>
		<link rel="alternate" type="text/html" href="https://openzfsonosx.org/wiki/Special:Contributions/Foobaron"/>
		<updated>2026-04-19T17:54:16Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.22.3</generator>

	<entry>
		<id>https://openzfsonosx.org/wiki/Stopping_Spotlight_etc._from_changing_ZFS_without_permission</id>
		<title>Stopping Spotlight etc. from changing ZFS without permission</title>
		<link rel="alternate" type="text/html" href="https://openzfsonosx.org/wiki/Stopping_Spotlight_etc._from_changing_ZFS_without_permission"/>
				<updated>2017-01-23T06:07:12Z</updated>
		
		<summary type="html">&lt;p&gt;Foobaron: revised to focus on a simpler use-case&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The Issue ==&lt;br /&gt;
&lt;br /&gt;
ZFS is a great solution for backing up data, and moving data between platforms (e.g. Linux and Mac OS X).  However, if you connect an external ZFS drive to Mac OS X, you may be unpleasantly surprised to find that Spotlight, Finder etc. will modify the filesystems on the drive without asking (and even in violation of the user privileges granted by those filesystems).  This goes against several basic principles that you probably expect:&lt;br /&gt;
&lt;br /&gt;
* the filesystem should not change unless you change data on the filesystem.  E.g. simply plugging in the drive should not change the filesystem.&lt;br /&gt;
&lt;br /&gt;
* any attempted changes to the filesystem should obey the privilege rules set on that filesystem.  E.g. if the current user plugging in the drive lacks write privileges to the filesystem, no changes should be allowed.&lt;br /&gt;
&lt;br /&gt;
However, Spotlight, Finder etc. do not obey these expectations.  This can lead to serious problems for standard ZFS activities such as snapshot based backup.  For example, say you backup data by sending ZFS snapshots from one ZFS filesystem to another ZFS drive.  When you try to push incremental snapshots to an existing filesystem, it may fail with messages like &amp;quot;data has been changed since snapshot XYZ&amp;quot; -- even if you never wrote to that backup filesystem since your last snapshot.  Now you are in a quandary.  You will have to manually investigate the backup filesystem(s) to see what all the changes are, and whether might be any changes that need to be preserved (rather than just rolled back).  If you are used to working with ZFS on Linux this may initially baffle you, because on Linux a ZFS filesystem will not change in content unless you deliberately write data to it!&lt;br /&gt;
&lt;br /&gt;
The following Mac OS X services will modify your ZFS filesystems silently:&lt;br /&gt;
&lt;br /&gt;
* Spotlight&lt;br /&gt;
* Finder (.DS_Store, Trash)&lt;br /&gt;
&lt;br /&gt;
== Solutions ==&lt;br /&gt;
&lt;br /&gt;
* in general, if you are connecting an external ZFS drive to a Mac solely to READ data from it, '''just import it readonly'''.  This is the one trivially easy way to avoid the whole problem, e.g.:&lt;br /&gt;
&lt;br /&gt;
'''zpool import -o readonly=on tank'''&lt;br /&gt;
&lt;br /&gt;
If that is not an option, then you are going to have clean up your ZFS filesystems (every time) after OS X has &amp;quot;dirtied&amp;quot; them:&lt;br /&gt;
&lt;br /&gt;
* '''always take a snapshot of ZFS filesystems BEFORE plugging them in to a Mac'''.  This makes it relatively easy to know which changes are &amp;quot;OS X dirt&amp;quot; vs. previous data changes that you made before plugging into the Mac, and to rollback the dirt.  For example: '''zfs diff -H tank@lastsnap tank''' will give you a list of new, modified and deleted files since lastsnap.  Use Google to learn what Spotlight and Finder's hidden file names are.&lt;br /&gt;
&lt;br /&gt;
* if you did not deliberately make changes to a given ZFS filesystem while connected to the Mac, then '''just rollback to the latest snapshot''' (as your first action once you import that drive to a non-Mac host).&lt;br /&gt;
&lt;br /&gt;
* add &amp;quot;flag files&amp;quot; to each file system to prevent various OS X services from dirtying them.  E.g. '''touch /tank/.metadata_never_index''' should [http://superuser.com/questions/1000280/disable-ds-store-spotlight-and-other-metadata-on-mac-disk-image prevent Spotlight indexing].  We should collect a list here of all the rules for preventing such &amp;quot;dirty&amp;quot; services.&lt;/div&gt;</summary>
		<author><name>Foobaron</name></author>	</entry>

	<entry>
		<id>https://openzfsonosx.org/wiki/Stopping_Spotlight_etc._from_changing_ZFS_without_permission</id>
		<title>Stopping Spotlight etc. from changing ZFS without permission</title>
		<link rel="alternate" type="text/html" href="https://openzfsonosx.org/wiki/Stopping_Spotlight_etc._from_changing_ZFS_without_permission"/>
				<updated>2017-01-23T05:30:56Z</updated>
		
		<summary type="html">&lt;p&gt;Foobaron: first version of this page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The Issue ==&lt;br /&gt;
&lt;br /&gt;
ZFS is a great solution for moving data between platforms (e.g. Linux and Mac OS X).  However, if you connect an external ZFS drive to Mac OS X, you may be unpleasantly surprised to find that Spotlight, Finder etc. will modify the filesystems on the drive without asking (and even in violation of the user privileges granted by those filesystems).  This goes against several basic principles that you probably expect:&lt;br /&gt;
&lt;br /&gt;
* the filesystem should not change unless you change data on the filesystem.  E.g. simply plugging in the drive should not change the filesystem.&lt;br /&gt;
&lt;br /&gt;
* any attempted changes to the filesystem should obey the privilege rules set on that filesystem.  E.g. if the current user plugging in the drive lacks write privileges to the filesystem, no changes should be allowed.&lt;br /&gt;
&lt;br /&gt;
However, Spotlight, Finder etc. do not obey these expectations.  This can lead to serious problems for standard ZFS activities such as snapshot based backup.  For example, say you backup data from Computer A by sending ZFS snapshots to ZFS filesystems on an external drive.  At some point you connect this drive to a Mac (Computer B), e.g. to copy some of its data to the Mac.  However, the next time you try to backup some new snapshots from Computer A to this drive, it will fail with messages like &amp;quot;data has been changed since snapshot XYZ&amp;quot;.  Note that this will happen even if the user login on Computer B lacks write privileges to the external drive's ZFS filesystems.  Now you are in a quandary.  You will have to manually investigate all the changed filesystems to see what all the changes are, and whether there are any changes that need to be preserved (rather than just rolled back).  &lt;br /&gt;
&lt;br /&gt;
The following Mac OS X services will modify your ZFS filesystems silently:&lt;br /&gt;
&lt;br /&gt;
* Spotlight&lt;br /&gt;
* Finder (.DS_Store, Trash)&lt;br /&gt;
&lt;br /&gt;
== Solutions ==&lt;br /&gt;
&lt;br /&gt;
* in general, if you are connecting an external ZFS drive to a Mac solely to READ data from it, '''just import it readonly'''.  This is the one trivially easy way to avoid the whole problem, e.g.:&lt;br /&gt;
&lt;br /&gt;
'''zpool import -o readonly=on tank'''&lt;br /&gt;
&lt;br /&gt;
If that is not an option, then you are going to have clean up your ZFS filesystems (every time) after OS X has &amp;quot;dirtied&amp;quot; them:&lt;br /&gt;
&lt;br /&gt;
* '''always take a snapshot of ZFS filesystems BEFORE plugging them in to a Mac'''.  This makes it relatively easy to know which changes are &amp;quot;OS X dirt&amp;quot; vs. previous data changes that you made before plugging into the Mac, and to rollback the dirt.&lt;br /&gt;
&lt;br /&gt;
* if you did not deliberately make changes to a given ZFS filesystem while connected to the Mac, then '''just rollback to the latest snapshot''' (as your first action once you import that drive to a non-Mac host).&lt;br /&gt;
&lt;br /&gt;
* add &amp;quot;flag files&amp;quot; to each file system to prevent various OS X services from dirtying them.  E.g. '''touch /tank/.metadata_never_index''' should [http://superuser.com/questions/1000280/disable-ds-store-spotlight-and-other-metadata-on-mac-disk-image prevent Spotlight indexing].  We should collect a list here of all the rules for preventing such &amp;quot;dirty&amp;quot; services.&lt;/div&gt;</summary>
		<author><name>Foobaron</name></author>	</entry>

	<entry>
		<id>https://openzfsonosx.org/wiki/Documentation</id>
		<title>Documentation</title>
		<link rel="alternate" type="text/html" href="https://openzfsonosx.org/wiki/Documentation"/>
				<updated>2017-01-23T04:12:20Z</updated>
		
		<summary type="html">&lt;p&gt;Foobaron: add page for Spotlight/Finder behavior issues&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:About O3X]]&lt;br /&gt;
[[Category:Getting and installing O3X]]&lt;br /&gt;
&lt;br /&gt;
== Documentation ==&lt;br /&gt;
&lt;br /&gt;
General OpenZFS usage can be found on the [http://open-zfs.org OpenZFS wiki]. The main focus of this documentation is on OS X platform specifics.&lt;br /&gt;
&lt;br /&gt;
* [[zpool#Creating_a_pool|Creating a pool]]&lt;br /&gt;
* [[zpool#Unplugging_a_pool|Unplugging a pool]]&lt;br /&gt;
* [[zpool#Feature_flags|Feature flags]]&lt;br /&gt;
* [[Device names]]&lt;br /&gt;
* [[Pool upgrade]]&lt;br /&gt;
* [[Memory utilization]]&lt;br /&gt;
* [[Creating user privileges]]&lt;br /&gt;
* [[Stopping Spotlight etc. from changing ZFS without permission]]&lt;br /&gt;
* [[Encryption]]&lt;br /&gt;
* [[Bash completion]]&lt;br /&gt;
* [[DegradedPool|Degraded pool]]&lt;br /&gt;
* [[panic|Kernel panic]]&lt;br /&gt;
* [[ZFS on Boot]]&lt;/div&gt;</summary>
		<author><name>Foobaron</name></author>	</entry>

	<entry>
		<id>https://openzfsonosx.org/wiki/Suppressing_the_annoying_pop-up</id>
		<title>Suppressing the annoying pop-up</title>
		<link rel="alternate" type="text/html" href="https://openzfsonosx.org/wiki/Suppressing_the_annoying_pop-up"/>
				<updated>2017-01-23T03:32:38Z</updated>
		
		<summary type="html">&lt;p&gt;Foobaron: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Integration]]&lt;br /&gt;
&lt;br /&gt;
As of version 1.3.0, you should not see the message &amp;quot;The disk you inserted was not readable by this computer&amp;quot; unless one or more devices in your pool is a partition with a type code specifying a file system other than ZFS. The correct [http://en.wikipedia.org/wiki/GUID_Partition_Table#Partition_type_GUIDs partition type GUID] for OpenZFS on OS X is &amp;quot;6A898CC3-1DD2-11B2-99A6-080020736631,&amp;quot; which may display as any of the following, depending on what tool you're using:&lt;br /&gt;
&lt;br /&gt;
* bf01&lt;br /&gt;
* ZFS&lt;br /&gt;
* EFI_USR&lt;br /&gt;
* Solaris /usr &amp;amp; Mac ZFS&lt;br /&gt;
* 6A898CC3-1DD2-11B2-99A6-080020736631&lt;br /&gt;
&lt;br /&gt;
The easiest way to correct the partition type is to use [http://www.rodsbooks.com/gdisk/ gdisk] which is distributed via [http://brew.sh Homebrew] as the formula &amp;quot;gptfdisk&amp;quot; or via [http://sourceforge.net/projects/gptfdisk/files/gptfdisk/ SourceForge] as a pkg installer. The gdisk function for changing partition type is &amp;quot;t,&amp;quot; as explained [http://www.rodsbooks.com/gdisk/gdisk.html here].&lt;br /&gt;
&lt;br /&gt;
'''Warning''': as of El Capitan (10.11) and later, [http://www.rodsbooks.com/gdisk/ Apple has blocked normal methods of modifying a partition type] (such as those mentioned in the preceding paragraph), through a mechanism called &amp;quot;System Integrity Protection&amp;quot; (SIP).  You will have to use one of the following methods (starting with the easiest):&lt;br /&gt;
&lt;br /&gt;
* Boot an earlier version of Mac OS X (e.g. 10.6), and use it to run gdisk as outlined above on the disk containing your target partition.&lt;br /&gt;
&lt;br /&gt;
* boot using a Linux emergency disk and use it to run gdisk on the disk containing your target partition.&lt;br /&gt;
&lt;br /&gt;
* figure out how to disable Apple's &amp;quot;System Integrity Protection&amp;quot;, then run gdisk.&lt;br /&gt;
&lt;br /&gt;
For further information, see the gdisk home page link above.&lt;br /&gt;
&lt;br /&gt;
Please '''note''' that you don't need to worry about fs type in the case you use coreStorage based encryption as explained in the [[encryption]] wiki page.&lt;/div&gt;</summary>
		<author><name>Foobaron</name></author>	</entry>

	<entry>
		<id>https://openzfsonosx.org/wiki/Suppressing_the_annoying_pop-up</id>
		<title>Suppressing the annoying pop-up</title>
		<link rel="alternate" type="text/html" href="https://openzfsonosx.org/wiki/Suppressing_the_annoying_pop-up"/>
				<updated>2017-01-23T03:16:06Z</updated>
		
		<summary type="html">&lt;p&gt;Foobaron: added note about circumventing new SIP problem&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Integration]]&lt;br /&gt;
&lt;br /&gt;
As of version 1.3.0, you should not see the message &amp;quot;The disk you inserted was not readable by this computer&amp;quot; unless one or more devices in your pool is a partition with a type code specifying a file system other than ZFS. The correct [http://en.wikipedia.org/wiki/GUID_Partition_Table#Partition_type_GUIDs partition type GUID] for OpenZFS on OS X is &amp;quot;6A898CC3-1DD2-11B2-99A6-080020736631,&amp;quot; which may display as any of the following, depending on what tool you're using:&lt;br /&gt;
&lt;br /&gt;
* bf01&lt;br /&gt;
* ZFS&lt;br /&gt;
* EFI_USR&lt;br /&gt;
* Solaris /usr &amp;amp; Mac ZFS&lt;br /&gt;
* 6A898CC3-1DD2-11B2-99A6-080020736631&lt;br /&gt;
&lt;br /&gt;
The easiest way to correct the partition type is to use [http://www.rodsbooks.com/gdisk/ gdisk] which is distributed via [http://brew.sh Homebrew] as the formula &amp;quot;gptfdisk&amp;quot; or via [http://sourceforge.net/projects/gptfdisk/files/gptfdisk/ SourceForge] as a pkg installer. The gdisk function for changing partition type is &amp;quot;t,&amp;quot; as explained [http://www.rodsbooks.com/gdisk/gdisk.html here].&lt;br /&gt;
&lt;br /&gt;
'''Warning''': as of El Capitan (10.11) and later, '''Apple has blocked all normal methods of modifying a partition type''' (such as those mentioned in the preceding paragraph), through a mechanism called &amp;quot;System Integrity Protection&amp;quot; (SIP).  You will have to use one of the following methods (starting with the easiest):&lt;br /&gt;
&lt;br /&gt;
* Boot an earlier version of Mac OS X (e.g. 10.6), and use it to run gdisk as outlined above on the disk containing your target partition.&lt;br /&gt;
&lt;br /&gt;
* boot using a Linux emergency disk and use it to run gdisk on the disk containing your target partition.&lt;br /&gt;
&lt;br /&gt;
* figure out how to disable Apple's &amp;quot;System Integrity Protection&amp;quot;, then run gdisk.&lt;br /&gt;
&lt;br /&gt;
For further information, see the gdisk home page link above.&lt;br /&gt;
&lt;br /&gt;
Please '''note''' that you don't need to worry about fs type in the case you use coreStorage based encryption as explained in the [[encryption]] wiki page.&lt;/div&gt;</summary>
		<author><name>Foobaron</name></author>	</entry>

	</feed>