Site icon Ron Ekins' – Oracle Technology, DevOps and Kubernetes Blog

How to configure the Oracle ZFS Storage Appliance VM simulator for iSCSI Block Storage

Introduction

In a previous post last year I have shared how to install and configure the Oracle ZFS Storage Appliance simulator on VirtualBox, and also on VMware Fusion.

Earlier this year I shared how to we can use the Oracle ZFA Storage VM to create an environment to experience Oracle Direct NFS (dNFS) with NFSv4.1

In this post I am going to show how we can use the same Oracle ZFS Storage Appliance simulator to provide an environment to learn about block storage with iSCSI.

Please Note: this configuration is for purely educational and training purposes and should not be considered suitable for Production use.

Oracle ZFS Storage VM

On my laptop I have started an Oracle ZFS storage appliance simulator on VirtualBox with a 75G storage pool.

Storage Pool

Create iSCSI Target

To set-up an iSCSI block device we first need to create an iSCSI Target, to do this navigate to Configuration -> SAN and click iSCSI.

Storage Ares Network (SAN)

Click on the + button to create an iSCSI target

Create iSCSI Target

In this example the IQN has been automatically created as iqn.1986-03.com.sun:02:1cebac00-6444-4e4d-bd5c-865fd6e6575a.

iSCSI Target

Create iSCSI LUN

Navigate to Shares and click on LUNs

Create iSCIS LUN

Provide an Name and Volume size, and hit APPLY, for example.

Create LUN

Note the LUN GUID, in my example it’s 600144F0EDC1B00B0000622BF3150001

Storage LUNs

Linux Server

For my database server I am using a Vagrant built Oracle Linux 7.9 server, the Vagrant and Ansible playbooks are available on my GitHub repo.

[root@oracle19c ~]# cat /etc/oracle-release
Oracle Linux Server release 7.9

We can confirm the IQN with the ZFS simulator using iscsiadm fo example.

[root@oracle19c ~]# iscsiadm -m session -o show
tcp: [1] 192.168.56.101:3260,2 iqn.1986-03.com.sun:02:1cebac00-6444-4e4d-bd5c-865fd6e6575a (non-flash)

And confirm the block device by checking the UUID aligns.

[root@oracle19c ~]#  /usr/lib/udev/scsi_id -g -u /dev/sdc
3600144f0edc1b00b0000622bf3150001

Use fdisk to check volume size and see the sector sizes.

[root@oracle19c ~]# fdisk /dev/sdc -l

Disk /dev/sdc: 10.7 GB, 10737418240 bytes, 20971520 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 8192 bytes / 8192 bytes

Using mount -t xfs we can see the Ansible playbook has successfully mounted the device.

[root@oracle19c oracle]# mount -t xfs
...
/dev/sdc on /opt/oracle/oradata type xfs (rw,relatime,attr2,inode64,noquota)

Summary

In this post I have demonstrated how the Oracle ZFS Storage VM can be used to deliver block volumes via iSCSI, and we can automate the build, configuration and usage with an Oracle Linux Server and Ansible.

[twitter-follow screen_name=’RonEkins’ show_count=’yes’]

Exit mobile version