(800) 887-4513 info@perftuning.comApplication and Database Performance Tuning
blue.png

Application and Database Performance Tuning

A Performance Tuning Corporation Blog

The Science of Performance

Welcome to Performance Tuning’s Performance Wire™ Blog the technical deep dive on how to troubleshoot, tune, install and support mission critical systems, data-centric architectures and high-volume environments. Our experts help you to decode the ever changing technology landscape and find the simple tools that will make your initiatives more productive and successful.  Our team has an average of 18 years of experience solving complex issues for some of the most demanding clients in the world.  If you are ready to walk the Performance Wire™ – let’s get started!

iSCSI Setup on OEL6

Posted by Edward Whalen on Sep 20, 2013 8:44:03 AM

Recently I had to set up iSCSI on an OEL 6.4 system. This is a fairly straight-forward process. It does take a little bit of effort, but it can be done fairly quickly and efficiently. The basic process is to follow these steps:

  1. Install packages.
  2. Configure iSCSI

Install packages

There are two packages that need to be installed. Use Yum to install the iscsi-initiator-utils and device-mapper-multipath packages (multipath is recommended but not required).

# yum install iscsi-initiator-utils

# yum install device-mapper-multipath

Enable iSCSI

The ckconfig on enables systems services to run by default when the system reboots. In order to see what is configured to run (at what run-level) use chkconfig –list. Use chkconfig <service> on to enable the iscsi services. Use service <service> start to start that service.

[root@oracle1 ~]# chkconfig iscsi on

[root@oracle1 ~]# chkconfig iscsid on

[root@oracle1 ~]# service iscsi start

[root@oracle1 ~]# service iscsid start

Configure iSCSI

In order to start the configuration process you must first find the initiator name. This is something that is set up internally, but is associated with the name of the server. In this example, the name of the host is oracle1. Thus the oracle designation in the iSCSI initiator name.

[root@oracle1 ~]# cat /etc/iscsi/initiatorname.iscsi

InitiatorName=iqn.1988-12.com.oracle:6660117bdfa8

Take note of the initiator name. Using the iscsiadm command you can now broadcast the iSCSI initiator information to your iSCSI storage system. In this case, I am using a Tegile Zebi storage system. In the following example the iscsi storage system is on an internal network subnet 1.1.1.x.

[root@oracle1 ~]# iscsiadm -m discovery -t sendtargets -p 1.1.1.34

Starting iscsid: [ OK ]

1.1.1.34:3260,2 iqn.2013-09.com.tegile.iscsi:test

[root@oracle1 ~]# iscsiadm -m node -L automatic

Logging in to [iface: default, target: iqn.2013-09.com.tegile.iscsi:test, portal: 1.1.1.34,3260] (multiple)

Login to [iface: default, target: iqn.2013-09.com.tegile.iscsi:test, portal: 1.1.1.34,3260] successful.

Initiate the iSCSI session

[root@oracle1 ~]# iscsiadm -m session

tcp: [1] 1.1.1.34:3260,2 iqn.2013-09.com.tegile.iscsi:test

Configure Multipath

In order to have some High Availablity (HA) enable multipath. This allows multiple paths to storage to act as one. Do this via first running the /sbin/mpathconf program to validate the system.

# /sbin/mpathconf

multipath is enabled

find_multipaths is disabled

user_friendly_names is enabled

dm_multipath module is loaded

multipathd is chkconfiged on

If you add more devices, after the original configuration you can always rescan the SCSI bus using the rescan-scsi-bus.sh script.

# rescan-scsi-bus.sh

Add new devices to multipath by running the multipath command.

# multipath

Sep 12 08:24:13 | mpatha: ignoring map

create: mpathf (3600144f0c42b4f0000005231be0c0005) undef TEGILE,ZEBI-ISCSI

size=5.0G features='0' hwhandler='0' wp=undef

`-+- policy='round-robin 0' prio=1 status=undef

`- 7:0:0:4 sdh 8:112 undef ready running

create: mpathg (3600144f0c42b4f0000005231be280006) undef TEGILE,ZEBI-ISCSI

size=5.0G features='0' hwhandler='0' wp=undef

`-+- policy='round-robin 0' prio=1 status=undef

`- 7:0:0:5 sdi 8:128 undef ready running

create: mpathh (3600144f0c42b4f0000005231be420007) undef TEGILE,ZEBI-ISCSI

size=5.0G features='0' hwhandler='0' wp=undef

`-+- policy='round-robin 0' prio=1 status=undef

`- 7:0:0:6 sdj 8:144 undef ready running

create: mpathi (3600144f0c42b4f0000005231be570008) undef TEGILE,ZEBI-ISCSI

size=5.0G features='0' hwhandler='0' wp=undef

`-+- policy='round-robin 0' prio=1 status=undef

`- 7:0:0:7 sdk 8:160 undef ready running

create: mpathj (3600144f0c42b4f0000005231be6c0009) undef TEGILE,ZEBI-ISCSI

size=5.0G features='0' hwhandler='0' wp=undef

`-+- policy='round-robin 0' prio=1 status=undef

`- 7:0:0:8 sdl 8:176 undef ready running

create: mpathk (3600144f0c42b4f0000005231be81000a) undef TEGILE,ZEBI-ISCSI

size=5.0G features='0' hwhandler='0' wp=undef

`-+- policy='round-robin 0' prio=1 status=undef

`- 7:0:0:9 sdm 8:192 undef ready running

Managing Multipath

Use multipath –l to list devices and validate that you have all of them.

# multipath -l

mpathe (3600144f0c42b4f000000523106d30004) dm-6 TEGILE,ZEBI-ISCSI

size=5.0G features='0' hwhandler='0' wp=rw

`-+- policy='round-robin 0' prio=0 status=active

`- 7:0:0:3 sdg 8:96 active undef running

<lines removed>…..

Of course it is more efficient to set up a more friendly naming structure for your multipath devices. This is easily accomplished by editing the /etc/multipath.conf file. Under the mutipaths{} section add the following section for each iSCSI LUN.

multipath {

wwid 3600144f0c42b4f0000005231068f0001

alias data01

}

The wwid can be found from the storage system or by running the multipath program as shown above. Do this for each of the iSCSI devices. This friendly name or alias will be the device seen in the /dev/mapper directory.

Running multipath –l will show the new device names. Reloading the maps can be done with multipath –r if needed.

Note: To change a multipath name or add a new path edit /etc/multipath.conf and run multipath –r.

Using Multipath Devices

The devices that should be used are the devices in /dev/mapper. These devices are persistent and will not change even if more devices are added. These devices can be used for ASM. If you are using ASMLIB, change the ORACLEASM_SCANORDER="multipath" in /etc/sysconfig/oracleasm.

Note: It is recommended to leave the ASM_DISKSTRING parameter set to the default (NULL) value when using multipath.

Summary

As you have seen here. It is not very difficult to setup iSCSI and multipath under OEL 6.4. Just follow a few simple steps and you are on your way.

Help me with my Database

Topics: Ed Whalen, Performance Wire

Popular Posts

GoldenGate 12.2 Tutorial: Casting Timestamp Data in Oracle to Local Time Zone

Oracle GoldeGate 12.2 recently presented me with a challenge.  I implemented the GoldenGate 12.2 internal heartbeat mechanism.  It all worked well, but when I went to select the heartbeat...Read more

GoldenGate 12.2 Tutorial - Configure the Heartbeat Table

  One of the best new features of Oracle GoldenGate 12.2 is the integrated heartbeat table. This heartbeat table is easily configured and provides automatic heartbeat transactions each minute...Read more

Oracle OEM 12c ORA-20247: EMD_URL is invalid:  Cannot provide null...

I am a big fan of Oracle Enterprise Manager Cloud Control 12c.  I am also a fan of using the EMCLI to setup and modify my Oracle OEM 12c targets.  Recently I spent a lot of time going...Read more

Oracle GoldenGate vs. Data Guard. Why do I care?

Oracle Database 12c provides several tools to improve the availability and reliability of your critical databases.  Recently, I have recevied a lot of questions concerning the difference between...Read more

DDL Mapping in Oracle GoldenGate 12.2

I was tasked by a customer to set up DDL replication only for CREATE TABLE, ALTER TABLE, CREATE INDEX and ALTER INDEX operations.  Having used GoldenGate for a while I knew that I could do this...Read more

Get More

Keep Me Updated