OpenIndiana Installation walkthrough - Part 3

This is Part 3 of a series of posts explaining how to configure OpenIndiana as NAS storage device. The series is made up of the following parts:

  1. Background information about OpenIndiana and OS installation
  2. Network configuration and Setting up storage
  3. Presenting storage to your Hosts with iSCSI and/or NFS
  4. Performance testing

At the end of Part 2 we had the network set up, VMware Tools installed, additional disk space added to the VM, and a zpool created.
What we will go through in this part is:

  1. Configuring NFS and iSCSI services
  2. Creating a Volume for iSCSI
  3. Create an NFS folder
  4. Create a LUN and share it with an iSCSI
  5. Export NFS Volume and set export parameters
  6. Mount NFS and iSCSI storage

So first we need to turn on the iSCSI and NFS services. NFS is just to start a service, iSCSI has a bit more to it.

svcadm enable -r iscsi/target:default  
svcadm enable network/nfs/status

enable iscsi and nfs

Now we create the target with

itadm create-target

You can check the status with

itadm list-target

create target

Create the volume and the NFS folder (I will create a small 2GB Volume) and then query for status

zfs create -V 2G disk1/iscsi_1
zfs create disk1/nfs_1

create volumes

zfs list

list volumes

Here you can see disk1 is 5GB (USED+AVAIL), disk1/iscsi_1 is 2GB is size (thin provisioned) and the disk1/nfs_1 has 3GB space left in total

Now we create the iSCSI LUN with

sbdadm create-lu /dev/zvol/rdsk/disk1/iscsi_1

and add it to the masking of the iSCSI initiator with the GUID that was just created

stmfadm add-view 600144f0ccf40a0000004fb114700002

Just to check that all is set correctly list the LUNs

stmfadm list-lu

List the masking

stmfadm list-view -l 600144F0CCF40A0000004FB114700002

iSCSI LUN

One last thin left to do is to set the NFS export permissions with the following (you will need either the FQDN of the host or the correct IP for the export permissions)

zfs set sharenfs=on disk1/nfs_1
zfs set sharenfs=root=msaidelk-esx.maishsk.local disk1/nfs_1  
zfs get mountpoint,sharenfs disk1/nfs_1

NFS shares

And that is it – the storage configuration is complete.
Now we go over to the ESX and mount the storage.

First the iSCSI volume

Add target

After a rescan of the adapter I now have a new 2GB LUN

New LUN

On to NFS.

Add NFS

We now have a new NFS storage mount

New NFS

There you have it a fully working storage appliance on OpenIndiana.

In Part 4 I will show some performance statistics I am getting out of this VM.