Issue #116

Developer discussions.

Issue #116

Postby thePoet » Sun Sep 14, 2014 6:47 pm

I was wondering if anyone had thought through a design for fixing issue #116 (f_mntfromname not being properly set to an entry in /dev)? After talking with one of the engineers at Apple, it turns out that this is the reason that VMDeviceID is NULL in FSGetVolumeParams (as originally theorized in this thread). I'd be interest in working on this problem as it would solve the last issue I have with OpenZFS and allow me to move from Zevo. Are there any discussions anywhere on how we might maintain compatibility with the subsystems of OpenZFS that expect FSGetVolumeParams to be a value other than what OS X wants it to be?
thePoet
 
Posts: 23
Joined: Sat May 24, 2014 8:12 am

Re: Issue #116

Postby lundman » Sun Sep 14, 2014 9:51 pm

We are already working on Issue 116, and it is moving forward little by little. The trick here is that for all datasets in a pool we have to create a fake (but working) /dev/diskX node. Then use this path when mounting the dataset. This means it is unique in mntfromname, and indeed, we have already demonstrated that FSGetVolumeParams works correctly. It also pleases Spotlight enough to work (occasionally).

But it is far from ready. Right now, the nodes are only created on import time. Not if you create a new dataset etc.

You can follow the commits here:
https://github.com/openzfsonosx/zfs/commits/issue116
User avatar
lundman
 
Posts: 1335
Joined: Thu Mar 06, 2014 2:05 pm
Location: Tokyo, Japan

Re: Issue #116

Postby thePoet » Mon Sep 15, 2014 4:37 pm

Glad to hear things are moving forward. If I can be of any help, let me know. I don't have a lot of time to dedicate to the project, but could take on small tasks to help move things along, especially if you already have a design worked out and can point me to specific items you'd like implemented.
thePoet
 
Posts: 23
Joined: Sat May 24, 2014 8:12 am

Re: Issue #116

Postby thePoet » Thu Sep 18, 2014 6:14 pm

Would it be helpful to have someone testing this branch, or is the stability not ready for that yet?
thePoet
 
Posts: 23
Joined: Sat May 24, 2014 8:12 am

Re: Issue #116

Postby lundman » Thu Sep 18, 2014 6:26 pm

No, its still very much hack'n'slash. Very specific sequence of import -N, zfs mount, and diskutil unmount etc to get it to work.

At the moment, Spotlight appears to work in each ZFS, unless they are mounted inside ZFS. Ie, zfs1/zfs2/ will work on zfs1, but not zfs2.
User avatar
lundman
 
Posts: 1335
Joined: Thu Mar 06, 2014 2:05 pm
Location: Tokyo, Japan

Re: Issue #116

Postby lundman » Sun Dec 14, 2014 4:05 pm

mail:/etc/postfix# zfs list
NAME USED AVAIL REFER MOUNTPOINT
rpool 481G 433G 94.5K /rpool

mail:/etc/postfix# uname -a
SunOS 11 snv_151a i86pc i386 i86xpv



The pool is always mounted by default, especially in SunOS, Solaris, IllumOS, FreeBSD and so on. It is true that on Solaris, if you use Boot Environments, that "/" (rootfs) is a dataset under the pool, but that is more for Boot Environment to be able to change which dataset to boot next. Even in those situations, the pool is mounted.

If Apple used to not mount the pool by default, then they diverged from the standard. Creating a pool, will always also create a pool dataset.

Now, if you still don't want to mount the pool, you can use the dataset properties to make that be the case. If anything, ZFS is flexible.

What Issue116 is about is creating a /dev/diskXX entry for each mount. If you have mounts; pool/ pool/A pool/B, then issue116 will create /dev/disk03 /dev/disk03s1 /dev/disk03s2. So that each mount will be using a unique /dev/diskXX when mounting. This is required in OSX, as all Installer scripts checks mount-from against the string /dev/disk to know if it is a volume. (Silly, but that's how it is).
User avatar
lundman
 
Posts: 1335
Joined: Thu Mar 06, 2014 2:05 pm
Location: Tokyo, Japan

Re: Issue #116

Postby thePoet » Sat Jun 20, 2015 5:26 pm

Lundman,

I've been following the checkins to the issue116_manual branch and was wondering if you are getting to the point where a tester would be beneficial. I'm still interested because of my hope it will enable support for some third party software I need, and I'm happy to run through some hoops to mount the drives if that is what is necessary.

Jared
thePoet
 
Posts: 23
Joined: Sat May 24, 2014 8:12 am

Re: Issue #116

Postby lundman » Sun Jun 21, 2015 4:24 pm

You are welcome to give it a test if you want, you need to do a full "make install" to get the bundles in. Can't guarantee that it wont panic of course. It theory, it should handle all the ZFS cases that creates new dataset (create, clone, recv) and should create a new pseudo /dev/disk and mount using the /dev/disk node. If you find some command that doesn't, I'll have to fix it.

What definitely doesn't work right is the mounting of snapshots automatically. This is what I am working on now.
User avatar
lundman
 
Posts: 1335
Joined: Thu Mar 06, 2014 2:05 pm
Location: Tokyo, Japan


Return to OpenZFS on OS X Development

Who is online

Users browsing this forum: Google [Bot] and 10 guests

cron