Proxmox iscsi over zfs: Unterschied zwischen den Versionen

Aus xinux wiki
Wechseln zu: Navigation, Suche
(Setup ZFS Over iSCSI i Proxmox GUI. choose FreeNAS-API as provider.)
(Die Seite wurde geleert.)
Zeile 1: Zeile 1:
==Download & Install==
===Web Access===
===Network Settings===
*Network -> Interfaces -> Select your Interface -> press the ">" symbol at the right side -> EDIT -> change config as required
==Prepare disks==
===Create Pool===
*Storage -> Pools -> ADD
**Create new pool
**Select the disks and Raid level you wanna use
[[Datei:FreeNAS-pool-manager.png |600px]]
**Create -> tick confirm and hit CREATE POOL
===Create dataset within the pool===
*Storage -> Pool -> go to the pool you like and press the 3 dots -> Add Dataset -> change as required
[[Datei:FreeNAS-dataset-to-pool.png | 600px]]
==Prepare iSCSI==
===Enable iSCSI===
*Services -> iSCSI -> start and enable iSCSI
===Create Portal===
Create Portal if it doesn't already exist
*Sharing -> Block Shares (iSCSI) -> Portals -> ADD
===Create Target===
*Sharing -> Block Shares (iSCSI) -> Targets -> ADD
===Lets 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.
*mkdir /etc/pve/priv/zfs
*ssh-keygen -f /etc/pve/priv/zfs/$portal_ip_id_rsa
*ssh-copy-id -i /etc/pve/priv/zfs/$ 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
===Install the patches on every proxmox node===
*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/ < perl5/PVE/Storage/
*patch -b /usr/share/pve-docs/api-viewer/apidoc.js < pve-docs/api-viewer/apidoc.js.patch
*cp perl5/PVE/Storage/LunCmd/ /usr/share/perl5/PVE/Storage/LunCmd/
===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
Reload the PVE webgui. Now FreeNAS-API should we available as a iSCSI provider.
===Create a iSCSI target on the FreeNAS box.===
You dont need to create any extents as the FreeNAS-API plugin will do this automatically when the drive is created on the VM.
NOTE: If you followed this guide you already created your target
===Setup ZFS Over iSCSI i Proxmox GUI. choose FreeNAS-API as provider.===
ID: Whatever you want
Portal: iSCSI portal IP on the freenas box
Pool: Select your pool (eg: dagobert/VirtualMachines )
ZFS Block Size: 4k
Target: IQN on the FreeNAS box and target ID (eg: "")
API use SSL: Unchecked
API Username: root
API IPv4 Host: iSCSI portal IP on the freenas box
API Password: root password on freenas box
Thin provision and Write cache is optional
==API after update==
Note: A pve-manager upgrade will replace the patched files so i suggest you create a bash script
and run it on every node after an upgrade.
I have a script that looks like this
cd /root/freenas-proxmox
patch -b /usr/share/pve-manager/js/pvemanagerlib.js < pve-manager/js/pvemanagerlib.js.patch
patch -b /usr/share/perl5/PVE/Storage/ < perl5/PVE/Storage/
patch -b /usr/share/pve-docs/api-viewer/apidoc.js < pve-docs/api-viewer/apidoc.js.patch
cp perl5/PVE/Storage/LunCmd/ /usr/share/perl5/PVE/Storage/LunCmd/
systemctl restart pvedaemon
systemctl restart pveproxy
systemctl restart pvestatd
systemctl restart pve-ha-lrm
systemctl restart pve-ha-crm

Aktuelle Version vom 4. März 2020, 13:08 Uhr