Connect HP-UX iSCSI to netapp

Source: Internet
Author: User

 

Follow the http://docs.hp.com/en/T1452-90011/index.html
Install iSCSI software initiator on HP-UX.

 

 

Verify under 11.23

 

 

1) # swlist iSCSI-00
# Initializing...
# Contacting target "db1 "...
#
# Target: db1 :/
#

# ISCSI-00 B .11.23.03f HP-UX iSCSI software Initiator
ISCSI-00.ISCSI-SWD B .11.23.03f HP-UX iSCSI software initiator.

 

 

 

2) # ioscan-kfnc iSCSI
Class I h/W path driver S/W State H/W type description
========================================================== ==================================
Iscsi 0 255/0
Iscsi claimed guest bus iSCSI virtual node

-K: scan the kernel without scanning the real hardware. Drivers that are not bound will also be executed. You can use-D-C-I-H to limit the output at the same time, but you cannot use-u

-U: scans and lists available system I/O devices instead of actually scanning hardware. (The driver and instance number are already in the kernel)

-F: Full List (full field details)

-N: name of the device file in the output. Only some in/dev are listed.

 

 

2. Configure iSCSI software Initiator

 

Path = $ path:/opt/iSCSI/bin

Configure iSCSI initiator Name:

Iscsiutil-l --> some names appear in the column

# Iscsiutil-l
Initiator name: iqn.1986-03.com. HP: db1.679d66a5-5b2e-11db-89e6-08a23597f208

 


3. Configure iSCSI Lun on netapp

Qtree:/vol/vol1/iscsi1

Lun:

Lun show
/Vol/vol1/iscsi1/lun0 10 GB (10737418240) (R/W, online)
/Vol/vol1/iscsi1/lun2
1g (1073741824) (R/W, online, mapped)

Igroup show
Ig0 (iSCSI) (ostype: HPUX ):
Iqn.1986-03.com. HP: db1.679d66a5-5b2e-11db-89e6-08a23597f208
(Not logged in)

 

 

 

4. Continue with the initiator configuration on HP-UX.

 

 

1) iSCSI target discovered:

 

 

Iscsiutil-a-I 192.168.1.110 ---> default port 3260

Display the iSCSI target

# Iscsiutil-p-d

Discovery target information
----------------------------

Target #1
-----------
IP Address: 192.168.1.110

Iscsi TCP port: 3260
Iscsi portal group Tag: 1

User configured:
----------------

Authenticaton method:
Chap method: chap_uni
Initiator chap Name:
Chap secret:
Header Digest: None, crc32c (default)
Data Digest: None, crc32c (default)

 

 

2) discover operable target devices

 

# Ioscan-H 255


In this case, no new device is found. The target already exists. The iSCSI Lun and group settings on the netapp should be correct. The problem may still occur on the network.

Netapp has multiple interfaces, one of which is an external outlet (1.110, the default gateway is also added to this interface). Others are internal product interfaces, which are different.
Vlan5, 6, 7, and 8. The HP-UX is a testing machine, which belongs to the product vlan14, but is not in the scope of the netapp interface. Therefore, what is HP-UX used to connect to netapp?
External egress, but the firewall limits the connection between this interface and the internal (outbound. However, the default route VLAN and the HP-
UX does not exist, so

 

Add a route to netapp. # route add host 192.168.14.221 (HP-ux ip) gateway IP address of vlan7

Then reset the target and query

Iscsiutil-a-I 192.168.7.110

After verifying iscsiutil-p-D, confirm the new target

Try again to find the new device ioscan-H 255

 


# Ioscan-H 255
H/W path class description
========================================================== ============
255/0 iSCSI virtual node
255/0/0.0 ext_bus iSCSI-SCSI protocol interface
255/0/0.0.0 target
255/0/0.0.0.0 disk netapp Lun
255/0/2.0 ext_bus iSCSI-SCSI protocol interface
255/0/2.0.0 target
255/0/2.0.0.0 disk netapp Lun
255/0/3.0 ext_bus iSCSI-SCSI protocol interface
255/0/3.0.0 target
255/0/3.0.0.0 disk netapp Lun
255/0/4.0 ext_bus iSCSI-SCSI protocol interface
255/0/4.0.0 target
255/0/4.0.0.0 disk netapp Lun
255/0/5.0 ext_bus iSCSI-SCSI protocol interface
255/0/5.0.0 target
255/0/5.0.0.0 disk netapp Lun

Create a device file for a new device

Insf-H 255

Display New Device Files

# Iscsiutil-p-o

Operational target information
------------------------------

Target #1
-----------
Target name: iqn.1992-08.com. netapp: sn.101208012

Target alias:
No. of target addresses: 6

Target address #1
-------------------
IP Address: 192.168.13.110

Iscsi TCP port: 3260
Iscsi portal group Tag: 2004

User configured:
----------------

Authenticaton method:
Chap method: chap_uni
Initiator chap Name:
Chap secret:
Header Digest: None, crc32c (default)
Data Digest: None, crc32c (default)

...

Target address #5
-------------------
IP Address: 192.168.1.110
Iscsi TCP port: 3260
Iscsi portal group Tag: 1000

User configured:
----------------

Authenticaton method:
Chap method: chap_uni
Initiator chap Name:
Chap secret:
Header Digest: None, crc32c (default)
Data Digest: None, crc32c (default)

Target address #6
-------------------
IP Address: 192.168.7.110
Iscsi TCP port: 3260
Iscsi portal group Tag: 2002

User configured:
----------------

Authenticaton method:
Chap method: chap_uni
Initiator chap Name:
Chap secret:
Header Digest: None, crc32c (default)
Data Digest: None, crc32c (default)

3) Other management

Show Disk

# Ioscan-func Disk:

Disk 7 255/0/0.0.0.0 sdisk claimed device netapp Lun
/Dev/DSK/c4t0d0/dev/rdsk/c4t0d0
Disk 8 255/0/2.0.0.0 sdisk claimed device netapp Lun
/Dev/DSK/c5t0d0/dev/rdsk/c5t0d0
Disk 9 255/0/3.0.0.0 sdisk claimed device netapp Lun
/Dev/DSK/c6t0d0/dev/rdsk/c6t0d0
Disk 10 255/0/4.0.0.0 sdisk claimed device netapp Lun
/Dev/DSK/c7t0d0/dev/rdsk/c7t0d0
Disk 11 255/0/5.0.0.0 sdisk claimed device netapp Lun
/Dev/DSK/c8t0d0/dev/rdsk/c8t0d0

In fact, all disks point to a real physical disk, but there are only multiple paths.

? How does one correspond to the previously discovered iSCSI (that is, how to control which netapp IP resource to use )? 6 <---> 5

Create LV and Test

# Pvcreate/dev/rdsk/c8t0d0

# Mkdir/dev/vgdb0

# Mknod/dev/vgdb0/group C 64 0x010000

# Vgcreate/dev/vgdb0/dev/DSK/c8t0d0

# Lvcreate-N lv_db0/dev/vgdb0

# Lvextend-l 255/dev/vgdb0/lv_db0

# Vgdisplay-V vgdb0
--- Volume groups ---
VG name/dev/vgdb0
VG write access read/write
VG status available
Max lv255
Cur LV 1
Open LV 1
Max PV 16
Cur PV 1
Act PV 1
Max PE per PV 1016
Vgda 2
PE size (Mbytes) 4
Total PE 255
Alloc PE 255.
Free pe 0
Total PVG 0
Total spare PVS 0
Total spare PVS in use 0

--- Logical volumes ---
LV name/dev/vgdb0/lv_db0
LV status available/syncd
LV size (MB) 1020
Current le 255
Allocated PE 255.
Used PV 1

--- Physical volumes ---
PV name/dev/DSK/c8t0d0
PV status available
Total PE 255
Free pe 0
Autoswitch on

# Newfs-F vxfs/dev/vgdb0/rlv_db0

At this time (after VG is activated), the active session and connection information will be displayed on netapp.

# ISCSI connection show
No new connections

Session connections
Conn state
16/0 full_feature_phase

# ISCSI session show
Session 16
Initiator Information
Initiator name: iqn.1986-03.com. HP: db1.679d66a5-5b2e-11db-89e6-08a23597f208
Isid: 80: 00: 00: 00: 00: 05

Igroup show
Ig0 (iSCSI) (ostype: HPUX ):
Iqn.1986-03.com. HP: db1.679d66a5-5b2e-11db-89e6-08a23597f208 (logged in on: XXXXX) -- otherwise not logged on

# Mkdir/db0

# Mount/dev/vgdb0/lv_db0/db0

# Vgchange-a n/dev/vgdb0

Second HP-UX Node

Install software iSCSI initiator

Add routes to netapp

Add initiator to igroup on netapp

# Igroup add ig0 iqn.1986-03.com. HP: db2.6ffb4a87-5b2e-11db-941d-5d391934e10e

Add targets on HP-UX

# Iscsiutil-a-I xxx

# Iscsiutil-p-d

Find a device

# Ioscan-H 255

# Insf-H 255

# Iscsiutil-p-o

# Ioscan-func Disk

Export the VG information of node1 to node2:

Node1 # vgexport-v-s-p-M/tmp/vgdb0.map vgdb0

Node1 # vgexport-v-s-p-F/tmp/vgdb0pv vgdb0

Node1 # RCP/tmp/vgdb0.map/tmp/vgdb0pv DB2:/tmp

Node2 # mkdir/dev/vgdb0

Node2 # mknod/dev/vgdb0/group C 64 0x010000

Node2 # vgimport-v-F/tmp/vgdb0pv-M/tmp/vgdb0.map vgdb0

Node2 # activate VG and mount test OK.

Great! :)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.