Comandos de la CLI de Equallogic para configurar el iniciador Iscsi en Linux
En este tutorial, le mostraré los comandos para instalar y configurar el Iniciador Iscsi para conectar el objetivo de equallogic en la CLI de Linux.
Estamos utilizando la versión Dell Equallogic HIT / KIT 1.2.0 para configurar iscsi target en CentOS 6.2. Puede descargar e instalar la herramienta de integración de host desde el sitio web de equallogic.
Instalación del kit de host de consultas
[root@centos /]# rpm -qa | grep -i equ equallogic-host-tools-1.2.0-1.epa.el6.x86_64 [root@centos /]#
Verificar el estado del proceso de ehcmd
[root@rhel62-eql /]# ps -ef | grep -i eh root 2220 1 0 Oct10 ? 00:01:01 /usr/sbin/ehcmd --pidfile /var/run/ehcmd.pid root 30257 2848 0 11:51 pts/0 00:00:00 grep -i ehcmd [root@centos /]#
Agregar el grupo Equallogic
[root@centos /]# rswcli -a --gn eqltest --gip 192.168.0.1 --noping Processing add-group-access command... Group Name: eqltest Group IP Address: 192.168.0.1 The add-group-access command succeeded. [root@ centos /]#
Descubra los objetivos de Iscsi
[root@centos /]# iscsiadm -m discoverydb 192.168.0.111:3260 via sendtargets 192.168.0.120:3260 via sendtargets 192.168.0.113:3260 via sendtargets 192.168.0.120:3260 via sendtargets 192.168.0.112:3260 via sendtargets 192.168.0.111:3260 via sendtargets 192.168.0.112:3260 via sendtargets 192.168.0.110:3260 via sendtargets 192.168.0.130:3260 via sendtargets [root@centos /]#
Mostrar objetivos descubiertos de Iscsi
[root@centos ~]# iscsiadm -m node 192.168.0.1:3260,1 iqn.2001-05.com.equallogic:0-8a0906-506562a07-ceba51ba2104d70a-vss-control 192.168.0.1:3260,1 iqn.2001-05.com.equallogic:0-8a0906-1186b2a07-82258e655324f82a-testvolume 192.168.0.1:3260,1 iqn.2001-05.com.equallogic:0-8a0906-1186b2a07-82258e655324f82a- testvolume 192.168.0.1:3260,1 iqn.2001-05.com.equallogic:0-8a0906-1186b2a07-82258e655324f82a- testvolume 192.168.0.1:3260,1 iqn.2001-05.com.equallogic:0-8a0906-1186b2a07-82258e655324f82a- testvolume [root@centos ~]#
Iniciar sesión en destino
[root@centos ~]# ehcmcli login --target iqn.2001-05.com.equallogic:0-8a0906-1186b2a07-82258e655324f82a- testvolume Login succeeded. Device to mount: /dev/eql/ testvolume [root@centos ~]#
Formatee el Lun recién encontrado al sistema de archivos ext4
[root@centos ~]# mkfs.ext4 /dev/eql/ testvolume mke2fs 1.41.12 (17-May-2010) Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) Stride=0 blocks, Stripe width=0 blocks 66240 inodes, 264960 blocks 13248 blocks (5.00%) reserved for the super user First data block=0 Maximum filesystem blocks=272629760 9 block groups 32768 blocks per group, 32768 fragments per group 7360 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376 Writing inode tables: done Creating journal (8192 blocks): done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 28 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. [root@centos ~]#
Montar en un directorio
[root@centos /]# mount /dev/eql/ testvolume /data/
Mostrar todos los puntos de montaje
[root@centos /]# mount /dev/mapper/vg_rhel62eql-lv_root on / type ext4 (rw) proc on /proc type proc (rw) sysfs on /sys type sysfs (rw) devpts on /dev/pts type devpts (rw,gid=5,mode=620) tmpfs on /dev/shm type tmpfs (rw,rootcontext="system_u:object_r:tmpfs_t:s0") /dev/sda1 on /boot type ext4 (rw) none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw) sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw) /dev/mapper/eql-0-8a0906-1186b2a07-82258e655324f82a- testvolume on /data type ext4 (rw) [root@centos /]#
Configuración de MPIO
El módulo kernel dm-switch se utilizará para la actividad de E / S. El demonio multipathd no es necesario. Si el demonio multipathd se está ejecutando, asegúrese de deshabilitar los dispositivos equallogic (ponerlos en la lista negra).
Verifique el módulo de interruptores instalado. El siguiente comando muestra «cambiar». Eso significa que se compiló en el kernel.
[root@centos /]# dmsetup targets switch v1.1.0 multipath v1.3.0 mirror v1.12.0 striped v1.4.1 linear v1.1.0 error v1.0.1 [root@centos /]#
Agregar ambos adaptadores Iscsi
(Igual que puede excluir otras interfaces que no están en la subred Iscsi)
[root@centos /]# rswcli --mpio-include --adapter=eth1 --force Processing mpio-include command... Adding 'eth1' to include list Adapter Rules: Included: eth1 Excluded: All Other Default Rules: All other subnets, adapters or ip addresses are excluded. The mpio-include command succeeded. [root@centos /]#
[root@centos /]# rswcli --mpio-include --adapter=eth2 --force Processing mpio-include command... Adding 'eth2' to include list Adapter Rules: Included: eth2 Excluded: All Other Default Rules: All other subnets, adapters or ip addresses are excluded. The mpio-include command succeeded. [root@centos /]#
Configuración del número de conexiones, sesiones y política de equilibrio de carga
[root@centos /]# rswcli -P --maxvols 2 --maxvole 6 --dlb RR --ip6 Processing mpio-parameters command... Removed unnecessary IPv4 rules. MPIO Parameters: Max sessions per volume slice: 2 Max sessions per entire volume: 6 Minimum adapter speed: 1000 Default load balancing policy configuration: Round Robin (RR) IOs Per Path: 16 Use MPIO for snapshots: Yes Internet Protocol: IPv6 The mpio-parameters command succeeded. New load-balancing policies will take effect on existing multipath devices in several seconds.
Mostrar el estado actual
[root@centos /]# ehcmcli status Generating diagnostic data, please wait... ======================================================== Adapter List ======================================================== Name: eth2 IP Address: fe80::250:56ff:feab:6cd HW addr: 00:50:56:AB:06:CD Name: eth3 IP Address: fe80::250:56ff:feab:6ce HW addr: 00:50:56:AB:06:CE ======================================================== Volume list ======================================================== Volume: testvolume Target name: iqn.2001-05.com.equallogic:0-8a0906-1186b2a07-82258e655324f82a-testvolume Device to mount: /dev/eql/testvolume Status: No existing sessions found using currently configured IP protocol version Resolution: Modify the IPv4/IPv6 settings with 'rswcli -P'. Session: 5 /dev/sdb 192.168.0.206 -> 192.168.0.112 02:42:37 Session: 6 /dev/sdc 192.168.0.207 -> 192.168.0.111 02:42:31 ======================================================== Summary ======================================================== Adapters: 2 Managed Volumes: 1 iSCSI Sessions: 2 Errors: 0 Warnings: 1 Suggestions: 0 [root@centos /]#