Storage – Openfiler setup and playing with iSCSI

Purpose – In this tutorial we would use Openfiler (iSCSI Storage) and export iSCSI storage to the clients, discover the storage on the clients and finally setup the multipath post discovery.

Sequence of activities

    1. Installing Openfiler on Oracle VM Virtual Box – Storage Server
    2. Creating Physical Volumes > Volume Groups & Logical Volumes to be exported to the clients
    3. iSCSI Setup which includes creating iSCSI Targets, Target Configuration, LUN Mapping and finally setting up the ACL        
    4. Setting up the SCSI initiators or clients
      1. Network configuration
      2. iSCSI discovery
      3. Multipath configuration
  1. Installing Openfiler on Oracle VM Virtual Box – Storage Server

NewItem135

After all the probes the below screen appears

NewItem136

NewItem137

NewItem138

Say YES to the prompt

NewItem139NewItem140NewItem141

Say YES again

Manually configure the network on the next screen

NewItem142

NewItem143

NewItem144

Set root password in the next screen after selecting  city in the above one

NewItem145

NewItem146NewItem147

After rebooting

NewItem148NewItem149

Web URL –

NewItem150

Enter the credentials – openfiler/password

NewItem152

2. Creating Physical Volumes > Volume Groups & Logical Volumes to be exported to the clients

    1. Creating the Physical Volumes followed by Volume Group and Logical Volumes

          

NewItem153NewItem154NewItem155NewItem156NewItem157

Create the ASM Volumes

NewItem158NewItem160

3. iSCSI Setup which includes creating iSCSI Targets, Target Configuration, LUN Mapping and finally setting up the ACL        

       1. On the client(s) install isci initiator tools

               [root@labpc2 ~]# rpm -qa | grep -i iscsi

iscsi-initiator-utils-6.2.0.872-41.0.1.el6.x86_64

2. Check the initiatorname and note it down, this needs to be entered in the openfiler setup

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

InitiatorName=iqn.1988-12.com.oracle:61c8f92adcdb

3. Now we’ll configure the initiatorname on the iSCSI server as iSCSI target, enter the above initiator name in the target below and click Add

           NewItem251

4. Next click on LUN mapping and map all the LUNs for this target

       NewItem252

5. Next click on the Network ACL and allow access of these LUNs to the clients

       NewItem253

4. Setting up the SCSI initiators or clients

    1. Network configuration

               My Setup has got two clients and the setup looks like this

               NewItem254

My storage box and the clients are on different networks and i’ve configured additional IPs on each of the clients to have all 3 in the same network. Apart from this IP routing must be enabled (as i’ve configured the different network IPs on different eth cards, without this it won’t work)

NewItem255NewItem256                             

 2. iSCSI discovery on the clients

NewItem257

Now reboot both the client nodes for LUNs to be discovered (no real need but multipath may not work otherwise),see the disks are discovered successfully

NewItem258

you can also see the disks as shown below

NewItem261      

3. Multipath configurations

Ensure Multipath software has been configured and enabled   

NewItem259NewItem260

mpathconf –enable command loads the dm_multipath module, creates the default /etc/multipath.conf file and starts the multipathd daemon.

 Run multipath / multipath -ll (this should automatically discover the LUNs and create default mappings mpatha etc in /dev/mapper/ directory)

       NewItem264

  /etc/multipath/bindings file shows the automated discovery results

       NewItem262

Now edit /etc/multipath.conf and give some meaningful names to the disks (this also means you’ll have to use the bindings file to do the mapping of WWIDs to alias  names)

       NewItem265

Finally run multipath -ll to check the changes have reflected successfully along with checking the mapping in /dev/mapper directory as well

       NewItem266NewItem267   

That’s all folks, this completes the tutorial – We’ve successfully managed to create a storage server on the virtual world and exported the same using iSCSI technology. This is the closest to what you can get in a virtual world without worrying about actual storage arrays and cabling to the servers :). Hope this helps somebody out there. Feel free to post questions if there are any. Thanks

Amit Shil

Fascinated by Open Source & Linux

Created with the Personal Edition of HelpNDoc: Full-featured Help generator

Leave a comment