LINUX

Comandi CLI Equallogic per configurare l’iniziatore Iscsi su Linux

Interruttore DM Linux

In questo tutorial, ti mostrerò i comandi per installare e configurare Iscsi Initiator per connettere il target equallogic su Linux CLI.

Stiamo utilizzando Dell Equallogic HIT/KIT versione 1.2.0 per configurare la destinazione iscsi su CentOS 6.2. È possibile scaricare e installare lo strumento di integrazione host dal sito Web equallogic.

Interrogare l’installazione del kit host

[root@centos /]# rpm -qa | grep -i equ
equallogic-host-tools-1.2.0-1.epa.el6.x86_64
[root@centos /]#

Controlla lo stato del processo 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 /]#

Aggiunta del gruppo 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 /]#

Scopri i target 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 /]#

Visualizza i target rilevati da 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 ~]#

Connettiti al bersaglio

[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 ~]#

Formatta il Lun appena trovato nel file system 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 ~]#

Montare in una directory

[root@centos /]# mount /dev/eql/ testvolume /data/

Mostra tutti i punti di montaggio

[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 /]#

Impostazioni MPIO

Il modulo del kernel dm-switch verrà utilizzato per l’attività di IO. Il demone Multipathd non è richiesto. Se il demone multipathd è in esecuzione, assicurarsi di disabilitare i dispositivi equallogic (inseriti nella lista nera).

Controllare il modulo switch installato. Il comando seguente mostra “switch”. Ciò significa che è stato compilato nel 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 /]#

Aggiunta di entrambi gli adattatori Iscsi

(Proprio come puoi escludere altre interfacce che non sono nella sottorete 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 /]#

Impostazione del numero di connessioni, sessioni e criterio di bilanciamento del carico

[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.

Visualizza lo stato corrente

[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 /]#

Related Articles

Lascia un commento

Il tuo indirizzo email non sarà pubblicato. I campi obbligatori sono contrassegnati *

Back to top button
Close