R&D/OS

iscsi login example

sunshout 2012. 7. 4. 15:46

# Easy iSCSI initiator

Introduction

After Xen Server boot, It is necessary to initiate iSCSI connection.

Required Information

targer Server IP login IQN

Installation

1. Download iSCSI-1.0.tar.gz

# wget http://ovm.googlecode.com/files/iSCSI-1.0.tar.gz

2. Extract files

# tar zxvf iSCSI-1.0.tar.gz

3. excute storage.py

# cd iSCSI-1.0
# python storage.py
#

example

[root@cnode12-m ~]# wget http://ovm.googlecode.com/files/iSCSI-1.0.tar.gz
--2012-07-04 15:40:04--  http://ovm.googlecode.com/files/iSCSI-1.0.tar.gz
Resolving ovm.googlecode.com... 74.125.31.82, 2404:6800:4008:c01::52
Connecting to ovm.googlecode.com|74.125.31.82|:80... connected.
HTTP request sent
, awaiting response... 200 OK
Length: 2981 (2.9K) [application/x-gzip]
Saving to: `iSCSI-1.0.tar.gz'

100%[======================================>] 2,981       17.6K/s   in 0.2s

2012-07-04 15:40:05 (17.6 KB/s) - `
iSCSI-1.0.tar.gz' saved [2981/2981]

[root@cnode12-m ~]# tar zxvf iSCSI-1.0.tar.gz
iSCSI-1.0/
iSCSI-1.0/storage.py
iSCSI-1.0/utils/
iSCSI-1.0/utils/CmdRule.py
iSCSI-1.0/utils/__init__.py
iSCSI-1.0/utils/Command.py
iSCSI-1.0/utils/ipaddr.py
iSCSI-1.0/node.cfg
[root@cnode12-m ~]# ls
anaconda-ks.cfg  install.log  install.log.syslog  iSCSI-1.0  iSCSI-1.0.tar.gz
[root@cnode12-m ~]# cd iSCSI-1.0
[root@cnode12-m iSCSI-1.0]# ls
node.cfg  storage.py  utils
[root@cnode12-m iSCSI-1.0]# python storage.py
Input iSCSI portal IP> 10.32.2.240
0) 10.32.2.240:3260 iqn.1986-03.com.sun:02:0d8fdd6b-cfb9-ed5b-b660-8a055a774774
1) 10.32.2.240:3260 iqn.1986-03.com.sun:02:fb5265de-d49c-6202-c9f4-abe59fcfeab4
select iqn #> 0
================= Login IQN =======================
iqn.1986-03.com.sun:02:0d8fdd6b-cfb9-ed5b-b660-8a055a774774
[root@cnode12-m iSCSI-1.0]#