Oracle ASM on FreeNAS 8.3.0 x86

Hey there folks, just writing this very quick tip on how to setup an iSCSI storage for your *crash and burn* environment… In this tutorial I will not care for network settings, security or anything, I will just demonstrate the installation and configuration of the storage using the raw devices as luns. (They can be split within FreeNAS and used as extents, but this is for a later post).

You can download this version of FreeNAS in both 32 and 64 bits from the links below:

https://download.freenas.org/8.3.0/RELEASE-p1/x86/
https://download.freenas.org/8.3.0/RELEASE-p1/x64/

Create virtual machine

Since the idea is to have a storage simulated using as few resources as possible, I’m using FreeNAS 8.3.0 – 32 bits, create a VM and set the TYPE to BSD and VERSION to FreeBSD (32-bit) — or 64 bit if you are using that architecture for storage.

001

Set the memory to 512 MB, it will fire an warning during installation but does not block the installation.

002

Create a new virtual disk, I recommend to leave the default of 16 GB.

003

Leave the default disk type, VDI.

004

Dynamically allocated is fine for this setup.

005

This is the disk where the installation will reside. I’ll leave the default.

006

As the initiatior (client machine) resides on my physical network, I will change the NIC to Bridged mode.

007

In the storage tab, I’ve added a SCSI controller and created 3 disks will be later on used as LUNS, I also inserted the iso image in the CD drive.

008

Here is an overview of the machine ready to begin the installation.

009

FreeNAS Installation

When you boot the machine, you will be presented the Console Setup, select option 1 and hit Enter.

010

Select the drive ada0 which is the IDE disk where the installation will reside.

011

Select NO when prompted if you want to preserve existing parameters, as this is a fresh install.

012

Select YES to format and proceed.

013

The installation takes 1 minute and a few seconds on my hardware (which is not that good).

014

After rebooting you will see the IP obtained from DHCP. You can set a static IP in option 1 but I am using the default here just to demonstrate the storage setup.

015

iSCSI Configuration

Browse to the IP address of FreeNAS and click on “Services”.

016

Locate iSCSI and click on the tool icon to configure it before turning it on.

017

This step is necessary just for older versions of FreeNAS, select “Enable LUC” and change the “Controller Auth Method” to “None”.

018

Go to the Portals tab and add the portal. I’ll leave the IP address to 0.0.0.0 and the default TCP Port 3260.

019

Move on to Initiators tab and configure the initiators according to your needs, I will just leave ALL and ALL, because I don’t intend to setup authentication for this storage.

020

Now, on Targets tab, create the target name which will be servicing the Luns to the Initiators. I will follow the standard naming convention (iqn.YYYY-MM) which is usually when the iSCSI target was created, in my example: iqn.2017-05 + storage + purpose. (I’m not sure if there’s a convention for what follows the month).

Notice I have also disabled the authentication and set the Portal Group ID and Initiator Group ID to 1, which is what was created in previous tabs.

021

Now on the Device Extents tab, just click on Add Device Extent button and assign the devices you want to be presented as LUNs.

022

Finally, on the “Associated Targets” tab, assign the luns to the target.

023

Back to Services, just change the switch from OFF to ON and you are good to go.

024

Present LUNs to the server

Now go to the server you want to present the luns and install the package iscsi-initiator-utils

[oracle@mustang ~]$ su -
Password: 
[root@mustang ~]# dnf -y install iscsi-initiator-utils
Fedora 25 - x86_64 - VirtualBox 243 kB/s | 33 kB 00:00 
Fedora 25 - x86_64 - Updates 1.1 MB/s | 23 MB 00:20 
google-chrome 24 kB/s | 3.8 kB 00:00 
Last metadata expiration check: 0:00:01 ago on Sun May 21 09:30:23 2017.
Package iscsi-initiator-utils-6.2.0.873-34.git4c1f2d9.fc25.x86_64 is already installed, skipping.
Dependencies resolved.
Nothing to do.
Complete!

Now connect to the portal and request the target as in the example below:

[root@mustang ~]# iscsiadm -m discovery -t sendtargets -p 192.168.1.225
192.168.1.225:3260,1 iqn.2017-05.freenas.oracleasm

Now if we look at the devices, we still can’t see the LUNs:

[root@mustang ~]# ls -la /dev/sd*
brw-rw----. 1 root disk 8, 0 May 19 15:34 /dev/sda
brw-rw----. 1 root disk 8, 1 May 19 15:35 /dev/sda1
brw-rw----. 1 root disk 8, 2 May 19 15:34 /dev/sda2
brw-rw----. 1 root disk 8, 3 May 19 15:34 /dev/sda3
brw-rw----. 1 root disk 8, 16 May 21 08:50 /dev/sdb
brw-rw----. 1 root disk 8, 17 May 21 08:58 /dev/sdb1

To finish it up, login to the target and the devices are presented.

[root@mustang ~]# iscsiadm -m node --login
Logging in to [iface: default, target: iqn.2017-05.freenas.oracleasm, portal: 192.168.1.225,3260] (multiple)
Login to [iface: default, target: iqn.2017-05.freenas.oracleasm, portal: 192.168.1.225,3260] successful.

Now we can see the LUNs and you can proceed to configure them with udev rules, asmlib, etc.

[root@mustang ~]# ls -la /dev/sd*
brw-rw----. 1 root disk 8, 0 May 19 15:34 /dev/sda
brw-rw----. 1 root disk 8, 1 May 19 15:35 /dev/sda1
brw-rw----. 1 root disk 8, 2 May 19 15:34 /dev/sda2
brw-rw----. 1 root disk 8, 3 May 19 15:34 /dev/sda3
brw-rw----. 1 root disk 8, 16 May 21 08:50 /dev/sdb
brw-rw----. 1 root disk 8, 17 May 21 08:58 /dev/sdb1
brw-rw----. 1 root disk 8, 32 May 21 09:33 /dev/sdc
brw-rw----. 1 root disk 8, 48 May 21 09:33 /dev/sdd
brw-rw----. 1 root disk 8, 64 May 21 09:33 /dev/sde

 

Hope this helps.

Advertisements

About Bruno Carvalho

Coffee addicted tech guy.
This entry was posted in Storage and tagged , , , , , , , , , . Bookmark the permalink.

2 Responses to Oracle ASM on FreeNAS 8.3.0 x86

  1. Adarsh Madrecha says:

    Why use OLD 8.X version? Any specific reason? I am using 11.0 version, which is running perfectly fine.

    • Hi Adarsh, in this post my idea was to demonstrate how to setup a storage with very few resources (1vcpu and less than 1gb of ram). I am using 11 in my lab as well, it is very good.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s