Sunday, October 14, 2012

ISCI Discovery in RHEL

ISCSI Discovery in RHEL 4-  32 bit

1) Download and Install iscsi-initiator-utils-

2) Open /etc/iscsi.conf file, enter:

# vi /etc/iscsi.conf

Set/Update the below parameters.


Save and close the iscsi.conf file.

3) Start the iscsi service.

# /etc/init.d/iscsi start

4) Add the chkconif to enable the iscsi start after the boot time.

# chkconfig iscsi on

5) Now the iscsi device can be visible, Pls check any of the below.

# fdisk -l
# tail -f /var/log/messages
# find /sys/devices/platform/host* -name "block*"

6) Format iSCSI device

Use fdisk and mkfs.ext3 commands.
First, create a partition (assuming that /dev/sdc is a new block device assigned to iscsi) :
# fdisk /dev/sdc
# mkfs.ext3 /dev/sdc1

Create /u01 directory:
# mkdir -p /u01

Open /etc/fstab file and append config directive:
/dev/sdc1 /u01 ext3 _netdev 0 0

Save and close the file. Mount the parition /dev/sdc1:
# mount -a
# df -H

ISCSI Discovery in RHEL 5 64 bit

1) Download and install the below package

# rpm -ivh /tmp/iscsi-initiator-utils-

2) The iSCSI initiator is composed by two services, iscsi and iscsid,
enable them to start at system startup using chkconfig.

# chkconfig iscsi on
# chkconfig iscsid on
# chkconfig --list | grep iscsi
iscsi           0:off   1:off   2:on    3:on    4:on    5:on    6:off
iscsid          0:off   1:off   2:on    3:on    4:on    5:on    6:off

3) Start the iscsi service.

# service iscsi start
iscsid is stopped
Starting iSCSI daemon:                                     [  OK  ]
                                                           [  OK  ]
Setting up iSCSI targets: iscsiadm: No records found!
                                                           [  OK  ]

4) Check the status of iscsi service

# service iscsi status

5) Add the iscsi iqn discovery address.

# iscsiadm -m discovery -t sendtargets -p,1

6) Restart the iscsi service to login into the the discovered targets.

# service iscsi restart
Stopping iSCSI daemon:
iscsid dead but pid file exists                            [  OK  ]
Starting iSCSI daemon:                                     [  OK  ]
                                                           [  OK  ]
Setting up iSCSI targets: Logging in to [iface: default, target:, portal:,3260]
Login to [iface: default, target:, portal:,3260]: successful
                                                           [  OK  ]
7) Now you can able to see the filesystem.

# fdisk -l

ISCI initiator in solaris 32 bit.

1)  Check the below two packages are exists in the Server. If the packages are not exists then install these packages.

# pkginfo SUNWiscsiu SUNWiscsir
system      SUNWiscsir Sun iSCSI Device Driver (root)
system      SUNWiscsiu Sun iSCSI Management Utilities (usr)

2) Using the below add the discovery address, the default port is 3260.

# iscsiadm add discovery-address

3) Check whether the discovery address has been added properly.

# iscsiadm list discovery-address
Discovery Address:

4) Enable the send targets of discovery address using the below.

# iscsiadm modify discovery --sendtargets enable

5) Restart the devfsadm Service

# devfsadm

* Create a Iscsi link to the devfsadm service.

# devfsadm -i iscsi

* Now we can able to list the target which we have created in the openfiler.

# iscsiadm list target -S
        Alias: -
        TPGT: 1
        ISID: 4000002a0000
        Connections: 1
        LUN: 4
             Vendor:  OPNFILER
             Product: VIRTUAL-DISK
             OS Device Name: /dev/rdsk/c3t5d0s2
        LUN: 3
             Vendor:  OPNFILER
             Product: VIRTUAL-DISK
             OS Device Name: /dev/rdsk/c3t4d0s2
        LUN: 2
             Vendor:  OPNFILER
             Product: VIRTUAL-DISK
             OS Device Name: /dev/rdsk/c3t3d0s2
        LUN: 1
             Vendor:  OPNFILER
             Product: VIRTUAL-DISK
             OS Device Name: /dev/rdsk/c3t2d0s2
        LUN: 0
             Vendor:  OPNFILER
             Product: VIRTUAL-DISK
             OS Device Name: /dev/rdsk/c3t1d0s2

No comments:

Post a Comment