OpenFiler as Fiber Channel Target

Monday, 24. May 2010

I wanted to post my findings on how to use OpenFiler as a Fiber Channel SAN.  This process isn’t documented as well as I hoped it would have been but the forums on OpenFiler helped a lot but still were lacking.  This post will go from blank box to Fiber Channel LUN being presented by OpenFiler.  My goal was for a faster SAN as I was using iSCSI but it just didn’t meet my expectations.  For the SAN I am using a Qlogic QLA-2342 fiber card and a Brocade Silkworm 3200 fiber switch.

  1. Download the latest version of OpenFiler.  In this example I used 2.3.
  2. Install OpenFiler with out the fiber channel card installed.
  3. Once installed update OpenFiler using conary updateall.
  4. Reboot once the updates have completed and make sure everything is working ok.
  5. Shutdown the machine and install the fiber card.
  6. Get the WWN of the fiber card port(s) by showing the content of /sys/class/fc_host/hostX/port_name
    cat /sys/class/fc_host/hostX/port_name
    NOTE: X in hostX is the number of the adapter.  If there is more than one port check all WWNs.
  7. Edit /etc/init.d/scst and change the chkconfig to # chkconfig: –  99 36
  8. Have the scst server run on startup with chkconfig scst on
  9. Start the scst service.  service scst start
  10. Write the blank config to file with scstadmin –writeconfig /etc/scst.conf
  11. Create a logical volume for the LUN.
    1. This example we added a drive just for data /dev/sdb this will make prepare the drive to hold logical volumes for LUNs.  First get the geometry for the disk
      parted /dev/sdb print
    2. Label the partition
      parted /dev/sdb mklabel msdos
    3. Create the partition, 0.000 is the beginning and 1907328.000 is the end of the geometry from step 1
      parted /dev/sdb mkpart primary 0.000 1907328.000
    4. Enable lvm
      parted /dev/sdb set 1 lvm on
    5. Create the physical disk
      pvcreate /dev/sdb1
    6. Create the group, luns is the example name of the group
      vgcreate luns /dev/sdb1
    7. Create the logical volume, 50G is the size in GB, lun1 is the name of the logical volume and luns is the group
      lvcreate –L 50G –n lun1 luns
  12. Edit /etc/scst.conf.  vim /etc/scst.conf
    1. Under [TARGETS disable] move the HOST entries under [TARGETS enable].  NOTE: The HOST entry WWN should match the WWN(s) from step 6.
    2. Under  [HANDLER vdisk] add the logical volume created in step 11.
      DEVICE lun1,/dev/luns/lun1,WRITE_THROUGH,512
    3. Under [GROUP Default] add the USER WWN.  This is the server you want to be able to access the LUN.
      USER 21:00:00:1b:32:17:87:7e
    4. Under [ASSIGNMENT Default] add DEVICE then the device created in step 12.2 then the LUN number for the device.
      DEVICE lun1,0
  13. Edit modprobe.conf vim /etc/modprobe.conf and change qla2xxx to qla2x00tgt
  14. Reboot the OpenFiler machine and when it starts the LUN should be presented to the server.

18 Responses to “OpenFiler as Fiber Channel Target”



  1. Eric K. Miller Says:

    Hi Brian,

    Thanks for the info! I’m actually researching this as a possibility too… for a way to use some of our old HP MSA1500cs units behind an OpenFiler, but preferably with OpenFiler as a target, and preferably with multiple FC ports since we have redundant fabrics.

    Do you have any feedback on performance? What machine and disk array configuration did you use?

    Thanks!

    Eric



  2. Brian Says:

    Hi Eric,

    I am running this with a Brocade Silkworm 3200 8 port 2Gb switch and I built my own machine with a Core 2 Duo E8200 on a Toledo i3210W (S5211G2NR) board with 2Gb RAM and a 3Ware 9550SX PCI-X RAID card with (3) 1 TB Hitachi drives in RAID 5 and I get around 220MBps on a XenServer box that is attached to it. I have not tried doing a redundant fabric with OpenFiler but I don’t see why there would be any issues with it. I am happy with the performance of this setup. The box used to be an older dual Xeon setup but the PCI-X was only at 66MHz not 133MHz so that was a big bottleneck and the performance of the new board and chip really made a big improvement. It works very well for my home setup.



  3. Technology Short Take #12: Storage Edition - blog.scottlowe.org - The weblog of an IT pro specializing in virtualization, storage, and servers Says:

    […] Interested in using OpenFiler as an FC target? Have a look here. […]



  4. Steve Jones Says:

    Thanks for this tutorial.. It has gotten me (I believe) 99% of the way there…

    The one problem I’m having is that even though I can do this:
    [root@iscsi38 etc]# cat /sys/class/fc_host/host3/port_name
    0x10000000c940b204

    When I put this section in the .conf file:

    [TARGETS enable]
    HOST 10:00:00:00:C9:40:B2:04

    It refuses to start SCST.. I found and tried “scstadmin -checkconfig /etc/scst.conf” and I get:

    -> WARNING: Target ’10:00:00:00:C9:40:B2:04′ not found on system.

    I’ve tried it with and without the colons, in upper and lower case, etc.. And nothing seems to help..

    If you have any idea what I might be missing, I’d be grateful!!

    -Steve



  5. Обзор блогов от 17.05.11 | vMind.ru Says:

    […] – Подключаем OpenFiler через Fibre Channel[тут] […]



  6. Openfiler as a FC SAN « TechOnTip Weblog Says:

    […] Brian did a good job on this; find his documentation in his blog http://brianshowto.com/?p=38 […]



  7. Yiannis Says:

    Hi. Is it possible to use ATTO celerity HBA instead of Qlogic?



  8. Emule Review Says:

    I was actually considering doing something like this on my blog do you have any references?



  9. Craig Says:

    Not sure if my LUN’s are masking to hosts. Have two LUN’s 0 and 1. Each I believe is masked to all of my initiators:

    INITIATOR 20:00:00:25:B5:10:B8:1F
    INITIATOR 20:00:00:25:B5:10:A8:1F
    INITIATOR 20:00:00:25:B5:10:A8:0F
    INITIATOR 20:00:00:25:B5:10:B8:0F

    Each host is dual homed. Even though zoning only allows each host HBA to see one target on the openfiler, I masked all anyhow. Kind of in debug stage here.
    Is my configuration missing the actual masking? I seem my servers are not seeing the LUN’s. I know the SAN Zoning etc, is fine.

    At SCST Configurator v2.0.0

    cat /etc/scst.conf

    # Automatically generated by SCST Configurator v2.0.0.

    HANDLER vdisk_blockio {
    DEVICE craigsfcvolume {
    t10_dev_id “craigsfcvolume c27d97b3”
    usn c27d97b3

    filename /dev/dasvolume/craigsfcvolume
    }

    DEVICE v-crsimp01 {
    t10_dev_id “v-crsimp01 e951d814”
    usn e951d814

    filename /dev/dasvolume/v-crsimp01
    }
    }

    TARGET_DRIVER qla2x00t {
    TARGET 21:00:00:1b:32:01:2b:04 {
    rel_tgt_id 2
    enabled 1

    GROUP DASBOOT {
    LUN 0 craigsfcvolume
    LUN 1 v-crsimp01

    INITIATOR 20:00:00:25:B5:10:B8:1F

    INITIATOR 20:00:00:25:B5:10:A8:1F

    INITIATOR 20:00:00:25:B5:10:A8:0F

    INITIATOR 20:00:00:25:B5:10:B8:0F
    }
    }

    TARGET 21:01:00:1b:32:21:2b:04 {
    rel_tgt_id 1
    enabled 1

    GROUP DASBOOT {
    LUN 0 craigsfcvolume
    LUN 1 v-crsimp01

    INITIATOR 20:00:00:25:B5:10:B8:1F

    INITIATOR 20:00:00:25:B5:10:A8:1F

    INITIATOR 20:00:00:25:B5:10:A8:0F

    INITIATOR 20:00:00:25:B5:10:B8:0F
    }
    }
    }



  10. Craig Says:

    With one server booted I see the WWPN’s logged in at filer

    Collecting current configuration: done.

    Driver/Target: qla2x00t/21:00:00:1b:32:01:2b:04

    Session: 20:00:00:25:b5:10:a8:0f

    Attribute Value Writable KEY
    —————————————————————–
    active_commands 0 Yes No
    commands 0 Yes No
    initiator_name 20:00:00:25:b5:10:a8:0f Yes No

    Session: 21:fd:00:05:1e:90:17:0c

    Attribute Value Writable KEY
    —————————————————————–
    active_commands 0 Yes No
    commands 0 Yes No
    initiator_name 21:fd:00:05:1e:90:17:0c Yes No

    Driver/Target: qla2x00t/21:01:00:1b:32:21:2b:04

    Session: 20:00:00:25:b5:10:b8:0f

    Attribute Value Writable KEY
    —————————————————————–
    active_commands 0 Yes No
    commands 0 Yes No
    initiator_name 20:00:00:25:b5:10:b8:0f Yes No

    Session: 21:fd:00:05:1e:90:17:0c

    Attribute Value Writable KEY
    —————————————————————–
    active_commands 0 Yes No
    commands 0 Yes No
    initiator_name 21:fd:00:05:1e:90:17:0c Yes No

    All done.



  11. heck Says:

    I am really impressed together with your writing talents as well as with the structure for your weblog. Is that this a paid subject matter or did you modify it your self? Either way stay up the nice high quality writing, it is rare to look a great blog like this one nowadays..



  12. mp3 музыка скачать слушать альбом исполнитель песня рейтинг композиция мп3 радио онлайн online статьи каталог музыкальных заведений скачать м Says:

    Thank you a bunch for sharing this with all folks you really understand what you are talking about! Bookmarked. Please also talk over with my web site =). We will have a hyperlink trade agreement between us



  13. targets Says:

    Just desire to say your article is as astonishing. The clarity to your publish is just great and that i can think you’re knowledgeable in this subject. Well along with your permission let me to seize your feed to stay updated with impending post. Thank you one million and please carry on the gratifying work.



  14. sama Says:

    Edit /etc/init.d/scst and change the chkconfig to # chkconfig: – 99 36

    How to do step 7 … how to edit scst file using commands



  15. David S Says:

    Noob question, but how do you know which “host” number. I’ve tried numbers from 0-15 & it says it cannot find.



  16. Chris Howard Says:

    I got this working fine on a Dell Poweredge 2950 with a QLE2460 and ran it for 2 days straight. I then decided to wash rinse repeat a new installation just to become more proficient at setting them up, and now the same server which was working refuses to work. I’ve killed the esxi and OF instance configs, re-installed, blew away bioses, reseated cards in different pci slots… I think it may have fried something. Anyway… I’m able to mount and create a filesystem in ESXi, but when I attempt to write, the Openfiler installation starts displaying SRR errors. I’ve changed absolutely nothing… Do I need to reset something on the QLE2460 in the POST menu? Delete some cache or something?

    This guy seems to have stumbed into the same problem but is able to correct it:
    https://forums.openfiler.com/offorumsarchive/viewtopic.php?id=4976

    I’ve tried these steps and can’t get this command to work:
    scstadmin -AssignDev -group Default -lun 0

    I’m not sure what I’m supposed to put into , but I’ve tried everything and the command returns a “device doesn’t exist” error (or something like that….

    Please help!! Thanks, Chris



  17. Chris Says:

    I’m having some issues and not sure what to do next.

    My scst.conf
    # Automatically generated by SCST Configurator
    v2.0.0.

    HANDLER vdisk_fileio {
    DEVICE fc_lun {
    t10_dev_id “fc_lun c3859524”
    usn c3859524

    filename /dev/luns/fc_lun
    }
    }

    TARGET_DRIVER qla2x00t {
    TARGET 21:00:00:e0:8b:14:4f:6f {
    rel_tgt_id 2
    enabled 1

    GROUP esxi {
    LUN 0 fc_lun

    INITIATOR 10:00:00:00:c9:46:c2:74

    INITIATOR 10:00:00:00:c9:46:c2:75
    }
    }

    TARGET 21:01:00:e0:8b:34:4f:6f {
    rel_tgt_id 1
    enabled 1

    GROUP esxi {
    LUN 0 fc_lun

    INITIATOR 10:00:00:00:c9:46:c2:74

    INITIATOR 10:00:00:00:c9:46:c2:75
    }
    }
    }

    At the other end I have a windows machine with the emulex HBA anywhere app. I get that there is a connection, optimal (Only on one of the ports !!!) but no lun presented what am I missing?



  18. Nishant Says:

    Storage for VMware ESX 4 (Xtravirt) How to setup basic software iSCSI for VMware vSphere (video) How-to cnceont ESX4, vSphere to Openfiler iSCSI NAS (Vladan.fr) Storage Basics Part I: An Introduction (VM Today) Storage Basics Part II: IOPS (VM

Leave a Reply

You must be logged in to post a comment.