Installation and Configuration of Openfiler On Centos 6.5
Installation and Configuration of Openfiler On Centos 6.5
5:
Openfiler is a operating system that provides file-based network-attached storage and block-
based storage area network. Openfiler provides a simple way to deploy and manage networked
storage.
With the features built into Openfiler, you can take advantage of file-based Network Attached Storage
(NAS) and block-based Storage Area Networking (SAN) functionality in a single cohesive framework.
I am going to show you step by step instructions to set up a new machine with openfiler. Machine can
be a physical machine or a virtual machine.
You can download the iso file for openfiler from openfiler official website:
https://www.openfiler.com/community/download
Insert an iso DVD and boot your machine and follow the instructions:
Click Next to start the installation
Select "Create default layout" from the drop down menu as shown below and click on Next
Select your continent and region for the date and time settings as I selected as Asia/Kolkata
Now since you are trying to access a https page, you will be prompted for security certificate
authentication by the browser as shown below
Click on Proceed anyway
After that you will get the logon page for openfiler
Now first we need to Enable NTP on openfiler so that time and date should be correct, for this go to:
System >> clocksetup >> Enter name of ntp server as "0.pool.ntp.org" >> click setup synchronization
Once you clicked on it, it will show you the available free HDD attached to openfiler.
As we can see above two hdd /dev/sdb and /dev/sdc showing no partitions
Click one by one of all free HDD and Create Physical volume on each disk with full space.
Click on create button.
Next thing we need to do is to create a volume group, for this click on Volume Groups tab
Enter the name of the volume group and select disk which you want to add to VG SAN1 and then click
Add volume group
Check the create VG by clicking on volume groups icon on left side and you will notice SAN1 with 1PV
added to it of size 10GB.
Next is to create filesystem volume on this volume group or we can say create a logical volume on vg.
For this click on system >> under Network Access Configuration tab
As we are going to use multipathing on iscsi storage so we need to add first two extra NIC card to the
openfiler system and then configure it with 2 different network IPs.Should look like this
Now if you want to allow multiple networks to access iscsi target then allow all 3 different networks
under Network Access Configuration so that iscsi target can access from these network as well. Should
look like this:
Next step is to enable iscsi service, for this click on services tab enable iscsi target and then start
the iscsi service.
Now, click on volumes you will notice volume san-1 is showing which is having filesystem type iscsi. We
need to share this volume using iscsi target, for this
You will find iscsi qualified name or IQN, you can think as a dns host name and it should be unique.
Provide name to the target IQN and the click on add button. This will set iscsi target as:
iqn.2015-07.openfiler.local:disk1
Next click on LUN Mapping and map new LUN to target, for this click on map on the volume which we
created.
Now click on Network ACL and select allow for all 3 different network and click on update. Now we are
allowing iscsi initiator to connect to iscsi target on these network.
There is one more option CHAP Authentication in which we can create username and password to
connect to iscsi target on openfiler through remote pc's.we recommend to do this but before we need
to check whether we are able to connect to iscsi target without this security.
To configure CHAP discovery, go to services and then select iscsi target setup
This is where you configure CHAP discovery, so iscsi chap discovery allows you to discover the SAN and
then you can put CHAP on individual LUN to access the LUN
Install or update the required packages on client i.e. node1and node2 for
configuring multipath:
Install updated packages:
#yum update device-mapper
#yum install device-mapper-multipath
Now, we scan and discover iscsi targets on node1 and node2 for all 3 different
networks:
192.168.0.120:3260,1 iqn.2015-07.openfiler.local:disk2
192.168.2.120:3260,1 iqn.2015-07.openfiler.local:disk2
192.168.1.120:3260,1 iqn.2015-07.openfiler.local:disk2
192.168.0.120:3260,1 iqn.2015-07.openfiler.local:disk1
192.168.2.120:3260,1 iqn.2015-07.openfiler.local:disk1
192.168.1.120:3260,1 iqn.2015-07.openfiler.local:disk1
As we have discovered the disk1 and disk2 on both nodes by using 3 different
networks, now we login from different networks to disk1 and disk2 which is on
openfiler.local:
[root@node1 ~]# iscsiadm -m node --portal 192.168.0.120:3260 -T iqn.2015-
07.openfiler.local:disk1 l
[root@node1 ~]# iscsiadm -m node --portal 192.168.1.120:3260 -T iqn.2015-
07.openfiler.local:disk1 l
[root@node1 ~]# iscsiadm -m node --portal 192.168.2.120:3260 -T iqn.2015-
07.openfiler.local:disk1 l
[root@node1 ~]# iscsiadm -m node --portal 192.168.0.120:3260 -T iqn.2015-
07.openfiler.local:disk2 l
[root@node1 ~]# iscsiadm -m node --portal 192.168.1.120:3260 -T iqn.2015-
07.openfiler.local:disk2 l
[root@node1 ~]# iscsiadm -m node --portal 192.168.2.120:3260 -T iqn.2015-
07.openfiler.local:disk2 l
If you set user_friendly_names to yes you will see maptha and mpathb:
[root@node1 ~]# multipath -ll