Saturday, 28 April 2012

HOW TO CONFIGURE ISCSI CLIENT ON AIX

HOW TO CONFIGURE ISCSI CLIENT ON AIX


VERIFICATION OF DISK

This screen shot shows the output of lspv when we dont have any iscsi disk on the server








The screen show above shows that how a disk is mapped to a target

Now configure the target on aix server

Go to /etc/iscsi directory

and provide the target configuration  In this example 192.168.5.202 is the storage and aix-target is the target

# cd /etc/iscsi
# ls
autosecrets  targets      targetshw
# tail -6 targets
# The target line would look like:
# 10.2.1.106 3260 iqn.2003-01.com.ibm:00.fcd0ab21.shark128 \
#               "123ismysecretpassword.fc1b"
#
192.168.5.202 3260 aix-target
#

Now at the Aix server add the ip and change iscsi0 adapter configuration

Added ip as alias to connect to storage

Checked the connectivity
and changed iscsi0 adapter configuration
Run cfgmgr after that


# chdev -l en0 -a alias4=192.168.5.200 -a netmask=255.255.255.0

en0 changed

# ping -c 2 192.168.5.202
PING 192.168.5.202: (192.168.5.202): 56 data bytes
64 bytes from 192.168.5.202: icmp_seq=0 ttl=64 time=0 ms
64 bytes from 192.168.5.202: icmp_seq=1 ttl=64 time=0 ms
----192.168.5.202 PING Statistics----
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max = 0/0/0 ms
# chdev -l iscsi0 -a initiator_name=aix-target
iscsi0 changed
# lspv
hdisk0          00c402db281a05c4                    None
hdisk1          00c402db1717210e                    rootvg          active
# cfgmgr


Now you can see a new disk from storage

# cfgmgr
# lspv
hdisk2          00c402db175641a3                    None
hdisk0          00c402db281a05c4                    None
hdisk1          00c402db1717210e                    rootvg          active
# lsattr -El hdisk2
clr_q         no                               Device CLEARS its Queue on error True
host_addr     192.168.5.201                    Hostname or IP Address           False
location                                       Location Label                   True
lun_id        0x0                              Logical Unit Number ID           False
max_transfer  0x40000                          Maximum TRANSFER Size            True
port_num      0xcbc                            PORT Number                      False
pvid          00c402db175641a30000000000000000 Physical volume identifier       False
q_err         yes                              Use QERR bit                     True
q_type        simple                           Queuing TYPE                     True
queue_depth   1                                Queue DEPTH                      True
reassign_to   120                              REASSIGN time out value          True
rw_timeout    30                               READ/WRITE time out value        True
start_timeout 60                               START unit time out value        True
target_name   aix-target                       Target NAME                      False
#

* Source Article from : Internet