Other FC & CTLD - how to assign LUN to client?

Hi,

I'm using an appliance based on 10.0-STABLE called zfsguru.

With a little bit of help build a new world (?) to make fibre channel (isp(4)) work in Target mode through ctld(8). This way I'm directly connected with 1 ESXi host for months now and transferred many TB's already.

Really happy with that despite the fact that it spews some "low-level" SCSI messages of some kind. Now I want to expand it so I bought a switch (QLOGIC) to connect more machines to the fabric. While booting 'the' third machine, the controller is able to see the LUNs hosted on my target machine during POST. Now I would like to know if/and how to assign dedicated LUNs to WWNs of the specified client(s).

Is it possible with WWNs / WWPNs?

In my /etc/ctl.conf, I've got the following config:

Code:
portal-group pg0 {
  discovery-auth-group no-authentication
  listen 0.0.0.0:3260
  }

  target iqn.2014-06.zfsguru.freebsd:target0 {
  auth-group no-authentication
  portal-group pg0

  lun 0 {
  path /dev/zvol/RAID50/CSYSTEM
  size 300G
  }


Thanks in advance,

Martijn
 
Last edited by a moderator:
The ctl.conf() man page seems pretty straight forward. By the look of it you need to be using the initiator-name or initiator-portal options.

Read the manual carefully though, you can't specify that option on a target that already has an auth-group option. You either need to create two auth groups, and specify the valid initiators there, or add the initiators to the target and remove the auth group option. (which I can only assume means only the specified initiator can connect, with no auth; It's not clear on that, you'd have to try it)
 
In FreeBSD 10.0 there is not any LUN mapping for FC at all. In present FreeBSD 10-STABLE it is possible to map LUNs to separate FC ports. Mapping to separate initiator WWNs is unfortunately not possible.
 
Is this not possible at all? Is this still under development? Is there another way to get this done, version 11 perhaps?
 
It is not implemented now. Can't say about future.

There is alternative highly experimental way -- you can configure several virtual ports (using hint.isp.0.vports tunable) for one physical, set separate LUN mapping for each port, and then filter them on a switch.
 
On Linux there is SCST as a framework. Is it in any way possible to fork to BSD or am I kicking against CTLD developers? I'm using 2 SSD's for which BSD's zfs knows about trimming (ZFS-on-linux still doesn't).
 
Back
Top