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

Failure when using openzfs port on remote server #53

Open
hxw opened this issue Oct 23, 2020 · 3 comments
Open

Failure when using openzfs port on remote server #53

hxw opened this issue Oct 23, 2020 · 3 comments

Comments

@hxw
Copy link

hxw commented Oct 23, 2020

  • the path /sbin/zfs is hard coded on the ssh lines
  • the openzfs port installs the zfs command to /usr/local/sbin/zfs
  • this was detected when updating FreeNAS 11→TrueNAS 12
@allanjude
Copy link
Owner

It is actually not hard coded:

LZFS=$( which zfs )
RZFS=$LZFS

Just make sure your PATH prefers /usr/local/sbin before /sbin and it should "do the right thing"

@hxw
Copy link
Author

hxw commented Oct 27, 2020

For the local side:

% command -v zfs
/sbin/zfs

For remote side:

freenas:~ # command -v zfs
/usr/local/sbin/zfs

/sbin/zfs is hard coded for -O and -T options:

zxfer/zxfer

Line 1943 in 1cc89cc

LZFS="ssh $OPTARG /sbin/zfs"

zxfer/zxfer

Line 1962 in 1cc89cc

RZFS="ssh $OPTARG /sbin/zfs"

I am using -T so I think the second line is the problem. I expect a separate ssh command -v zfs is necessary to get the remote path.

@hxw
Copy link
Author

hxw commented Oct 30, 2020

It just occurred to me that the PATH will be setup on the remote so ssh $OPTARG zfs should always work, so no need to hard code the /sbin path in the ssh commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants