So, this is a first version of the FreeNas Plugin (
tested with FreeNas 9.10) :
Be careful, the attachment is in reality a .tar.gz, but i had to rename it's extension in order to be accepted. so it's not a .txt.
You should do "Save as" and rename it with .tar.gz extension.
What you have to do for use it:
Code:
- copy the freenasCustomStorage.tar.gz on you pve cluster
- cd /
- tar xvfz /<path>/freenasCustomStorage.tar.gz
You have to follow the
Storage: ZFS over iSCSI - Proxmox VE for set up the
/etc/pve/priv/zfs ssh keys
You have to configure the FreeNas user to use for connecting through the REST API
Code:
vi /usr/share/perl5/PVE/Storage/Custom/LunCmd/FreeNas.pm
>> Adapt lines containing 'freenas_user' and 'freenas_password'
Also, you have to configure your storage:
with a definition of a new storage like this:
Code:
freenas: iscsiFreeNas
portal xxx.xx.x.xxx
pool volFAST
target iqn.2016-12.fr.nephri.iscsi:pve
iscsiprovider istgt
blocksize 4k
content images
sparse 0
nowritecache 1
After that, we have to restart the pve daemon (
after FreeNas iSCSI target is set up) :
Code:
systemctl restart pvedaemon
You can check if your storage is up with this command:
If you have trouble, you have some logs into
/var/log/syslog
On the FreeNAS side :
You have to start the iSCSI service.
And after, you have to configure it:
- define a target base name in "
Target Global Configuration". in my example, i used "
iqn.2016-12.fr.nephri.iscsi"
- define a portal in "
portals" with "
Discovery Auth Method" set to "
None"
- configure allowed initiators in "
Initiators" with
ALL/ALL
- create a target in "
Targets", in my example, i used "
pve". Select your portal and initiators. But in "
Auth Method", select "
None".
- it's done
TODO WORK
I want to define a proper method for configure the freenas_user and freenas_password.
I would support a CHAP auth method, because at this time FreeNas must be configured with an open-bar strategy.