Added Linux ZFS support.... Detect FreeBSD 10 or later#41
Open
nurse-curtis wants to merge 6 commits intoallanjude:masterfrom
Open
Added Linux ZFS support.... Detect FreeBSD 10 or later#41nurse-curtis wants to merge 6 commits intoallanjude:masterfrom
nurse-curtis wants to merge 6 commits intoallanjude:masterfrom
Conversation
Testing initial support for Linux OpenZFS cross-platform. Also added conditions as FreeBSD cannot handle 'zoned' and 'snapdev' properties, and attempting to detect FreeBSD 10+ so that 'aclmode' and 'aclinherit' are allowed. Add that Linux OS check as cannot handle 'aclmode', 'jailed', and 'shareiscsi'.
Several syntax errors and missed junk line.
Added 'volmode' to Linux unsupported properties. Now ZFS working from FreeBSD to Linux.
Author
|
Oh, and to further show my allegiance primarily being to FreeBSD, I factored in the significance of adding Linux support as only being worthy of a bump to version 1.1.7. A huge Canadian fan of BSD Now too! |
Missed Linux property 'acltype'
…xt,defcontext,fscontext,overlay,relatime,rootcontext Unable to retrieve uname -r from target OS, so detecting FreeBSD 10+ is broken. No idea what I'm missing...
allanjude
reviewed
Nov 15, 2017
| dest_os="$output_os" | ||
| # Stupid way to detect if FreeBSD 10 through 19 | ||
| # Stupid way to detect if FreeBSD 10 through 19 - BROKEN | ||
| dest_osver=$(printf %.1s "$output_osver") |
Owner
There was a problem hiding this comment.
The best way to do this is likely to use 'uname -K', which will output something like: 1101001
And you can then just do 'if [ $osver -gt 11000000 ];
for 11.0 and up
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Okay, so I primarily use FreeBSD, but I do have a Linux box and a couple VM's that use ZFS. So I added an OS check condition for Linux so that unsupported properties are dealt with. At least I was only able to determine that jailed,aclmode,shareiscsi,and volmode don't work when receiving from FreeBSD.
*** This is currently broken as it does not seem to check uname of the target when using -T hostname
As well, I noticed that the latest version was restricting current versions of FreeBSD even though aclmode and aclinherit are now supported. So to ensure this was not just a Linux adaptation of an amazing tool, I added a really dumb check to differentiate between FreeBSD >= 10 and <10 (using the first number of the release version, so it isn't future-proofed after FreeBSD 19...)
This is my first attempt at something like this, so any feedback is appreciated!