ZFS filesystems with Finder and Dock

757 views
Skip to first unread message

Daniel M. Zimmerman

unread,
Dec 21, 2010, 2:44:41 AM12/21/10
to zfs-...@googlegroups.com
I just created a ZFS pool (which, in a feat of originality, I called "ZFS")
and a number of nested filesystems, and I'm having some interesting issues
with them; I figured I'd just ask a few questions and see what kind of
answers I get.

First, is there a known way (by changing mount points or other such
trickery) to get Finder to display a ZFS filesystem under "Devices" in the
sidebar, rather than only displaying the top level of the "ZFS" pool? I
thought mounting the filesystem directly into "/Volumes" (by changing the
mount point with "zfs set mountpoint=/Volumes/Foo ZFS/Foo") might work for
that purpose, but unfortunately it does not. It mounts into /Volumes, but
does not show up in Finder as I'd hoped (oh well).

Another question: attempting to launch applications on such a mounted
volume using the Dock results in the application getting a "?" icon and not
launching; however, launching the app from the command line (or from the
Finder after an "open" of its containing folder from the command line)
causes the dock icon to correctly bounce and indicate the app is running.
Anybody have any idea what might cause that?

Finally, Sparkle had a problem updating one of my applications, or rather
cleaning up after itself, because it did not have permission to move the
old app to the trash. Does each zfs filesystem get its own ".Trashes", and
if so, do I have to create it myself with some specific permissions to get
it to work?

Thanks in advance for any assistance with any of these issues...

-Dan Zimmerman

------------------------------------------------------------------
Daniel M. Zimmerman TFF Enterprises
1900 Commerce St. Box 358426 http://www.tffenterprises.com/~dmz/
Tacoma, WA 98402 USA d...@tffenterprises.com

Daniel M. Zimmerman

unread,
Dec 30, 2010, 11:25:40 PM12/30/10
to zfs-...@googlegroups.com
It's clearly bad form to reply to my own questions, but I figured (since
nobody else did) that perhaps they got lost in the holiday shuffle - or,
perhaps, were too naïve to be acknowledged? :) In any event, I have
solved one issue (noted inline, below), but the others remain.

Thanks in advance for any assistance!


--On 21 December 2010 02:44:45 -0500 "Daniel M. Zimmerman"
<dmz+...@tffenterprises.com> wrote:

> I just created a ZFS pool (which, in a feat of originality, I called
> "ZFS") and a number of nested filesystems, and I'm having some
> interesting issues with them; I figured I'd just ask a few questions and
> see what kind of answers I get.
>
> First, is there a known way (by changing mount points or other such
> trickery) to get Finder to display a ZFS filesystem under "Devices" in
> the sidebar, rather than only displaying the top level of the "ZFS" pool?
> I thought mounting the filesystem directly into "/Volumes" (by changing
> the mount point with "zfs set mountpoint=/Volumes/Foo ZFS/Foo") might
> work for that purpose, but unfortunately it does not. It mounts into
> /Volumes, but does not show up in Finder as I'd hoped (oh well).

I have not solved this issue; suggestions would be highly appreciated.

> Another question: attempting to launch applications on such a mounted
> volume using the Dock results in the application getting a "?" icon and
> not launching; however, launching the app from the command line (or from
> the Finder after an "open" of its containing folder from the command
> line) causes the dock icon to correctly bounce and indicate the app is
> running. Anybody have any idea what might cause that?

Similarly, I have not solved this issue.

> Finally, Sparkle had a problem updating one of my applications, or rather
> cleaning up after itself, because it did not have permission to move the
> old app to the trash. Does each zfs filesystem get its own ".Trashes",
> and if so, do I have to create it myself with some specific permissions
> to get it to work?

This issue, I solved by messing with the permissions on ".Trashes" and
restarting Finder, which did not pick up the fixed permissions immediately.
So the trash (as well as Sparkle) is working fine.

-Dan

Alex Blewitt

unread,
Dec 31, 2010, 4:35:22 AM12/31/10
to zfs-...@googlegroups.com, zfs-...@googlegroups.com
On 31 Dec 2010, at 04:25, "Daniel M. Zimmerman" <dmz+...@tffenterprises.com> wrote:

> It's clearly bad form to reply to my own questions, but I figured (since nobody else did) that perhaps they got lost in the holiday shuffle

Yeah, it was on my TOREPLY list ;-)

> --On 21 December 2010 02:44:45 -0500 "Daniel M. Zimmerman" <dmz+...@tffenterprises.com> wrote:
>
>> First, is there a known way (by changing mount points or other such
>>
>> trickery) to get Finder to display a ZFS filesystem under "Devices" in
>> the sidebar

At the moment, no. I believe that Finder has built in support for certain classes of things (including devices) but a filesystem shares the device of the pool which makes it a little less convenient.

There may be a way of showing a filesyatem as a pseudo device but would have to be a code change and probably a new filesystem property to make it work.

Note that the "places" section in Finder is mutable so you can open the containing folder and then drag a link from your FS children. OSX also still supports a folder called "Favourites" in your user folder, which if created shows up in Finder as a separate section, from which you can create symlinks.

>
>> Another question: attempting to launch applications on such a mounted
>> volume using the Dock results in the application getting a "?" icon and
>> not launching; however, launching the app from the command line (or from
>> the Finder after an "open" of its containing folder from the command
>> line) causes the dock icon to correctly bounce and indicate the app is
>> running. Anybody have any idea what might cause that?

I note the same behaviour from time to time. If you drag it out of dock and then back in again does it fix it? It may be a resource fork issue. Does this occur on the root pool filesystem or sub filesystems?

If you can raise an issue at the google code project it would be good.

>
Alex

Daniel M. Zimmerman

unread,
Jan 19, 2011, 7:17:56 PM1/19/11
to zfs-...@googlegroups.com
--On 31 December 2010 9:35:22 +0000 Alex Blewitt <alex.b...@gmail.com>
wrote: (in response to my earlier question, quoted below)

>>> Another question: attempting to launch applications on such a mounted
>>> volume using the Dock results in the application getting a "?" icon and
>>> not launching; however, launching the app from the command line (or from
>>> the Finder after an "open" of its containing folder from the command
>>> line) causes the dock icon to correctly bounce and indicate the app is
>>> running. Anybody have any idea what might cause that?
>
> I note the same behaviour from time to time. If you drag it out of dock
> and then back in again does it fix it? It may be a resource fork issue.
> Does this occur on the root pool filesystem or sub filesystems?
>
> If you can raise an issue at the google code project it would be good.

It's on sub-filesystems, and yes, it turns out dragging it in and out of
the Dock does replace it... but it also seems that sub-filesystems are more
trouble than they're worth at the moment (unable to be indexed by
Spotlight, and in some cases unable to be viewed by Finder - for example,
going to my own home directory, which is a subfilesystem, and typing "open
." in Terminal results in a Finder window displaying the icon for my ZFS
pool and spinning forever trying to calculate its size - the same happens
when clicking the "Home" button in Finder).

As a result, I'm thinking of ditching my sub-filesystems - at least, the
ones that I want to be indexed :) - and renaming my pool to fit better into
my naming scheme for volumes... but I can't rename the pool. I tried "zpool
export"/"zpool import", but the import always reports that the pool doesn't
exist, even though it happily remounts at boot time (or, interestingly,
using the "mount" button in Disk Utility).

I checked the "zpool history", and saw this:

2011-01-19.16:05:34 zpool export ZFS
2011-01-19.16:07:18 zpool import -f 10166826338018346169

The first is my export by hand from Terminal; the second is what appeared
in the log when Disk Utility mounted the pool (the same also appears when
it is mounted at boot).

Any idea how I can successfully rename this pool - or, indeed, what's going
on with it not realizing the pool exists once it's been exported? I'm on
the 74.0.1 bits, Snow Leopard on a 2010 Mac Pro. It wouldn't be a tragedy
to have to rebuild the pool from scratch, since I have all the data
elsewhere... but this really should work, I think, and it's somewhat
disturbing that it doesn't.

Thanks in advance for any insight!

Alex Blewitt

unread,
Jan 19, 2011, 7:42:21 PM1/19/11
to zfs-...@googlegroups.com, zfs-...@googlegroups.com


Sent from my iPad

On 20 Jan 2011, at 00:17, "Daniel M. Zimmerman" <dmz+...@tffenterprises.com> wrote:

--On 31 December 2010 9:35:22 +0000 Alex Blewitt <alex.b...@gmail.com> wrote: (in response to my earlier question, quoted below)

If you can raise an issue at the google code project it would be good.

Did you raise an issue?

It's on sub-filesystems, and yes, it turns out dragging it in and out of the Dock does replace it... but it also seems that sub-filesystems are more trouble than they're worth at the moment (unable to be indexed by Spotlight, and in some cases unable to be viewed by Finder - for example, going to my own home directory, which is a subfilesystem, and typing "open ." in Terminal results in a Finder window displaying the icon for my ZFS pool and spinning forever trying to calculate its size - the same happens when clicking the "Home" button in Finder).

Yeah, I have seen that too. I think both are related to missing fsid support. I tried to investigate over Christmas but didn't get too far with it. 

Note you can open a subfolder and then go up a level iirc. 


As a result, I'm thinking of ditching my sub-filesystems - at least, the ones that I want to be indexed :)

Does spotlight even work on the top level? I thought it didn't. 

- and renaming my pool to fit better into my naming scheme for volumes... but I can't rename the pool. I tried "zpool export"/"zpool import", but the import always reports that the pool doesn't exist, even though it happily remounts at boot time (or, interestingly, using the "mount" button in Disk Utility).

I've not tried the import, nor do I know how the second comes into play here off the top of my head.

Any idea how I can successfully rename this pool - or, indeed, what's going on with it not realizing the pool exists once it's been exported? I'm on the 74.0.1 bits, Snow Leopard on a 2010 Mac Pro. It wouldn't be a tragedy to have to rebuild the pool from scratch, since I have all the data elsewhere... but this really should work, I think, and it's somewhat disturbing that it doesn't.

Why do you need to rename the pool? You could just change the mountpoint instead.

Alex

Daniel M. Zimmerman

unread,
Jan 19, 2011, 8:17:46 PM1/19/11
to zfs-...@googlegroups.com

--On 20 January 2011 0:42:21 +0000 Alex Blewitt <alex.b...@gmail.com>
wrote:

>>> If you can raise an issue at the google code project it would be good.


>
> Did you raise an issue?

I haven't yet; I will at some point in the hopefully-not-too-distant future.

>> It's on sub-filesystems, and yes, it turns out dragging it in and out of
>> the Dock does replace it... but it also seems that sub-filesystems are
>> more trouble than they're worth at the moment (unable to be indexed by
>> Spotlight, and in some cases unable to be viewed by Finder - for
>> example, going to my own home directory, which is a subfilesystem, and
>> typing "open ." in Terminal results in a Finder window displaying the
>> icon for my ZFS pool and spinning forever trying to calculate its size -
>> the same happens when clicking the "Home" button in Finder).
>
> Yeah, I have seen that too. I think both are related to missing fsid
> support. I tried to investigate over Christmas but didn't get too far
> with it.
>
> Note you can open a subfolder and then go up a level iirc.

I believe that's the case, as well, but that seems like a nuisance -
especially when I want the Finder to open windows on my home directory by
default.

>> As a result, I'm thinking of ditching my sub-filesystems - at least, the
>> ones that I want to be indexed :)
>
> Does spotlight even work on the top level? I thought it didn't.

Hmm... Somehow I thought it did. If it doesn't, that may make it difficult
for me to live on ZFS at all (I depend pretty heavily on tools like Alfred,
which make heavy use of the indexes). I guess I can try it at least. It
does seem to work on the root of the pool, from my admittedly limited tests
so far (create text file with known text in it at root of pool, search for
known text in spotlight).

>> Any idea how I can successfully rename this pool - or, indeed, what's
>> going on with it not realizing the pool exists once it's been exported?
>> I'm on the 74.0.1 bits, Snow Leopard on a 2010 Mac Pro. It wouldn't be a
>> tragedy to have to rebuild the pool from scratch, since I have all the
>> data elsewhere... but this really should work, I think, and it's
>> somewhat disturbing that it doesn't.
>
> Why do you need to rename the pool? You could just change the mountpoint
> instead.

Ah. That hadn't actually occurred to me. And it worked for changing the
mountpoint... but it still appears in Finder with the name of the pool,
which is somewhat confusing. I guess that if I can't figure out how to
actually rename the pool (export/import really should work for that, from
everything I'd read), I'll just end up re-creating it so that the names all
match.

sammy ominsky

unread,
Jan 19, 2011, 9:48:51 PM1/19/11
to zfs-...@googlegroups.com
On 20 Jan 2011, at 00:17, "Daniel M. Zimmerman" wrote:


>> - and renaming my pool to fit better into my naming scheme for volumes... but I can't rename the pool. I tried "zpool export"/"zpool import", but the import always reports that the pool doesn't exist, even though it happily remounts at boot time (or, interestingly, using the "mount" button in Disk Utility).

How did you do the rename? I once accidentally renamed one pool with the name of a second by trying to mount them with the same command. As I learned the hard way, that is the actual method of renaming, as below. I have 2 pools, geniza and Archive. I tried to mount them as follows:

zpool import -f geniza Archive

This renamed geniza to Archive, which already existed. I ended up very confused because the original Archive did not mount, but geniza did, as Archive. I also had a pool that wouldn't mount, that only showed up as a similar string to what you said. I had to physically remove the disks of the second pool (the original Archive), export -f Archive (the original geniza), then import -f Archive geniza. This put things back where I expected them to be, and I reinserted the Archive disks, imported it, and all was well.

sambo

Daniel M. Zimmerman

unread,
Jan 19, 2011, 10:02:22 PM1/19/11
to zfs-...@googlegroups.com

--On 19 January 2011 21:48:51 -0500 sammy ominsky <s...@avoidant.org> wrote:

> On 20 Jan 2011, at 00:17, "Daniel M. Zimmerman" wrote:

>> - and renaming my pool to fit better into my naming scheme for
>> volumes... but I can't rename the pool. I tried "zpool export"/"zpool
>> import", but the import always reports that the pool doesn't exist,
>> even though it happily remounts at boot time (or, interestingly, using
>> the "mount" button in Disk Utility).

> How did you do the rename? I once accidentally renamed one pool with the
> name of a second by trying to mount them with the same command. As I
> learned the hard way, that is the actual method of renaming, as below. I
> have 2 pools, geniza and Archive. I tried to mount them as follows:
>
> zpool import -f geniza Archive

As I wrote (in the part you quoted), I didn't successfully do the rename,
because executing the command you wrote above - which I understand to be
the correct way of renaming a ZFS pool - was impossible. zpool told me my
original pool didn't exist after I exported it (even though it remounted
correctly on reboot and/or when requested in Disk Utility).

Bjoern Kahl

unread,
Jan 20, 2011, 1:19:59 PM1/20/11
to zfs-...@googlegroups.com

Dear all,

Am Thursday 20 January 2011 schrieb Daniel M. Zimmerman:
> --On 19 January 2011 21:48:51 -0500 sammy ominsky <s...@avoidant.org> wrote:
> > On 20 Jan 2011, at 00:17, "Daniel M. Zimmerman" wrote:
> >> - and renaming my pool to fit better into my naming scheme for
> >> volumes... but I can't rename the pool. I tried "zpool export"/"zpool
> >> import", but the import always reports that the pool doesn't exist,
> >> even though it happily remounts at boot time (or, interestingly, using
> >> the "mount" button in Disk Utility).

> As I wrote (in the part you quoted), I didn't successfully do the rename,


> because executing the command you wrote above - which I understand to be
> the correct way of renaming a ZFS pool - was impossible. zpool told me my
> original pool didn't exist after I exported it (even though it remounted
> correctly on reboot and/or when requested in Disk Utility).

You can try the following:

- zpool export the to-be-renamed pool
- run "zpool import" -- its just that, no more parameters! This should
give you a list of pools you can import, alongside there numeric id
- run "zpool import _numeric_id_ _pool_name_you_want_"

That should work.

Best
Björn Kahl
--
| Bjoern Kahl +++ Siegburg +++ Germany |
| "googlelogin@-my-domain-" +++ www.bjoern-kahl.de |
| Languages: German, English, Ancient Latin (a bit :-)) |

signature.asc

Daniel M. Zimmerman

unread,
Jan 20, 2011, 1:47:46 PM1/20/11
to zfs-...@googlegroups.com

--On 20 January 2011 19:19:59 +0100 Bjoern Kahl
<googl...@bjoern-kahl.de> wrote:

> You can try the following:
>
> - zpool export the to-be-renamed pool
> - run "zpool import" -- its just that, no more parameters! This should
> give you a list of pools you can import, alongside there numeric id
> - run "zpool import _numeric_id_ _pool_name_you_want_"
>
> That should work.

Agreed, it should work... Sadly, it didn't - it just said "no pools
available". What I've ended up doing is just recreating the pool with the
name I wanted, since, as I had said, I have all the data elsewhere.

(I'm now having trouble restocking the pool with data, whereby one of my 12
cores starts running at 100% and the ditto process I'm using hangs, but
haven't determined whether or not that's ZFS's fault yet)

Dan Bethe

unread,
Jan 20, 2011, 2:27:43 PM1/20/11
to zfs-macos

> Agreed, it should work... Sadly, it didn't - it just said "no pools
> available". What I've ended up doing is just recreating the pool with the

I don't know if this is relevant to your situation, but the next thing
I do when 'zpool import' doesn't work is 'zpool import -d /dev' which
will scan all files in that directory for usable zpools.

Daniel M. Zimmerman

unread,
Jan 20, 2011, 2:35:53 PM1/20/11
to zfs-...@googlegroups.com

Excellent tip, thanks. It might well have worked, though of course I
destroyed the old pool before I had a chance to try it. I will definitely
try it should I encounter the same problem again (which I hope won't happen
anytime soon).

Alex Blewitt

unread,
Jan 20, 2011, 7:36:11 PM1/20/11
to zfs-...@googlegroups.com

On 20 Jan 2011, at 01:17, Daniel M. Zimmerman wrote:

> --On 20 January 2011 0:42:21 +0000 Alex Blewitt <alex.b...@gmail.com> wrote:
>
>>>> If you can raise an issue at the google code project it would be good.
>>
>> Did you raise an issue?
>
> I haven't yet; I will at some point in the hopefully-not-too-distant future.

<nudge>

>>> It's on sub-filesystems, and yes, it turns out dragging it in and out of
>>> the Dock does replace it... but it also seems that sub-filesystems are
>>> more trouble than they're worth at the moment (unable to be indexed by
>>> Spotlight, and in some cases unable to be viewed by Finder - for
>>> example, going to my own home directory, which is a subfilesystem, and
>>> typing "open ." in Terminal results in a Finder window displaying the
>>> icon for my ZFS pool and spinning forever trying to calculate its size -
>>> the same happens when clicking the "Home" button in Finder).
>>
>> Yeah, I have seen that too. I think both are related to missing fsid
>> support. I tried to investigate over Christmas but didn't get too far
>> with it.
>>
>> Note you can open a subfolder and then go up a level iirc.
>
> I believe that's the case, as well, but that seems like a nuisance - especially when I want the Finder to open windows on my home directory by default.

Would be good to know when this was introduced; for example, if it was in the 72->74 transition or the 74->74.0.1 transition. That might give a clue as to why this behaviour is seen in Finder - it may be that the off-by-two error also exists for attributes and I need to fix that as well.

Alex

gk

unread,
Jan 21, 2011, 12:05:08 AM1/21/11
to zfs-macos

What I would really like to see is for me to be able to change the
mountpoint to /Volumes/fs and have my filesystem appear there.

So, I did some digging, and I found that when a zfs filesystem is
mounted, zfs sets the nobrowse option on the mount, which causes the
filesystem not to appear in the Finder.

here's a trimmed output from 'mount':

tank on /Volumes/tank (zfs, local)
tank/s on /Volumes/tank/s (zfs, local, nobrowse)

I did a simple change in some apple-specific code in zfs_vfsops.c, and
I was able to make the filesystem appear in the Finder:

--- a/usr/src/uts/common/fs/zfs/zfs_vfsops.c
+++ b/usr/src/uts/common/fs/zfs/zfs_vfsops.c
@@ -1206,8 +1206,10 @@ zfs_mount(vfs_t *vfsp, vnode_t *mvp, struct
mounta *uap, cred_t *cr)
zfsvfs_t *zfsvfs = NULL;

/* Make the Finder treat sub file systems just like a
folder */
+#if 0
if (strpbrk(osname, "/"))
vfs_setflags(mp, (u_int64_t)((unsigned
int)MNT_DONTBROWSE));
+#endif

/* Indicate to VFS that we support ACLs. */
vfs_setextendedsecurity(mp);

Of course, there are gotchas: For example, The filesystem appears as
a folder on the desktop, and as a network disk on the sidebar. I
don't know why. Even if I copy a .VolumeIcon.icns in the root
directory of the filesystem, I don't see the right thing happen.

Also, there must be some code somewhere that strips everything after
the first '/' in the filesystem name, so my filesystem appears to have
the same name as the pool in the Finder.

On the positive side, though, spotlight works. And I can change the
mountpoint to be /Volumes/fs.

I am not sure, but this change may also help Daniel with zfs home
directories. Maybe Finder gets confused if you have a home directory
on a filesystem that is nobrowse?

I'll keep digging.

George


On Jan 20, 4:36 pm, Alex Blewitt <alex.blew...@gmail.com> wrote:
> On 20 Jan 2011, at 01:17, Daniel M. Zimmerman wrote:
>

Alex Blewitt

unread,
Jan 21, 2011, 2:45:50 AM1/21/11
to zfs-...@googlegroups.com, zfs-macos
On 21 Jan 2011, at 05:05, gk <kyri...@gmail.com> wrote:

> What I would really like to see is for me to be able to change the
> mountpoint to /Volumes/fs and have my filesystem appear there.

You should be able to do this via zfs set already?

> So, I did some digging, and I found that when a zfs filesystem is
> mounted, zfs sets the nobrowse option on the mount, which causes the
> filesystem not to appear in the Finder.

Right; I think that was so servers with hundreds of filesystems wouldn't have Finder overload. Nobrowse is a mount option which disables this behaviour - but also seems to disable spotlight as well. (One can configure Finder to not show such mounted devices too.)

You also need the mountpoint to be set as "local" as well for spotlight to work.

> The filesystem appears as
> a folder on the desktop, and as a network disk on the sidebar.

Right, that's what NOBROWSE does as well as spotlight enable/disable.

> Even if I copy a .VolumeIcon.icns in the root
> directory of the filesystem, I don't see the right thing happen.

I'm not sure at the interplay for volumeicons here - it may only be consulted at mount time. Also I don't know if it's consulted for automount systems, which zfs also sets.

> Also, there must be some code somewhere that strips everything after
> the first '/' in the filesystem name, so my filesystem appears to have
> the same name as the pool in the Finder.

Probably - there were a number of issues in Finder before like that. I'm not sure if we can work around that at the VFS layer though.

> I am not sure, but this change may also help Daniel with zfs home
> directories. Maybe Finder gets confused if you have a home directory
> on a filesystem that is nobrowse?

Possibly :-) But others indicated it's a recent regression - I want to check against earlier builds to see b

> I'll keep digging.

Thanks, I appreciate it.

Rather than making it either/or, it might make sense to have it wrapped around a value which can be sysctl'd to give people the option to decide what to do at runtime.

>
Alex

George Kyriazis

unread,
Jan 21, 2011, 11:25:29 AM1/21/11
to zfs-...@googlegroups.com

On Jan 20, 2011, at 11:45 PM, Alex Blewitt wrote:

> On 21 Jan 2011, at 05:05, gk <kyri...@gmail.com> wrote:
>
>> What I would really like to see is for me to be able to change the
>> mountpoint to /Volumes/fs and have my filesystem appear there.
>
> You should be able to do this via zfs set already?
>

Yes and no. If I change the mountpoint to /Volumes, yes, it does mount there, but it doesn't appear in the Finder.

>> So, I did some digging, and I found that when a zfs filesystem is
>> mounted, zfs sets the nobrowse option on the mount, which causes the
>> filesystem not to appear in the Finder.
>
> Right; I think that was so servers with hundreds of filesystems wouldn't have Finder overload. Nobrowse is a mount option which disables this behaviour - but also seems to disable spotlight as well. (One can configure Finder to not show such mounted devices too.)
>

You are right about pool with many subsystems; you wouldn't want all of them to appear in your desktop.

> You also need the mountpoint to be set as "local" as well for spotlight to work.
>

'local' is already specified in zfs mounts already. That's why spotlight works when I did my change, I guess.

>> The filesystem appears as
>> a folder on the desktop, and as a network disk on the sidebar.
>
> Right, that's what NOBROWSE does as well as spotlight enable/disable.
>
>> Even if I copy a .VolumeIcon.icns in the root
>> directory of the filesystem, I don't see the right thing happen.
>
> I'm not sure at the interplay for volumeicons here - it may only be consulted at mount time. Also I don't know if it's consulted for automount systems, which zfs also sets.
>

I tried to unmount and re-mount the filesystem, but the icon did not change; that's what surprised me.

>> Also, there must be some code somewhere that strips everything after
>> the first '/' in the filesystem name, so my filesystem appears to have
>> the same name as the pool in the Finder.
>
> Probably - there were a number of issues in Finder before like that. I'm not sure if we can work around that at the VFS layer though.
>

Yes, good point.

>> I am not sure, but this change may also help Daniel with zfs home
>> directories. Maybe Finder gets confused if you have a home directory
>> on a filesystem that is nobrowse?
>
> Possibly :-) But others indicated it's a recent regression - I want to check against earlier builds to see b
>
>> I'll keep digging.
>
> Thanks, I appreciate it.
>
> Rather than making it either/or, it might make sense to have it wrapped around a value which can be sysctl'd to give people the option to decide what to do at runtime.
>

Is there a policy about adding apple-specific properties that you can get/set from the command line? This seems like a good candidate. Is it OK to add something apple-specific? An argument against it is that eventually you may end up with a lot of settings that are platform-specific, which may be too confusing.

Thanks,

George

>>
> Alex

Alex Blewitt

unread,
Jan 21, 2011, 1:06:53 PM1/21/11
to zfs-...@googlegroups.com, zfs-...@googlegroups.com
On 21 Jan 2011, at 16:25, George Kyriazis <kyri...@gmail.com> wrote:

> On Jan 20, 2011, at 11:45 PM, Alex Blewitt wrote:
>
>> On 21 Jan 2011, at 05:05, gk <kyri...@gmail.com> wrote:
>>
>>> What I would really like to see is for me to be able to change the
>>> mountpoint to /Volumes/fs and have my filesystem appear there.
>>
>> You should be able to do this via zfs set already?
>>
> Yes and no. If I change the mountpoint to /Volumes, yes, it does mount there, but it doesn't appear in the Finder.

Odd. Does it show up from Terminal.app? Maybe it's related to the nobrowse again.

> You are right about pool with many subsystems; you wouldn't want all of them to appear in your desktop.

So the question is how to configure this appropriately.

> I tried to unmount and re-mount the filesystem, but the icon did not change; that's what surprised me.

Maybe it was Finder info that was cached. Worth checking if restarting Finder would have helped, or even a 3-finger salute :-)

> Is there a policy about adding apple-specific properties that you can get/set from the command line?

Not a policy per se, but 74 only has filesystem properties (77 adds pool properties).

However, the addition of filesystem/pool properties has generally gone hand-in-hand with a filesystem or pool version bump. To that extent, I'm not sure if adding a property is possible without a version change, or if it's co-incidental that they have typically been added after an implementation detail.

> This seems like a good candidate. Is it OK to add something apple-specific?

I don't know if this will cause problems for compatibility down the line. A sysctl has the advantage of being out of bound but the disadvantage of being global.

Since Finder can be configured to not show mounts on desktop or in devices list, it might make sense to go with a global property so the end user can enable or disable as appropriate.

>

I added an issue to the list re controlling the mount opts from a sysctl var, along with some code that shows how to do it. I suggest we either have 2 properties (one for pool root, one for child filesystems) with bitflags for NOBROWSE etc, or one property and use a bitshift so the MSB is for the pool root and the LSB is for the children. So eg 0x10 might say browse for root and not for children and 0x01 for the reverse. Then 0x11 would enable for both. Other bits could be used for automount flag or local etc.

Alex

George Kyriazis

unread,
Jan 22, 2011, 1:41:51 AM1/22/11
to zfs-...@googlegroups.com

On Jan 21, 2011, at 10:06 AM, Alex Blewitt wrote:

> On 21 Jan 2011, at 16:25, George Kyriazis <kyri...@gmail.com> wrote:
>
>> On Jan 20, 2011, at 11:45 PM, Alex Blewitt wrote:
>>
>>> On 21 Jan 2011, at 05:05, gk <kyri...@gmail.com> wrote:
>>>
>>>> What I would really like to see is for me to be able to change the
>>>> mountpoint to /Volumes/fs and have my filesystem appear there.
>>>
>>> You should be able to do this via zfs set already?
>>>
>> Yes and no. If I change the mountpoint to /Volumes, yes, it does mount there, but it doesn't appear in the Finder.
>
> Odd. Does it show up from Terminal.app? Maybe it's related to the nobrowse again.
>

Yes, it is. In fact, it is documented in the mount man page:

nobrowse
This option indicates that the mount point should not be
visible via the GUI (i.e., appear on the Desktop as a
separate volume).


>> You are right about pool with many subsystems; you wouldn't want all of them to appear in your desktop.
>
> So the question is how to configure this appropriately.
>
>> I tried to unmount and re-mount the filesystem, but the icon did not change; that's what surprised me.
>
> Maybe it was Finder info that was cached. Worth checking if restarting Finder would have helped, or even a 3-finger salute :-)
>

I tried after a fresh reboot, and it didn't help.

>> Is there a policy about adding apple-specific properties that you can get/set from the command line?
>
> Not a policy per se, but 74 only has filesystem properties (77 adds pool properties).
>
> However, the addition of filesystem/pool properties has generally gone hand-in-hand with a filesystem or pool version bump. To that extent, I'm not sure if adding a property is possible without a version change, or if it's co-incidental that they have typically been added after an implementation detail.
>
>> This seems like a good candidate. Is it OK to add something apple-specific?
>
> I don't know if this will cause problems for compatibility down the line. A sysctl has the advantage of being out of bound but the disadvantage of being global.
>
> Since Finder can be configured to not show mounts on desktop or in devices list, it might make sense to go with a global property so the end user can enable or disable as appropriate.
>

Do you mean configured via the nobrowse option, or some other means?

>>
>
> I added an issue to the list re controlling the mount opts from a sysctl var, along with some code that shows how to do it. I suggest we either have 2 properties (one for pool root, one for child filesystems) with bitflags for NOBROWSE etc, or one property and use a bitshift so the MSB is for the pool root and the LSB is for the children. So eg 0x10 might say browse for root and not for children and 0x01 for the reverse. Then 0x11 would enable for both. Other bits could be used for automount flag or local etc.
>

Well, one property could be a pool property, and the other one be a fs property. I tried, and it is possible to unmount the parent pool, even if the child filesystem is mounted (provided there are no child filesystems mounted under the pool). It would be good to control the nobrowse property on a per-fs basis.

> Alex

George

Reply all
Reply to author
Forward
0 new messages