Friday 15 April 2016

Install and configure Openfiler for shared storage with iSCSI on RAC Env - Part -1

Install and configure Openfiler for shared storage with iSCSI.

Openfiler is a Linux based small operating system that provides file-based network-attached storage and block-based storage area network and is free software. It can run with very minimal resource.Below I will show how we can take the benefit of openfiler to make SAN/NAS storage.

First install the operating system on a single hard disk and then after installation is ready add hard disks that will contain your iSCSI partitions.

Step-1: Click on Create a new virtual Machine for Openfiler.





Step-2: Select default workstation. Click on "Next"


Step-3: Select the path of ISO file. Click on "Next"

 Step-4 : Select the linux Operation system and version also. Click on "Next"
 Step-5: Its a optional you give your own name the virtual machine and path also where you want to save. Click on "Next"
 Step-6: Select default processor. Click on "Next"
 Step-7: Give the memory size how much you want (512 to upto you).Click on "Next"
 Step-8: Select the network type. so here iam selecting NAT. Click on "Next"
 Step-9 : Select default I/O adapter type. Click on "Next"
 Step-10 : In this step select 1 option i.e, create a new virtual disk. click on "Next"
 Step-11 : Select a disk type SCSI only. click on "Next"
 Step-12 : Here iam using 10GB for openfiler operating system.Click on "Next"
 Step-13 : Click on "Next"
Step-14 : Click on "Finish"





















Step-15: When you boot the virtual machine with the installation ISO you will see the image below. Press Enter to start the graphical installer.


 Step-16: Click on "Next"
 Step-17: Select the "U.S English" and Click on "Next"
 Step-18: Click on "Yes"
 Step-19: Select the default values "Remove all partition on select drives and create default layout" and Click on "Next"
 Step-20: Click on "Yes"
 Step-21: Click on "Yes"
 Step-22: Set the Static IP Address for Openfiler Operating System.
ex: IP:192.168.29.50
Netmask: 255.255.255.0

Click on "OK"
 Step-23: Set the hostname and Gateway, DNS.

eg: san.dba.com
gateway: 192.168.29.1

Click on "Next"
Step-24: Click on "Continue" 
 Step-25: Select Time Zone.
Click on "Next"
 Step-26: Set the password for root

eg: root password: oracle
      Confirm: oracle

Click on "Next"
 Step-27: Click on "Next"
 Installation is going on............!
 Step-28: Click on "Reboot".
Step-29: After installation complete window open in command prompt
login: root
password: oralce

So, Now open the URL given at openfiler startup screen using any browser to login to its web interface. For first time it will give a security warning like the picture shown below. i.e, https://192.168.29.50:446/



 Default username:-openfiler

Default Password:-password

Once after successful login you will get a screen which will be containing all your openfiler server information
 Once after successful login you will get a screen which will be containing all your openfiler server information
 Shutdown the openfile operating system and Add Second virtual hard disk to your VMware

eg: init 0



Step-30: Goto main window of VMware and Click on Edit virtual Machine settings.













Step-31: One dia box open and Click on "Add" 


























Step-32: Select "Hard Disk" and Click on "Next"



Step-33: Select a disk " Click on Create a new virtual disk"  and Click on "Next".














Step-34: Select a Disk Type Click on "SCSI"  and Mode Click on "Independent in that Click on "Persistent" and Click on "Next"





















Step-35: Specify Disk Capacity give the size of disk. So, here i taken 20Gb for share storage. Click on "Next".



 Step-36: Click on "Finish"

So like that you can Add more Hard Disk.



















Step-37: Like this Openfiler will detect this disk at startup and then you’ll be able to use this disk for your data.









Before you first start your Openfiler VM, add a second virtual hard disk (as an SCSI hard disk). Like this Openfiler will detect this disk at startup and then you’ll be able to use this disk for your data.

Step-38: Start Openfiler VM

Then log In remotely via web browser to the ip address which was assigned . You will see an image like this. Login with a “Openfiler” as a login and with “password” as a password.

Step-39: Here we have to set IP Address Manually Because some time what we give IP Address it will not reflect or it will not ping.So goto "/etc/hosts" file and add IP Address and alies also.





Step-40: Then restart the network service i.e, "service network restart"  and check all hostname, ipaddress and alies.

eg:$  hostname -a
      $ hostname 
      $ hostname -i

 Step-41: Then go to Desktop and open any bowers.
Step-42: Then type the ULR in ULT bar.
eg : https://192.168.29.50:446/
Default username:-openfiler

Default Password:-password
 Once after successful login you will get a screen which will be containing all your openfiler server information
 Step-43: Click on "System tab" and add both NODE's IP Address in "Network Access Configuration".

Click on "update"


Step-44: Then click on "Volumes tab" in that "Create a new volumes group" on the link 
 Step-45: Click on disk name (Here in my case its /dev/sdb) under Edit Disk which contains the free space we are going to use iSCSI storage. Now you will get a screen where you can make your physical volume.




Step-46: From Partition Type drop down menu select Physical volume and click Create.It will create a physical volume.



Step-47: Now click on Volume Groups on the right hand side. You will be presented a window like below.

Here give some valid name for the volume group and select the physical volumes shown in the list in order to add to the volume group. Then click on Add volume group.









Once volume group creation finishes you can see the volume group listed under volumes tab.

Then Click on "Services Tab"





Next action is to enable iSCSI service. For this open Services tab. You will find there are some service listed and have option to disable/enable the services. From here you have to enable iSCSI target server Service.it will be disabled by default.
1. ISCSI TARGET
2. ISCSI INITIATOR

























Now you need to configure the iSCSI target and allow for the host.To do this goto Volumes tab.On right hand side you will find iSCSI Targets.From there goto Target Configuration as shown in figure below.

You will see some long name under Target IQN.This is going to be your iSCSI target name.Click on Add to add the target.





Then go to LUN Mapping and click on Map to map the LUN to the iSCSI target.













Next goto Network ACL on the same page.You will see the list of network/hostname present here are similar to what you gave in Network Access Configuration before and all will be deny by default.You have to allow them and click on Update.


Then goto Openfiler Operating System and type "/etc/initiators.allow" in this file you will get information of both nodes IP Address blow screen given.






Then open one more file i.e, "/etc/initiatore.deny". In this file we have put Comments (#) on iqn values because if you didnt put comment on the iqn. on nodes what we have share virtual hard disk will not display. So that's why we put comment (#).




After complete all the step restart the openfile operating system with the help of "INIT 0".








Now openfiler configuration is over.We have to attach the storage.

Thanks Comments Please.