Iscsi Proxmox
En primer lugar instalaremos los paquetes necesarios
apt update -y apt-get install open-iscsi multipath-tools
A continuación deberemos de tener acceso al portal iSCSI de nuestro almacenamiento. En nuestro caso usaremos por ejemplo la 10.0.15.x, como tenemos 8 caminos ya que disponemos de un almacenamiento con 8 interfaces iSCSI que serán 10.0.15.11-14 para la controladora A y 10.0.15.21-24 para la B
iscsiadm -m discovery -t sendtargets -p 10.0.15.11
multipath -ll
root@teststorage:/etc/multipath# multipath -ll mpath0 (3600c0ff00027f44e1231865801000000) dm-0 HP,MSA 2040 SAN size=8.2T features='3 queue_if_no_path queue_mode mq' hwhandler='1 alua' wp=rw |-+- policy='round-robin 0' prio=50 status=active | `- 2:0:0:0 sdb 8:16 active ready running `-+- policy='round-robin 0' prio=10 status=enabled |- 3:0:0:0 sda 8:0 active ready running `- 4:0:0:0 sdc 8:32 active ready running
iscsiadm -m discovery -t sendtargets -p 10.200.15.11
iscsiadm -m discovery -t sendtargets -p 10.200.15.14
iscsiadm -m node --login
nano multipath.conf
cat multipath.conf
Tenemos que buscar el wwid
nano /etc/multipath/wwids
Contendrá lo siguiente
# Multipath wwids, Version : 1.0 # NOTE: This file is automatically maintained by multipath and multipathd. # You should not need to edit this file in normal circumstances. # # Valid WWIDs: /3600c0ff00027f44e1231865801000000/
cat wwids
nano /etc/iscsi/iscsid.conf
iqn.1986-03.com.hp:storage.msa2040.162127e7a9
systemctl enable open-iscsi
systemctl enable iscsid
systemctl enable multipath-tools
iscsid open-iscsi
systemctl enable multipath-tools
nano /etc/multipath.conf
defaults { find_multipaths "on" polling_interval 2 path_selector "round-robin 0" path_grouping_policy multibus uid_attribute ID_SERIAL rr_min_io 100 failback immediate no_path_retry queue user_friendly_names yes } blacklist { devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*" devnode "^(td|hd)[a-z]" devnode "^dcssblk[0-9]*" devnode "^cciss!c[0-9]d[0-9]*" device { vendor "DGC" product "LUNZ" } device { vendor "EMC" product "LUNZ" } device { vendor "IBM" product "Universal Xport" } device { vendor "IBM" product "S/390.*" } device { vendor "DELL" product "Universal Xport" } device { vendor "SGI" product "Universal Xport" } device { vendor "STK" product "Universal Xport" } device { vendor "SUN" product "Universal Xport" } device { vendor "(NETAPP|LSI|ENGENIO)" product "Universal Xport" } } blacklist_exceptions { wwid "3600c0ff00027f44e1231865801000000" } multipaths { multipath { wwid "3600c0ff00027f44e1231865801000000" alias mpath0 } }
Más información
https://elkano.org/blog/set-up-multipath-iscsi-targets-on-debian/