Proxmox
Adding an NFS Share to Proxmox
These steps will show how to share a dataset snpool1/nfs
via NFS to a Proxmox host.
-
On Proxmox, Navigate to
Datacenter -> Storage -> Add -> NFS
: -
Fill out the revelant information, using the service VIP as the
Server
address, and select the NFS Share from theExport
Drop down list: -
When finished click
Add
. The share is ready to use.
Configuring ZFS over iSCSI
These steps show how to configure an RSF-1 Cluster to allow connection to Proxmox for ZFS over iSCSI storage.
In this example RSF-1 is installed on Debian Linux using LIO
as the iSCSI backend, with a clustered pool debp1
that has the VIP 10.6.19.21
Setting up Cluster Nodes
-
For Proxmox to be able to connect to the cluster, iSCSI target iqn and TPG needs to be created. This is done by running the command
targetcli /iscsi create
:# targetcli /iscsi create Created target iqn.2003-01.org.linux-iscsi.mgdeb1.x8664:sn.87b5fb15ba09. Created TPG 1. Global pref auto_add_default_portal=true Created default portal listening on all IPs (0.0.0.0), port 3260.
You can view the created target and TPG by running
targetcli ls
:# targetcli ls o- / ............................................................................. [...] o- backstores .................................................................. [...] | o- block ...................................................... [Storage Objects: 0] | o- fileio ..................................................... [Storage Objects: 0] | o- pscsi ...................................................... [Storage Objects: 0] | o- ramdisk .................................................... [Storage Objects: 0] o- iscsi ................................................................ [Targets: 1] | o- iqn.2003-01.org.linux-iscsi.mgdeb1.x8664:sn.87b5fb15ba09 .............. [TPGs: 1] | o- tpg1 ................................................... [no-gen-acls, no-auth] | o- acls .............................................................. [ACLs: 0] | o- luns .............................................................. [LUNs: 0] | o- portals ........................................................ [Portals: 1] | o- 0.0.0.0:3260 ......................................................... [OK] o- loopback ............................................................. [Targets: 0] o- vhost ................................................................ [Targets: 0] o- xen-pvscsi ........................................................... [Targets: 0]
The two created items needed by Proxmox are the target iqn
iqn.2003-01.org.linux-iscsi.mgdeb1.x8664:sn.87b5fb15ba09
and the TPGtpg1
. -
To allow Proxmox to connect, authentication will need to be disabled for the target and group. This is can be done by running the command
targetcli /iscsi/<target iqn>/tpg1/ set attribute authentication=0 demo_mode_write_protect=0 generate_node_acls=1 cache_dynamic_acls=1
:root@mgdeb1:~# targetcli /iscsi/iqn.2003-01.org.linux-iscsi.mgdeb1.x8664:sn.87b5fb15ba09/tpg1/ set attribute authentication=0 demo_mode_write_protect=0 generate_node_acls=1 cache_dynamic_acls=1 Parameter authentication is now '0'. Parameter demo_mode_write_protect is now '0'. Parameter generate_node_acls is now '1'. Parameter cache_dynamic_acls is now '1'.
-
Proxmox requires an SSH key to to able to automatically connect to the VIP of the service. Proxmox provide the followinng commands to generate the key and test:
mkdir /etc/pve/priv/zfs ssh-keygen -f /etc/pve/priv/zfs/10.6.19.21_id_rsa ssh-copy-id -i /etc/pve/priv/zfs/10.6.19.21_id_rsa.pub root@10.6.19.21 ssh -i /etc/pve/priv/zfs/10.6.19.21_id_rsa root@10.6.19.21
Host Key Identification Errors
In the event of a node failure with a running service, the VIP is automatically moved to another node in the cluster. This will Cause Host Key Identification failures due to the underlying host of the VIP changing.
This problem will need to be addressed as this will stop Proxmox being able to connect to the cluster via the VIP automactically. One solution for this is to copy the host key from one cluster node to another, so when the VIP is moved, the host key will be the same for all cluster nodes.
Configuring Proxmox
-
To add the configured target to Proxmox, In the Proxmox GUI, Navigate to
Datacenter -> Storage -> Add -> ZFS over iSCSI
and fill in the appropriate fields with the relevant information:When done click
Add