-
Notifications
You must be signed in to change notification settings - Fork 40
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
Added Linux ZFS support.... Detect FreeBSD 10 or later #41
base: master
Are you sure you want to change the base?
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.
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...
zxfer
Outdated
@@ -240,7 +241,7 @@ get_os() { | |||
init_variables() { | |||
get_os "$option_T" | |||
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") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
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!