Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

We should document cross platform portability #7784

Closed
ryao opened this issue Aug 12, 2018 · 7 comments
Closed

We should document cross platform portability #7784

ryao opened this issue Aug 12, 2018 · 7 comments
Labels
Status: Stale No recent activity for issue Type: Documentation Indicates a requested change to the documentation

Comments

@ryao
Copy link
Contributor

ryao commented Aug 12, 2018

A person on Reddit was asking about taking a Linux made pool to FreeBSD. People mentioned feature flags, but I had a few other things to say:

The remarks others made about feature flags are correct. However, there are a few additional, but minor, concerns specific to moving pools made under Linux to other systems.

If you use xattr=sa, you will lose access to the extended attributes on FreeBSD because the IRIX-style Linux-specific xattr implementation provided by xattr=sa is not compatible with other platforms’ drivers. They will still be there, but inaccessible and will do nothing but take up some space. This extension predates feature flags.

Also, the POSIX ACLs are not cross platform compatible. They will just show up on other platforms as extended attributes unless you have xattr=sa set, which makes them invisible.

If you rely on xattrs or ACLs, you might want to recreate them on FreeBSD. It would not be a bad idea to remove ACLs from files and disable the POSIX ACL support while switching xattrs on any datasets with xattr=sa set to xattr=on and then removing and recreating them. It should be possible to script. In particular, I don’t know what will happen if you set xattr=sa on Linux, make some small extended attributes, move the pool to FreeBSD, set extended attributes there and then move it back to Linux. I’d need to look at the code to know, but I do not have time for that right now.

I probably should mention that there is a caveat for the reverse direction too. Linux’s NFSv4 ACL support is so broken that we never implemented it, so NFSv4 ACLs from other platforms will be hidden.

We should document this somewhere. I’d do it, but at the moment. I don’t know the behavior of the cases where:

  1. xattr=sa is set on Linux. The pool is taken to FreeBSD. Different extended attributes are made. The pool is taken back to Linux.
  2. xattr=sa is set on Linux. The pool is taken to FreeBSD. The same extended attributes are made, but with different contents. The pool is taken back to Linux.
  3. xattr=sa is set on Linux. The pool is taken to FreeBSD. A mix of different extended attributes and extended attributes with the same names are made. The pool is taken back to Linux.

Figuring this out is a low priority, so I am filing this issue to track it rather than looking into it.

@loli10K loli10K added the Type: Documentation Indicates a requested change to the documentation label Aug 12, 2018
@ryao
Copy link
Contributor Author

ryao commented Aug 12, 2018

This might also be helpful:

https://soluble.zgrep.org/zfs.html

@DeHackEd
Copy link
Contributor

xattr=sa would be a filesystem feature flag, not a pool feature flag. Does OpenZFS have a defined on-disk format for that yet?

@richardelling
Copy link
Contributor

Beyond ACLs, I think you'll find most of the feature flags take care of documentation themselves.

That said, I think there is merit to a cross-version test suite that tests for things like pool import and send/receive. This is a good topic for http://www.open-zfs.org/wiki/OpenZFS_Developer_Summit_2018

@ryao
Copy link
Contributor Author

ryao commented Aug 13, 2018

@DeHackEd It would be a filesystem feature flag. Actually doing that would require plenty of thought given that the change is in the wild.

@ryao
Copy link
Contributor Author

ryao commented Aug 13, 2018

@richardelling They do for the most part. However, the IRIX-style extended attributes hack we have in ZoL in the form of xattr=sa and ACLs merit some documentation. If anything, it will give us something we could use to answer the questions of "can I take a pool from platform X to platform Y" when platform X is Linux. The feature flags aren't a complete picture.

@ghfields
Copy link
Contributor

Want to link this to Issue #4966 (Implement NFS4 ACL Support) and the work being done in Pull #7728 (NFS4 ACL Support - WIP)

@stale
Copy link

stale bot commented Aug 25, 2020

This issue has been automatically marked as "stale" because it has not had any activity for a while. It will be closed in 90 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Status: Stale No recent activity for issue label Aug 25, 2020
@stale stale bot closed this as completed Nov 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Stale No recent activity for issue Type: Documentation Indicates a requested change to the documentation
Projects
None yet
Development

No branches or pull requests

5 participants