Sharing ZFS Volume: AFP, SMB, NFS, whatever!

Moderators: jhartley, MSR734, nola

Sharing ZFS Volume: AFP, SMB, NFS, whatever!

Post by mkush » Wed Nov 28, 2012 1:10 pm

I have a Mac Pro running 10.8.2 and Zevo 1.1.1. Has a 4-drive RAID10 ZFS volume. Runs well, no real issues with Zevo.

My problem comes because I want to share the ZFS volume.

I have heard that AFP does not work well with non-HFS volumes although I have not done much testing of that. I assumed that I should use SMB instead. I set it up, sharing the root of the ZFS volume. I can connect to it from other Macs but my access to it is odd.

Odd? Like this: sometimes I seem to be able to write files to it, sometimes not. I've noticed that I seem to be able to write files such as text and RTF but *NOT* files such as DMG. I successfully watched a video DVD image stored on the server, across the network, but was unable to double-click and view a MOV.

What happens when the write fails? The Finder on the client is simply stuck on the "preparing to copy" window and never progresses. Eventually (after an hour? not sure) I get an error message. Can't recall the content but was not terribly helpful. In the case of a failed read, I believe I just get a beach ball forever.

I really want to run ZFS, can't have peace about not doing so, but I can't seem to share the volume correctly. What am I doing wrong? Should I use NFS instead? I tried to use Samba (the open-source implementation, via SMBUp) but Samba won't start so I'm stuck there too.

Thanks in advance.
mkush Offline


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

Re: Sharing ZFS Volume: AFP, SMB, NFS, whatever!

Post by grahamperrin » Wed Nov 28, 2012 1:46 pm

Without going into detail, some of which is unrelated to ZFS:

  • aim to share anything other than the root of a volume

– share a subdirectory. There may be more than that to a workaround but (sorry) now's not the time for me to go into detail.

Topics about AFP include viewtopic.php?t=20 (2012-09-16).
grahamperrin Offline

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

Re: Sharing ZFS Volume: AFP, SMB, NFS, whatever!

Post by mkush » Wed Nov 28, 2012 2:16 pm

Thanks, I will try sharing a folder.

I'm curious about NFS. I've never used it but it sounds interesting. Sounds like the whole gist of it is mount a remote volume as if it is local. Sounds great.

Can anyone provide any wisdom or point me in the direction of a good Mac tutorial covering both the sharing and connecting? I do have OS X 10.8 server if that helps. It's not currently installed but could be.
mkush Offline


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

Re: Sharing ZFS Volume: AFP, SMB, NFS, whatever!

Post by grahamperrin » Wed Nov 28, 2012 4:32 pm

mkush wrote:… Mac tutorial covering both the sharing and connecting? …


Mac Basics: File Sharing

Mac Help: Share your files

Mac Help: Connect to shared computers and file servers on a network

mkush wrote:…I'm curious about NFS. I've never used it but it sounds interesting. Sounds like the whole gist of it is mount a remote volume as if it is local. …


From the FreeBSD Handbook: Network File System (NFS)

I have little experience with NFS but from what I recall, here's a key difference between the basic concepts of AFP and NFS:

  • with AFP you might share globally, and a client anywhere might use credentials to connect
  • with NFS you might share to all IP addresses within a network, and any client within that network might connect without credentials.

That's a huge oversimplification of what can be done with NFS but if you dig deeper, it's likely that you'll find AFP easier (with OS X or with OS X Server) to administer.
grahamperrin Offline

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

Re: Sharing ZFS Volume: AFP, SMB, NFS, whatever!

Post by mkush » Wed Nov 28, 2012 6:38 pm

Thanks. I'm fine on sharing in general and apart from my Macs at home I administer a mid-sized Windows network. Nevertheless the links may help someone. The point was more how to do it with NFS, since that seems hidden, at least as far as the GUI. There is another thread regarding NFS and I have asked there too. It seems to be just a matter of editing a few text files and starting the service.

Thanks again.
mkush Offline


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

Re: Sharing ZFS Volume: AFP, SMB, NFS, whatever!

Post by grahamperrin » Wed Nov 28, 2012 9:58 pm

Years ago I used NFS Manager, the developer Marcel Bresink is well respected (for this and other products). I just never continued with NFS because my colleagues' use cases didn't require it.

I vaguely recall another good utility with a GUI, open source and/or free, if I stumble across it I'll add a note here.

We use AFP over the WAN.

Little use of SMB because users of Windows are a minority, and although I can make exceptions in the campus firewall for those few users I'm still cautious (maybe unnecessarily so) about widespread access to the SMB service. From years ago I recall that Windows file services were prone to vulnerabilities, and I never bothered to investigate whether comparable attacks/vulnerabilities were as likely with Samba as with Microsoft implementations.
grahamperrin Offline

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

Re: Sharing ZFS Volume: AFP, SMB, NFS, whatever!

Post by mkush » Thu Nov 29, 2012 12:06 am

I saw NFS Manager too and was tempted. The file-based config looks simple enough that I think I'll try it that way first.

Regarding AFP and the "liberate" hack, Graham, have you tried it? From the looks of the other thread, looks safe and stable.

If NFS works, I think it actually sounds good to me the way you described it, for my home network anyway. Hopefully that will work and that will be that.

Thanks again.
mkush Offline


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

Re: Sharing ZFS Volume: AFP, SMB, NFS, whatever!

Post by mkush » Thu Nov 29, 2012 2:04 am

Sharing a folder did not work either. And neither did NFS. So now, all sharing protocols exhibit exactly the same behavior, at least as it regards writing. I can't write to a shared ZFS volume using any of them.

If I share something on my (HFS) boot SSD, that share works fine (at least under NFS which is what I'm currently targeting).

I am just about convinced it has to do with permissions on the ZFS volume. I wonder if I'm doing something wrong in the creation or permission setting on the ZFS volume.

I create it like this:
sudo zpool create -f -o ashift=12 -O casesensitivity=insensitive -O normalization=formD -O utf8only=on ZFS1 mirror /dev/disk2 /dev/disk1 mirror /dev/disk4 /dev/disk3

If I try to write to it in that state, I have no permissions. So I do a get info on it from the Finder sidebar and add my user with read/write privileges. That's all. Then I copy stuff to it.

After that, I share either the root of the ZFS volume or any folder on it and get the same behavior, pretty much, varying only slightly depending on which file sharing protocol I use.

If I use SMB, the Finder says it is preparing to copy files but never proceeds. If I cancel the copy, it does cancel after a LONG time and I get the error:

The Finder can't complete the operation because some data in "X.dmg" can't be read or written. (Error code -36)

Before I "knew better" and used AFP, I'm pretty sure the behavior was the same.

Using NFS, slightly different but the end result is the same. Immediately after I drag the file, I get a dialog saying "Finder wants to make changes. Type your password to allow this." This doesn't make sense since I have permission to the folder I'm copying to. Or at least a user by the same name as me does on the server system. Is there a key there? Is it not enough to be using the same username? Anyway, I supply my password, then it says there is another file by the same name already there. But there really wasn't. If I say replace it, the operation fails quickly and I end up with a file by the correct name but 0 bytes in size. If I say keep both files, the operation hangs at preparing to copy per SMB above.

I am really confused. I feel like I'm missing something really simple. My problem should be easy to recreate for anyone. Just make a new ZFS volume (using a command like mine if any of the options matter), give yourself permission to it, share it or a folder on it using the protocol of your choice (SMB seems easiest), connect to it from another computer, and try to write to it.

Thanks a LOT for any help.
mkush Offline


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

Re: Sharing ZFS Volume: AFP, SMB, NFS, whatever!

Post by mk01 » Thu Nov 29, 2012 2:25 am

AFP on ZFS (even Zevo) works with the liberate hack - although hack is a strong word, no system files are changed in any way. If you apply, it should work flawless exactly the way as on you boot SSD disk.

NFS works really differently and with the issues I'm currently going through - with some chance they are not relevant only for my environment - I would not recommend to start playing without some experience, because at the end of the day you can't be clear whether it's miss configuration on you side or other issue you will fight hours and days with no result.
mk01 Offline


 
Posts: 65
Joined: Mon Sep 17, 2012 1:16 am

-O normalization=formD -O utf8only=on

Post by grahamperrin » Thu Nov 29, 2012 2:45 am

… 
Code: Select all
-O normalization=formD -O utf8only=on

… 

For most use cases, both those file system options are superfluous with ZEVO Community Edition 1.1.1; no need to specify them at time of creation .

References

The man page for zfs(8) with ZEVO Community Edition 1.1.1, in particular the normalization property.

NFD: normalization=formD (normalisation form D), in particular the summary.
grahamperrin Offline

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

Next

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 2 guests

cron