Working with Oracle Linux 8 and iSCSI

Oracle Linux Server Configuration

For this blog post I will be using an Oracle Linux 8 server and a Pure Storage FlashArray to demonstrate how block volumes can be presented to an Oracle Linux 8 database server via iSCSI.

Let’s start by logging in as root and configuring the Linux database server to support Internet Small Computer System Interface Protocol (iSCSI).

Note: for Oracle RAC servers you will need to perform the steps below on each node of the cluster.

Install iscsi-initiator-utils

yum install iscsi-initiator-utils -y 
yum install lsscsi 

Install multipath

yum install device-mapper-multipath

Enable iSCSI at bootup

chkconfig iscsid on 
service iscsid start 
chkconfig iscsi on 
service iscsi start 

Once iSCSI is enabled we need to find the iSCSI Qualifier Name (IQN) address of each host initiator.

We can do this by looking at the /etc/iscsi/initiatorname.iscsi file.

FlashArray Configuration

We now need to add the host initiator to the FlashArray host, logon and navigate to Storage -> Hosts select the host and click the 3 vertical pips in the Host Ports panel.

Add add the Port IQN obtained from the Linux operating system.

Configure iSCSI IQNs

Create Volumes

From the UI navigate to the Storage -> Volumes tab, in the Volumes panel click + to create new Volume(s), and repeat for required volumes, for example.

Create Volume

Now connect the newly created block Volumes to the Host.

Navigate to Storage -> Hosts and select Host.

Click on the 3 vertical pips in the Connected Volumes panel, and connect Volumes to Host.

Connect Volumes to Host

iSCSI and Host level Device Configuration

The next step is to gather information on the iSCSI ports configured on the Pure Storage FlashArray.

This can easily be done within the WebUI but for this blog post I will use the command line interface (CLI) purereport list command, for example:

Returning to the database server run the iscsiadm discovery against storage array using the IP address obtained in the step above, for example:

We can see that all the IQN information correlates to the earlier information on the FlashArray.

Log the iSCSI sessions into the Pure Array controller addresses.

Add automatic iSCSI login on database server startup.

Use iscsiadm to display detailed information about the iscsi targets, for example.

Using the FlashArray WebUI or CLI obtain the newly created volume Serial IDs.

Update /etc/multipath.conf to provide meaningful names.

The Linux multipath World Wide Identifier (wwid) for a Pure Storage FlashArray will be the Vendor ID + lowercase volume serial number, for example.

Update the /etc/multipath.conf file as required, for example:

Reload multipath configuration.

Confirm the volumes alias, size and multipath settings are as expected with multipath -ll.

We are now ready to create and mount the filesystems.

Provision file systems

Provision file systems using mkfs, I typically use ext4, for example:

Create Mount Points

Create required mount points, updated /etc/fstab file and finally mount filesystems, for example

Summary

In this blog post I have shared how to configure an Oracle Linux 8 server for iSCSI, created 2 FlashArray block volumes, and presented to a database server, created filesystems and mounted them ready for use by a database

Leave a Reply

Create a website or blog at WordPress.com

Up ↑

Discover more from Ron Ekins' - Oracle Technology, DevOps and Kubernetes Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading