Finder, ZEVO and export of pools – the value of export

Moderators: jhartley, MSR734, nola

Finder, ZEVO and export of pools – the value of export

Post by grahamperrin » Thu Mar 21, 2013 7:35 pm

Spun off from viewtopic.php?p=4320#p4320

raattgift wrote:The finder eject button only sends an unmount volume command except in cases of removable media, to which it sends an eject; it's not very smart with regard to multiple vfs filesystems sharing the same underlying storage.

The zfs vfs happily unmounts datasets for the Finder, but the only way to remove a pool gracefully is via the command line (zpool export poolname).

You almost certainly don't want the Finder eject button (or a drag to trash) to do a pool export, as that will unmount every volume on the pool.

Arguably ZFS as a whole might benefit from the system exporting a pool when the last dataset is unmounted, but I don't think there would be universal agreement on that, and I also don't think that the ZEVO port should depart from the others on that point without a lot of thinking about future support burden and so on.

Removing devices when a zpool is still imported (even when no datasets are mounted) is treated as a device fault, which will degrade or fault a pool depending on the vdev the device was part of. In most cases when devices are reattached, ZFS will automatically DTRT. This was tested heavily at Sun over the years. However, with arbitrary privileged code that reaches around behind the vfs layer's back to talk to the individual devices, one can only make guesses about what could happen.

… 

FWIW, I rarely use the finder eject button (and even more rarely drag-to-trash) in general anyway; I typically have lots of Terminal and iTerm windows open (sometimes xterm too) and/or am logged in via ssh. I also make use of CoreStorage, SoftRaid, and ZFS simultaneously on a couple of systems, and the Apple GUI apps tend to suffer or cause confusion. (Also FWIW, I still have yet to navigate into a .zfs/snapshot directory with the Finder rather than using the CLI to do read-only stuff (mainly cp/rsync/less) old data).

On the other hand, I think there is broad agreement that zfs should adopt the Mac look-and-feel as much as possible, and so feedback from enthusiasts/early-adopters tripping over problems when using typical Mac GUI tools is likely useful.

Finally, this particular problem is architectural. Here's the starting message a lonnnnnnnng thread from 2009 on exactly the topic of unmounting vs exporting. The tl;dr version is, "this has been in TFM for years (prior to 2009), nobody's submitted a compelling change request or open source code patch, and while this is safe to do for enterprise disks, consumer disks, enclosures, bridge chipsets, etc, can do things that have not been the focus of battle testing".

http://mail.opensolaris.org/pipermail/z ... 26087.html


Interesting!

I realised, long ago, that export could be done from the command line.

I assumed that eject/unmount of all file systems from a pool is followed by export.

I assumed that with ZEVO Community Edition 1.1.1 the export is dynamic, because:


– and I thought that those notifications appeared more often than my use of zpool export … commands.

My memory is not mistaken. From ZEVO QuickStart Guide.pdf for Silver Edition 1.0:

Ten’s Complement LLC wrote:If you have Growl notifications enabled (see notifications section), you will see a “pool exported” message each time a ZEVO volume is unmounted.
grahamperrin Offline

User avatar
 
Posts: 1596
Joined: Fri Sep 14, 2012 10:21 pm
Location: Brighton and Hove, United Kingdom

Ease of export

Post by grahamperrin » Thu Mar 21, 2013 7:57 pm

From a Mac perspective, for ease of export:

  • interaction with Finder should suffice
  • command lines should be unnecessary

– if this isn't true for ZEVO Community Edition 1.1.1, then it should be an ideal for the future.

My experience with the combination of Finder plus ZEVO without Terminal is that ZEVO is an exemplary citizen.

The current quick start guide mentions export in only one place, and that's without reference to the command line. (I'm not avoiding the command line. Simply observing that I usually work without it.)

With HardwareGrowler, without Growl

If I use Finder to eject the file system at the root of a pool (other file systems are in this pool, but not mounted), there is:

  1. notification of unmount
  2. no notification of export
  3. then in Terminal, nothing to export:

2013-03-22 01-10-09 screenshot.png
OS X 10.8.3 screenshot of Terminal alongside notifications
2013-03-22 01-10-09 screenshot.png (139.74 KiB) Viewed 62 times


Finder aside, there may be edge cases. I'm reminded of the following topic:

grahamperrin Offline

User avatar
 
Posts: 1596
Joined: Fri Sep 14, 2012 10:21 pm
Location: Brighton and Hove, United Kingdom

Messages from kernel during export then disconnection

Post by grahamperrin » Fri Mar 22, 2013 2:44 am

For reference

Without using Finder to eject, here are ZEVO-related messages for:

  • an export at 07:32
  • a USB disconnection at 07:33

Code: Select all
2013-03-22 07:32:30.000 kernel[0]: zfsx_unmount: '/Volumes/tall/com.apple.backupd' (umount)
2013-03-22 07:32:31.000 kernel[0]: zfsvfs_teardown: '/Volumes/tall/com.apple.backupd' (txg_wait_synced in 1298 ms)
2013-03-22 07:32:33.000 kernel[0]: zfsx_unmount: '/Volumes/tall' (umount)
2013-03-22 07:32:33.000 kernel[0]: zfsvfs_teardown: '/Volumes/tall' (txg_wait_synced in 966 ms)
2013-03-22 07:32:35.000 kernel[0]: zfsx_vdm_close: 'disk7s2'
2013-03-22 07:32:35.000 kernel[0]: zfsx_vdm_close: 'disk9s2'
2013-03-22 07:33:31.000 kernel[0]: ZFSLabelScheme:willTerminate: this 0xffffff804622b800 provider 0xffffff803adf8e00 'zfs vdev for 'tall''
2013-03-22 07:33:31.000 kernel[0]: ZFSLabelScheme:willTerminate: this 0xffffff804622b800 provider 0xffffff803adf4700 'zfs vdev for 'tall''
2013-03-22 07:33:31.000 kernel[0]: ZFSLabelScheme:stop: 0xffffff804622b800 goodbye 'zfs vdev for 'tall''
2013-03-22 07:33:31.000 kernel[0]: ZFSLabelScheme:stop: 0xffffff804622b800 goodbye 'zfs vdev for 'tall''
grahamperrin Offline

User avatar
 
Posts: 1596
Joined: Fri Sep 14, 2012 10:21 pm
Location: Brighton and Hove, United Kingdom


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 2 guests

cron