HOW TO: Share ZFS using AFP

This forum is to find answers to problems you may be having with ZEVO Community Edition.

Moderators: jhartley, MSR734, nola

Re: HOW TO: Share ZFS using AFP

Post by hendrst1 » Thu Nov 29, 2012 12:07 pm

I would like to try this but I am not a programmer and need more explicit instructions. I am comfortable using the command line and have the Xcode developer tools installed. Is that all I need? Appreciate some help with this.
hendrst1 Offline


 
Posts: 14
Joined: Sun Nov 25, 2012 2:15 pm

Re: HOW TO: Share ZFS using AFP

Post by mkush » Fri Nov 30, 2012 1:29 am

I'm not finished doing it yet, but in case you're waiting for an answer, here is what I've done so far:

1. Go to https://developer.apple.com/downloads/index.action. If you aren't signed up, sign up.

2. Download Command Line Tools, for either Lion or Mtn Lion. Install.

3. Go to https://github.com/joshado/liberate-applefileserver.

4. Click the button with a cloud icon with a down arrow that says ZIP. A file will download to your downloads folder and expand into a folder there called liberate-applefileserver-master.

Open a command prompt and do the following:

5. Go to the recently downloaded folder.
Code: Select all
cd ~/downloads/liberate-applefileserver-master

6. Compile the .dylib file from the .m file. Note that a pre-compiled .dylib file is supplied but the one I generated was a different size, plus the supplied one seems to be a year old, so it seems best to just go ahead and compile fresh. Note that if you're content to use the pre-complied .dylib file, you don't have to download the tools from Apple as stated above in step 2. Again, I do not recommend that way but feel free to try!
Code: Select all
gcc -dynamiclib -Wall -undefined dynamic_lookup -o liberate-fileserver.dylib liberate.m

7. Now, run the supplied script to make a folder to house the .dylib file, copy it there, and inject it into the AppleFileServer daemon.
Code: Select all
sudo ./installLiberate.zsh

8. Restart the computer.

That's where I'm at now. That should be all there is to it if I'm understanding correctly. Hope that helps you. Hope it helps me!
mkush Offline


 
Posts: 34
Joined: Tue Sep 25, 2012 4:36 pm

Re: HOW TO: Share ZFS using AFP

Post by mkush » Fri Nov 30, 2012 2:24 am

It works!!!!!!!!!!!! (I'm really happy in case you can't tell... this has been bugging me for a long time.) :D :D :D :D :D

Never did get SMB or NFS to work right, but I can both read and write using AFP now.

One really irritating thing that happened last night testing NFS... I didn't know it was happening but when I would try to copy a file to the NFS share and nothing was seemingly happening, it was actually creating THOUSANDS of files by the same name as the file I was trying to copy (File 1, File 2, File 1000, etc.) all of zero size. Now I've gotta delete them all... But I'm still happy!
mkush Offline


 
Posts: 34
Joined: Tue Sep 25, 2012 4:36 pm

Re: HOW TO: Share ZFS using AFP

Post by hendrst1 » Fri Nov 30, 2012 9:47 pm

mkush,

That worked great! Much appreciated!
hendrst1 Offline


 
Posts: 14
Joined: Sun Nov 25, 2012 2:15 pm

Concurrent use of multiple AFP clients

Post by grahamperrin » Fri Dec 21, 2012 3:10 am

Please, has any user of joshado/liberate-applefileserver tested to see whether the adapted AFP service works perfectly:

  • with multiple AFP clients concurrently connecting
  • with multiple AFP clients concurrently browsing the same remote directory/folder
  • with multiple AFP clients concurrently accessing the same file.

If there's any problem with concurrency that is not found without concurrency, then I guess that the best place to report will be at Issues · joshado/liberate-applefileserver.

Thanks
grahamperrin Offline

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

Re: HOW TO: Share ZFS using AFP

Post by hendrst1 » Fri Dec 21, 2012 9:34 am

I just started three concurrent streams of the same music file from iTunes on three separate machines with the liberate fix on two of them and no issues observed. That would seem to meet all three of your tests.
hendrst1 Offline


 
Posts: 14
Joined: Sun Nov 25, 2012 2:15 pm

Re: HOW TO: Share ZFS using AFP

Post by zzz » Sun Dec 23, 2012 11:55 am

I've noticed that Spotlight doesn't fully work across AFP. It returns results but most of the them don't show a location in the path bar and the file icon is missing. Some results show the icon and path but the path is for completely different file. Maybe this is one reason why Apple has hardwired AFP to HFS+?
zzz Offline


 
Posts: 1
Joined: Sat Sep 15, 2012 5:16 am

Steering

Post by grahamperrin » Wed Dec 26, 2012 3:47 am

zzz wrote:… the path is for completely different file …


Please aim for troubleshooting – thanks.
grahamperrin Offline

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

Re: HOW TO: Share ZFS using AFP

Post by vicacid » Wed Jan 16, 2013 1:27 am

Many, many thanks to the folks on this thread for all of your help and information. I finally got the liberated hack to work on ML (10.8.2, non-server) but noticed a few things that I wanted to pass along:

  • I used the xcrun command instead of installing the CLTs. The command line I used was:
    Code: Select all
    xcrun gcc --sysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/ -dynamiclib -Wall -undefined dynamic_lookup -o liberate-fileserver.dylib liberate.m
  • Make sure you use gcc and not clang. I used clang the first time but it didn't seem to fix the AFP sharing problems. Recompiling with gcc and re-installing the dylib enabled AFP sharing of the ZFS fs's to work.
  • You just need to stop and then restart the file sharing preference (although a full restart may be good if you run into issues).
  • I noticed that, when opened in Finder, the shared root/pool fs's don't show any child fs's -- I expected the child fs's to appear at least as directories if not as fs's. However it looks like if you have files or regular subdirectories in the root/pool fs's then those will show in Finder. My assumption then is that one must access child fs's directly to see their files and directories, at least when accessing children of a root/pool fs.

Hope this info helps anyone else that may run into any issues getting this hack to work.
vicacid Offline


 
Posts: 1
Joined: Thu Nov 01, 2012 11:07 am

Re: HOW TO: Share ZFS using AFP

Post by isgarch » Tue Feb 19, 2013 5:41 am

mkush wrote:I'm not finished doing it yet, but in case you're waiting for an answer, here is what I've done so far:
Hope that helps you.


It did, thank you very much!
isgarch Offline


 
Posts: 1
Joined: Mon Feb 18, 2013 9:13 am

PreviousNext

Return to Troubleshooting

Who is online

Users browsing this forum: bileyqrkq, ilovezfs, toduefiwu and 0 guests

cron