You are on page 1of 12

This is a short manual using screenshots to show how to configure Openfiler, mainly as iSCSI target.

I regularly use Openfiler as storage to test cluster setups with Oracle RAC or other cluster software. Openfiler is one of the options to have a storage with many interfaces: NFS, SMB, rsync, WebDAV, FTP, iSCSI and more:

SETUP OPENFILER AS V IRTUAL MACHINE


Download an ISO image here, setup a new virtual machine and add i.e. one hard disk for Openfiler itself and two more for shareable storage. I wont cover setting up Openfiler in detail here as the installation itself is easy. Resources for this are:

Christians blog entry Installation & Konfiguration von Openfiler 2.3 fr Oracle RAC(german). How to configure OpenFiler v2.3 iSCSI Storage for use with VMware ESX

LOGGING IN INTO OPEN FILER WEB ADMINISTRA TION


Navigate to https://192.168.3.66:446/ and login using openfiler as username, password as password. You will see a status page:

CONFIGURE BLOCK DEVICES


Add the two other hard disks as block devices to Openfiler. Click on Volumes (upper menu) ->Block Devices (right menu).

SETUP A VOLUME GROUP


To add a volume group which consists od physical volumes, go to Volumes -> Volume
Groups:

Click in the column Add physical storage to add the block devices. A click on View member PVs looks like this:

SETUP SOME VOLUMES


Click on Volumes -> Add
Volume

and give the volume a name, size and filesystem type:

After adding some volumes, Volumes -> Manage

Volumes

looks like this:

SHARE VOLUMES
Now share volumes by adding a iSCSI target, Volumes -> iSCSI Configuration:
Targets

-> Target

Click on Add under Add new iSCSI Target. Next, click on LUN Mapping and assign a LUN to your volumes. Just click on Map in the list of unmapped volumes. After that the page LUN Mapping should look like:

ENABLE SERVICES
To use iSCSI you need to enable it under Services. Just click on the Enable link of all services you need:

SETUP ACCESS CONTROL


Under System add the desired hosts and/or networks that are allow to connect to Openfiler:

Next be sure to allow access in Volumes -> iSCSI

Targets

-> Network

ACL:

Set Access to Allow and click Update. Attention: maybe you wont see iSCSI targets from the client. Openfiler wont accept connections; check /etc/initiators.deny for an entry denying access from ALL. Just comment it out and save the file. Take care: Openfiler will regenerate this file from time to time

ACCESS ISCSI TARGETS FROM SOLARIS


Enable iSCSI initiator service:
1. root@rac1:/ # svcs *iscsi* 2. root@rac1:/ # svcadm enable initiator

Enable send target mode with iscsiadm

modify discovery:

1. root@rac1:/ # iscsiadm modify discovery --sendtargets enable 2. root@rac1:/ # iscsiadm list discovery 3. Discovery: 4. 5. 6. Static: disabled Send Targets: enabled iSNS: disabled add discovery-address:

Add the IP address of your iSCSI target with iscsiadm

1. root@rac1:/ # iscsiadm add discovery-address 192.168.3.66 2. root@rac1:/ # iscsiadm list discovery-address 3. Discovery Address: 192.168.3.66:3260 4. root@rac1:/ # iscsiadm list target 5. Target: iqn.2006-01.com.openfiler:tsn.bb9e3f57be77 6. 7. 8. 9. Alias: TPGT: 1 ISID: 4000002a0000 Connections: 1

Create device files using devfsadm so that Solaris can start using the new disks:

1. root@rac1:/ # devfsadm -C -i iscsi

Repeat this after you changed iSCSI targets by removing or adding LUNs. You can see a list of the devices using iostat -En:
1. root@rac1:/ # iostat -En 2. c0d0 3. Model: Virtual Soft Errors: 0 Hard Errors: 0 Transport Errors: 0 HDD [0 Revision: Serial No: 014159265358979 Size: 68.72GB

<68719214592 bytes> 4. Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0 5. Illegal Request: 0 6. c0t1d0 7. Vendor: Soft Errors: 0 Hard Errors: 0 Transport Errors: 0 Product: Virtual DVD-ROM Revision: R103 Serial No:

8. Size: 0.00GB <0 bytes> 9. Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0 10. Illegal Request: 2 Predictive Failure Analysis: 0 11. c1t1d0 Soft Errors: 0 Hard Errors: 0 Transport Errors: 0 Revision: 0 Serial No:

12. Vendor: OPNFILER Product: VIRTUAL-DISK 13. Size: 4.29GB <4294966784 bytes>

14. Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0 15. Illegal Request: 2 Predictive Failure Analysis: 0 16. c1t2d0 Soft Errors: 0 Hard Errors: 0 Transport Errors: 0 Revision: 0 Serial No:

17. Vendor: OPNFILER Product: VIRTUAL-DISK 18. Size: 0.34GB <335543808 bytes>

19. Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0 20. Illegal Request: 2 Predictive Failure Analysis: 0 21. c1t3d0 22. [...] Soft Errors: 0 Hard Errors: 0 Transport Errors: 0

Now fdisk, format and newfs the devices. See Formatting Many Raw Devices At Once on Solarisfor a script to format many raw devices at once. Have fun!