Skip to main content

Install FreeNAS Initiator

When the cluster is used a convergent model with TrueNAS, the patches need to be installed for the FreeNAS Initiator to show under the storage dialogue

GitHub Repo

 

Option 1


Connect to each node and install the following keys
curl https://ksatechnologies.jfrog.io/artifactory/ksa-repo-gpg/ksatechnologies-release.gpg -o /etc/apt/trusted.gpg.d/ksatechnologies-release.gpg
curl https://ksatechnologies.jfrog.io/artifactory/ksa-repo-gpg/ksatechnologies-repo.list -o /etc/apt/sources.list.d/ksatechnologies-repo.list
Then issue the following to install the package

Line 3 may now be in the code after I put in the GitHub issue. Link

apt update
apt install freenas-proxmox -y
systemctl restart pvescheduler.service

 

Option 2


This is the manual way to do this. However, I don't do it this way now that there is a package to install. The benefit to the package is that once Proxmox is updated, the TrueNAS configurations are not overwritten.

 

Let's create the SSH keys on the Proxmox boxes. (The IP must match your iSCSI Portal IP) You only need to create the keys on one node if they are clustered as the keys will replicate to the other nodes.

$portal_ip=192.168.2.252
mkdir /etc/pve/priv/zfs
ssh-keygen -f /etc/pve/priv/zfs/$portal_ip_id_rsa
ssh-copy-id -i /etc/pve/priv/zfs/$portal_ip_id_rsa.pub root@$portal_ip
Enable "Log in as root with password" under Services -> SSH on the FreeNAS box.

Make an SSH connection from every node to the iSCSI Portal IP

ssh -i /etc/pve/priv/zfs/$portal_ip_id_rsa root@$portal_ip

 

Install the REST client on every node
apt-get install librest-client-perl git

 

Download the patches on every Proxmox node
git clone https://github.com/TheGrandWazoo/freenas-proxmox

 

Install the patches on every Proxmox node

These can be run all at once but it is harder to see the output

cd freenas-proxmox
patch -b /usr/share/pve-manager/js/pvemanagerlib.js < pve-manager/js/pvemanagerlib.js.patch
patch -b /usr/share/perl5/PVE/Storage/ZFSPlugin.pm < perl5/PVE/Storage/ZFSPlugin.pm.patch
patch -b /usr/share/pve-docs/api-viewer/apidoc.js < pve-docs/api-viewer/apidoc.js.patch
cp perl5/PVE/Storage/LunCmd/FreeNAS.pm /usr/share/perl5/PVE/Storage/LunCmd/FreeNAS.pm

 

Restart the PVE services
systemctl restart pvedaemon
systemctl restart pveproxy
systemctl restart pvestatd

If you are using a cluster restart the following services as well.

systemctl restart pve-ha-lrm
systemctl restart pve-ha-crm
systemctl restart pvescheduler.service

Reload the PVE webgui. Now FreeNAS-API should be available as an iSCSI provider.