Page 2 of 2

Re: How to configure a TRULY cross-platform ZFS

PostPosted: Thu Oct 10, 2019 5:29 pm
by lundman
Yes, the feature_flag differences are very frustrating, I've been taken by them in the past as well.

This is why, the major focus at the moment is to fix this. Here they are outlined:
https://docs.google.com/spreadsheets/d/ ... edit#gid=0

tracking the status as we work on bringing in parity.

Then we are working on making ZFS have one repository, with each OS as part of it. There are
huge changes to the ZOL repository, merging in FreeBSD right now, and at the pace they are going
it will be there soon. Once they are done, I will merge OsX into it as well. Suddenly, new feature_flags
will be available to all at the same time.

It is a lot of work, and other development has slowed down because of it, but I'd like to
believe it will be a good thing.

Re: How to configure a TRULY cross-platform ZFS

PostPosted: Sun Nov 10, 2019 7:57 pm
by Sharko
For what it is worth, I did a comparison of 'zpool upgrade -v' on my FreeNAS 11.2 U6 box and my zfs 1.9.2 installation, using BBEdit's 'Find differences' capability; what it said was that zfs 1.9.2 was completely a superset of the features in FreeNAS. The added features in zfs 1.9.2 were:

large_dnode
edonr
encryption
spacemap_v2
allocation_classes
bookmark_v2
resilver_defer

To me this implies that if I create a pool on FreeNAS it should be readable on OpenZFS on OS X ver 1.9.2; I'm about to try this out, as part of a larger project to get zxfer working between the two computers.

Re: How to configure a TRULY cross-platform ZFS

PostPosted: Thu Dec 12, 2019 2:46 pm
by Sigmoid
Great job looking at this guys, thanks. :)

It has happened that on the dawn of 20 bloody 20, the only modern file system with proper support on both Linux and Mac OS is ZFS. When moving 50 Gigabyte media files, using silly shit like exFAT or FAT32 is no longer feasible. The Mac OS ecosystem has nothing beyond experimental support for ext4 (including a $40 package that reportedly ruins ext4 volumes far too often), and as far as I know no support for BtrFS, while the Linux ecosystem has nothing beyond experimental support for APFS...

It's like how English was never meant to be a lingua franca, it was just thrust upon it... Nobody ever thought ZFS would be a good match for cross-platform removables, but hey, if there's only ONE choice, then it's automatically the right choice. Honestly, network sharing is a pain in the rear, so I'm going to set up some external ZFS drives as a sharing medium, using the great info you uncovered. I'll make sure to share my experiences. :)

Re: How to configure a TRULY cross-platform ZFS

PostPosted: Sat May 09, 2020 12:58 pm
by FadingIntoBlue
With Ubuntu 20.04 Focal Fossa released, I've been playing around trying to get a consistent method for being able to have a cross-platform pool. Having set a test one up from start, I also managed to make an existing one cross-platform accessible using the same guidelines. I am also successfully sharing the pool from the ubuntu side using samba.

Platforms and zfs versions
macOS Catalina 10.15.4 O3X and zfs 1.9.4.0
ubuntu 20.04 LTS server edition and zfs-0.8.3-1ubuntu12

Permissions
    Establish a zfsusers group on each platform and computer, with a common GID, eg 1200
    The GID must be higher than the bounds of system or reserved UIDs, eg +500 on macOS, +999 on Ubuntu. The GID on macOS can be changed without difficulty from the System Preferences:Users & Groups panel
    Set pool group as zfsusers and desired group permission as +r or +rw
    Make any user who should be able to access pools a member of zfsusers group
    UIDs then become irrelevant, both in same platform and cross platform situations
NB: this may not suit your security requirements in a production environment

Features
    Features must be the same on both platforms. In effect, if there are any differences in available features, one platform must be a superset of the other.
    Some features may not conflict, unless enabled, testing may be required.
NB: 'zpool upgrade -a' could potentially prevent a pool from continuing to be used cross platform. An upgrade check from the ubuntu version above produces the following output:

Code: Select all
~$ zpool upgrade
This system supports ZFS pool feature flags.
All pools are formatted using feature flags.
Some supported features are not enabled on the following pools. Once a
feature is enabled the pool may become incompatible with software
that does not support the feature. See zpool-features(5) for details.

POOL  FEATURE
———————
Offload-2020-02
      userobj_accounting
      project_quota


Hope this is helpful!

Re: How to configure a TRULY cross-platform ZFS

PostPosted: Sun May 10, 2020 5:27 am
by Albertdup
FadingIntoBlue wrote:Permissions
    Establish a zfsusers group on each platform and computer, with a common GID, eg 1200
    The GID must be higher than the bounds of system or reserved UIDs, eg +500 on macOS, +999 on Ubuntu. The GID on macOS can be changed without difficulty from the System Preferences:Users & Groups panel
    Set pool group as zfsusers and desired group permission as +r or +rw
    Make any user who should be able to access pools a member of zfsusers group
    UIDs then become irrelevant, both in same platform and cross platform situations
NB: this may not suit your security requirements in a production environment


Hi thanks for this info I am setting up a triple os share Windows Mac and Linux and this is going to help a lot. I am new to ZSF so still learning.

I managed to create a pool that I can use in Windows Mac and Linux(Ubuntu 20.4) I was just struggling with permissions in Catalina and Ubuntu. Files and Folders created in Windows can be changed without issues in Catalina and Ubuntu.

I created the zsfusers group in mac and set the id to 1200. How do I create such a group and ID in Linux and Windows?
How do I set pool group as zfsusers and set the permissions for +rw?

Thanks for the help.

Re: How to configure a TRULY cross-platform ZFS

PostPosted: Sun May 10, 2020 11:41 pm
by FadingIntoBlue
Glad you have made some progress with the issue. I'm not much of a windows user, so may not be able to assist much there.

I created the zsfusers group in mac and set the id to 1200. How do I create such a group and ID in Linux and Windows?

With Ubuntu:

Code: Select all
sudo groupadd -g 1200 zfsusers


will create the group. To add users to the group:

Code: Select all
sudo useradd -G zfsusers user_name


How do I set pool group as zfsusers and set the permissions for +rw?


Code: Select all
sudo chgrp zfsusers /pathto/poolname
sudo chmod 775 /pathto/poolname

(775 is equivalent to owner +rwx group +rwx everyone +rx)

As I say, with windows you are on your own a bit; Google is your friend

Hope that helps

Re: How to configure a TRULY cross-platform ZFS

PostPosted: Sat May 16, 2020 10:02 pm
by Albertdup
FadingIntoBlue wrote:Glad you have made some progress with the issue. I'm not much of a windows user, so may not be able to assist much there.

To add users to the group:

Code: Select all
sudo useradd -G zfsusers user_name



Hi, I think you meant this to add an existing user to a group.
Code: Select all
sudo usermod -a -G zfsusers user_name

Re: How to configure a TRULY cross-platform ZFS

PostPosted: Sun May 24, 2020 1:49 pm
by FadingIntoBlue
Hi, I think you meant this to add an existing user to a group.
Code: Select all
sudo usermod -a -G zfsusers user_name



Yes, I'd been adding new users to try and get the UID match, your command for the existing users is the correct one
Thanks