zfs for /Users directory?

Moderators: jhartley, MSR734, nola

zfs for /Users directory?

Post by marcomwest » Mon Sep 17, 2012 11:20 am

Hi. I'm having some issues with a ZFS Mirror that I use to store for my /Users directory.

I am booting off of a SSD drive. I was using a stand-alone HFS+ hard drive as my data store, but want the awesome data-protection features ZFS offers.

I created a 2TB ZFS Mirror and moved my /Users directory over to it. I then changed that account's info so that it uses: /Volumes/userdataz/Users/***

My problem is that permissions seem to be wonky and I can't get disk utility to repair permissions on the zfs volume. The repair permissions option is grayed out on the ZFS volume. Works fine on the HFS+ SSD.

I changed the owner and group using the terminal, but performance has been kind of slow.

I have enough RAM, 24GB and use an 8 core MacPro. Running 10.7.4.

Any ideas of suggestions? I really would hate to go back to a HFS+ drive for my /Users data store.

Thanks!

MW
marcomwest Offline


 
Posts: 4
Joined: Sat Sep 15, 2012 12:03 pm

Re: zfs for /Users directory?

Post by Nathaniel » Mon Sep 17, 2012 4:54 pm

marcomwest wrote:My problem is that permissions seem to be wonky and I can't get disk utility to repair permissions on the zfs volume. The repair permissions option is grayed out on the ZFS volume. Works fine on the HFS+ SSD.


I don't know how to resolve your actual permissions issues (they should be fixed through chmod/chown, no?), but I can tell you that "Repair Disk Permissions" in Disk Utility only makes changes on a system volume, which of course has to be HFS+. All it does it set the system folders and files back to the state they should be on a freshly installed system -- it doesn't touch anything in user data, 3rd party applications, external drives, other volumes, etc. It isn't a wide-ranging "make things sane" command.

If you want to reset permissions and ACLs to default on a user folder, you would need to boot to the recovery HD (or install DVD) and run the "resetpassword" utility, which will let you select an account and reset permissions and ACLs. Since the recovery partition and install DVD can't see anything stored in ZFS, that won't work for you.

I think you need to narrow down precisely what the actual issue is. Is there a reason you believe permissions are causing performance problems? Are there permissions errors in the log files?

You can remove all ACLs from the user directories via
Code: Select all
sudo chmod -RN  /Volumes/userdataz/Users/
then chmod/chown as you want for appropriate security. The ACLs are only there to prevent users from doing things like deleting their ~/Documents folder or locking themselves out of their own data, so they shouldn't affect normal operation at all.
Nathaniel Offline


 
Posts: 3
Joined: Sat Sep 15, 2012 1:20 am

Re: zfs for /Users directory?

Post by marcomwest » Thu Sep 20, 2012 6:34 pm

Hi, thanks for your reply.

I was able to fix the permissions, by setting the owner of each user to itself and the group to staff. Prior to this I was able to login to a test account and but failed to see anything appear on the desktop. I copied the folder over initially as an admin user, but the permissions seem to have been set on all user directories as owned by the admin user.

That seems to be fixed now.

The performance problems I have seen involve copying large files from a network server over to the ZFS mirror.

There appear to be lots of stalls as the data is written. I was able to use istat pro's disk write graph and I can see definite oscillating, with high writes speeds that then drop to zero for a little bit then jump up then to zero repeatedly, almost like stuttering. Peaks and valleys is what it looks like.

Any ideas what would cause this and how it might be fixed?

I toyed with setting up a ZFS disk library some time ago with FreeNAS and recall seeing a similar issue. That test machine only had 4GB of RAM, my MacPro has 24GB.
marcomwest Offline


 
Posts: 4
Joined: Sat Sep 15, 2012 12:03 pm

Re: zfs for /Users directory?

Post by audiophil » Fri Sep 21, 2012 10:16 am

I frequently set up macs with /Users moved to secondary hard disks and I have found that an easy way to sidestep permissions irregularities (and not have to fix anything after the fact) is to transfer the /Users/Username/ directory with permissions intact is to use Carbon Copy Cloner with a clone configured only to move the specified user directory and not overwrite files on the destination drive. It moves all the custom permissions for the user directory over with no other fiddling necessary. I think ccc is a commercial product now, but there should be other software with similar capabilities.
audiophil Offline


 
Posts: 15
Joined: Sat Sep 15, 2012 1:51 pm

Re: zfs for /Users directory?

Post by si-ghan-bi » Fri Sep 21, 2012 10:37 am

You can use the trial for that task.
si-ghan-bi Offline


 
Posts: 145
Joined: Sat Sep 15, 2012 5:55 am

Re: zfs for /Users directory?

Post by daniel.jozsef » Mon Oct 29, 2012 9:27 pm

I'm also planning to do this, in fact since I have a 3Tb hard drive, I want to create a 750Gb partition for the system, and format the rest as zfs for the Users folder.
I'm pretty confident that I'd know how to do this on Linux, but I have doubts on OSX. :) How can I use just a slice as a device in a zpool as opposed to a disk? Since I had trouble with my Linux-created old zfs drives BECAUSE zevo uses slices and not disks, I'd think this should be simple, but the documentation is no help.
And what command or tool should I create that slice with?

And once that's done, I wonder, can I have the zfs daemon automount the User folder on startup?
Last edited by daniel.jozsef on Tue Oct 30, 2012 6:12 am, edited 1 time in total.
daniel.jozsef Offline


 
Posts: 14
Joined: Sun Sep 30, 2012 2:26 pm

cross reference

Post by grahamperrin » Tue Oct 30, 2012 12:20 am

This post moved to viewtopic.php?p=1270#p1270 under zpool from a single slice on the boot disk
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: ilovezfs and 2 guests

cron