Experimenting with filesystems

Since macOS Sierra introduced the new Apple filesystem (APFS), designed by no other than Dominic Gianpaolo (of BeOS fame), I thought I’d give it a try. So I created an APFS volume on an external 3G hard disk, copied a few pictures on it, and started playing with it.

APFS runs FSCK every time???

It mostly worked, although it comes with dire warnings, and you have to pass an insane option to the diskutil commands to get rid of it:

ddd@Marypuce Pictures> diskutil apfs list
WARNING:  You are using a pre-release version of the Apple File System called
          APFS which is meant for evaluation and development purposes only.
          Files stored on APFS volumes may not be accessible in future releases
          of macOS.  You should back up all of your data before using APFS and
          regularly back up data while using APFS, including before upgrading
          to future releases of macOS.

But things quickly went south as soon as I disconnected and reconnected the disk. It did not mount instantly, because an fsck process (File System Check) was running. Once this completed, I could see my disk, but it took minutes. So I tried ejecting the disk again. And sure enough, I had fsck running again next time I mounted the disk.

So I decided to try something else. I installed ZFS for OSX. I had only heard praises about ZFS being so great and this and that, so I thought it would be interesting.

ZFS can’t remount an external disk without some black magic?

Again, things went smoothly. Well, mostly. You have to activate some special option for the disk to “look like” HFS+ if you want Photos to be able to use it.

But again, things went south as soon as I disconnected the disk from one machine to put it in another one. I did something terribly wrong, you see: I ejected the disk on one Mac, and attached it to another. And I got this helpful little error message:

sudo zfs mount PhotosZFS
cannot open 'PhotosZFS': pool I/O is currently suspended

It looks like this is a standard issue with ZFS. You have to do some magic to export or import your ZFS pools. Something that I could understand. What I cannot understand is this response, from a guy with nickname ilovezfs:

I see in IRC that the disk was actually disconnected and reconnected while the pool was imported. Given that this is a single partition pool, not a raidz or mirror vdev, there is no reason to expect the pool to continue to function after the device has been disconnected and reconnected without exporting it first. At that point, your only choice is to reboot.

So now you have this supposedly enterprise-grade, secure, checksummed, snapshotting, almost magical filesystem, but unmounting a disk and reconnecting it to another computer is so verboten there is no reason to expect the pool to continue to function? Well, yes, there is: every other filesystem on earth does that right. And suggesting the fix is to reboot? Give me a break.

I’ll try ZFS again in 10 years, when it knows how to deal with external disks and does not loose 350GB of data on its first day of operation.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s