45Drives / cockpit-zfs-manager

Cockpit ZFS Manager is an interactive ZFS on Linux admin package for Cockpit.
GNU Lesser General Public License v3.0
315 stars 26 forks source link

Alternative path required when using OpenZFS for zpool to allow listing of pools #28

Open isketerol64 opened 10 months ago

isketerol64 commented 10 months ago

When using OpenZfs, the binary for zpool is found in /usr/local/sbin and not in /sbin. This means that the ZFS pools will not be listed in the Cockpit ZFS module. An easy fix follows.

cd /sbin
ln -s /usr/local/sbin/zpool zpool

Once this is done, a fresh in the ZFS module should show the pools.

These other binaries also need to be linked in the same way to ensure that all functionality is available.

Thorazin commented 10 months ago

Could I use a symlink from /sbin to /user/local/sbin to accomplish the same thing?

wait, thats what your command does, right? yes, nevermind me...

isketerol64 commented 10 months ago

Could I use a symlink from /sbin to /user/local/sbin to accomplish the same thing?

wait, thats what your command does, right? yes, nevermind me...

I symlinked each of the binaries as I wanted to be sure to only pick up the binaries I wanted. A more elegant solution would be to modify the system PATH variable to include the OpenZFS binaries but again I wanted to be sure I only picked up the binaries I wanted.

Many different PATHs to the same result. :-)

Kevin

Thorazin commented 10 months ago

Could I use a symlink from /sbin to /user/local/sbin to accomplish the same thing? wait, thats what your command does, right? yes, nevermind me...

I symlinked each of the binaries as I wanted to be sure to only pick up the binaries I wanted. A more elegant solution would be to modify the system PATH variable to include the OpenZFS binaries but again I wanted to be sure I only picked up the binaries I wanted.

Many different PATHs to the same result. :-)

Kevin

I am a little slow, but I get there eventually...

Thorazin commented 9 months ago

Is this still working for you? It has stopped working for me and I am not sure why.

q5sys commented 9 months ago

@Thorazin I just tried this on a Rocky 9 box where I've manually compiled the latest openzfs and this symlink trick worked for me.

Thorazin commented 9 months ago

This may be of interest to some of you here. I rebuilt ZFS on a newly instally Ubuntu 22.04 LTS, again with the 6.5 HWE kernel but this time I followed the instructions to build a KMOD native Deb build as found here:

https://openzfs.github.io/openzfs-docs/Developer%20Resources/Custom%20Packages.html

and Cockpit is able to see the ZFS pools with zero modifications. No symlinking required.

isketerol64 commented 9 months ago

RedHat derivatives use a different directory for the binaries than does Debian hence the need to symlink.

On Wed, Feb 14, 2024, 19:51 Thorazin @.***> wrote:

This may be of interest to some of you here. I rebuilt ZFS on a newly instally Ubuntu 22.04 LTS, again with the 6.5 HWE kernel but this time I followed the instructions to build a KMOD native Deb build as found here:

https://openzfs.github.io/openzfs-docs/Developer%20Resources/Custom%20Packages.html

and Cockpit is able to see the ZFS pools with zero modifications. No symlinking required.

— Reply to this email directly, view it on GitHub https://github.com/45Drives/cockpit-zfs-manager/issues/28#issuecomment-1945188247, or unsubscribe https://github.com/notifications/unsubscribe-auth/AETP7UEQQGK2SGFZMI7EG73YTVLYXAVCNFSM6AAAAABBOUCSQCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNBVGE4DQMRUG4 . You are receiving this because you authored the thread.Message ID: @.***>