Resource icon

Updated guide for Fibre Channel on FreeNAS 11.1u4

sfcredfox

Patron
Joined
Aug 26, 2014
Messages
340
Last time I asked about this, I was told there is no LUN masking option since FC wasn't really part of the community version. I'm not sure if that's changed. If someone knows otherwise, I'm interested as well.
 

ChinookTx

Dabbler
Joined
Feb 11, 2016
Messages
29
Thanks for the reply. At least I know it's not something I missed (unless we both did!)
 

sfcredfox

Patron
Joined
Aug 26, 2014
Messages
340
The only limitation I can think of it imposing is boot from SAN, otherwise, just watch out for making any changes to extent serial/LUN ID. It seems everytime I do SAN reboots, I get at least one host pissed off about the nonipersistent or snapshot thing where you'll be missing a datastore
 

kdragon75

Wizard
Joined
Aug 7, 2016
Messages
2,457
Hey all, thanks for the great info and howto.

Unless I've done something wrong, it seems that each host connected to Freenas sees ALL extents? Is there any way to tie specific hosts to extents?

I have a fairly simple setup. 2 ESXi hosts each with their own FC card. My FreeNAS box has a dual port FC card, one port per host. After adding a datastore to a host, it shows up on the other host. The ESX hosts are not in a cluster, just part of the same "datacenter" instance.

Is this expected?
Yes. What your looking for is called lun masking. This is not supported but I think you can get the same effect by manually configuring ctld.conf. this is outside the scope of this how to.
 

HoneyBadger

actually does care
Administrator
Moderator
iXsystems
Joined
Feb 6, 2014
Messages
5,110
Yes. What your looking for is called lun masking. This is not supported but I think you can get the same effect by manually configuring ctld.conf. this is outside the scope of this how to.
I'm not certain if CTL has LUN masking yet, but as I mentioned earlier in the thread if your switch has NPIV support you should be able to create virtual ports with hint.isp.N.vports and set up multiple targets/portals. This at least lets you separate LUNs to some degree although it isn't nearly as clean as proper LUN masking.
 

Holt Andrei Tiberiu

Contributor
Joined
Jan 13, 2016
Messages
129
There is no LUN masking in Freenas, and probably, will never bee. Only in Truenas

Remember, FC is working off the books in FreeNAS, it is not officially supported.
 

kdragon75

Wizard
Joined
Aug 7, 2016
Messages
2,457
There is no LUN masking in Freenas, and probably, will never bee. Only in Truenas

Remember, FC is working off the books in FreeNAS, it is not officially supported.
TrueNAS does not support lun masking either. The use npv or node port virtualization. Each LUN can then be shared only over a specific port.
 

Holt Andrei Tiberiu

Contributor
Joined
Jan 13, 2016
Messages
129
TrueNAS does not support lun masking either. The use npv or node port virtualization. Each LUN can then be shared only over a specific port.

THX for the update.
 

godsfshrmn

Cadet
Joined
Jun 23, 2014
Messages
9
Is it possible to see transfer speeds on either side of the interface? I'm curious to see how much bandwidth is being use and what my max speeds are.

I don't see an interface listed under the GUI (which I think i read is normal unless I'm mistaken)?
 
Last edited:

levinet

Cadet
Joined
Jan 9, 2021
Messages
9
Hey!

I did some tests with my FC setup with freenas 11.3U4 and the speeds are not good at all...

I opened a Thread for this problem, i hope you can help me out!

Thank you
 

hoagan78

Cadet
Joined
Apr 28, 2021
Messages
2
Hi,

Thanks for the great howto!
I've already configured an ISCSI target which is on a ZVOL. The box is on FreeNAS-11.2-U3.
The extend is already on a blocksize of 512.
Is it posible to "migrate" this ISCSI target without data loss to an FC target by this guide?
Is a update to the latest TrueNAS CORE 12.0-U3 possible?

Thanks
Börny
 

eshwayri

Dabbler
Joined
May 29, 2016
Messages
18
FreeNAS-11.3-U5

I ran into the issue where all the extends on the FreeNAS server were being exported on FC. The issue for me is that I have an iSCSI volume (RHEV) that gets corrupted by the Linux FC initiator host when it tries to access it. Turns out the oVirt iSCSI back-store is just an LVM group.

The behavior of ctladm when you define a target that doesn't match a physical port is to give that target access to everything. So in my /etc/ctl.conf:

target "iqn.2005-10.org.freenas.ctl:qbufc0" {
alias "qbufc0"
portal-group "pg4" "no-authentication"

lun "0" "belkira_qsdp_0"
lun "1" "belkira_qsdp_1"
}

I really want it to look like:

target "naa.21000024ff33f1b2" {
alias "qbufc0"
portal-group "pg4" "no-authentication"
port isp0

lun "0" "belkira_qsdp_0"
lun "1" "belkira_qsdp_1"
}

The naa is the target name assigned by ctld based on the WWN of the port.

root@maragor[~]# ctladm portlist
Port Online Frontend Name pp vp
0 YES ioctl ioctl 0 0
1 YES tpc tpc 0 0
2 NO camsim camsim 0 0 naa.5000000364345303
3 YES camtgt isp0 0 0 naa.21000024ff33f1b2
4 YES camtgt isp1 0 0 naa.21000024ff33f1b3
5 YES iscsi iscsi 2 1 iqn.2005-10.org.freenas.ctl:kvm0,t,0x0002
6 YES iscsi iscsi 4 2 naa.21000024ff33f1b2,t,0x0004
7 YES iscsi iscsi 1 3 iqn.2005-10.org.freenas.ctl:vmware0,t,0x0001
root@maragor[~]#

I tried this manually, and sure enough when it looks like this, only the two LUNs I have defined are exported through port 0 o FC. So the question then was how to make it always look like this. The answer is in /usr/local/lib/python3.7/site-packages/middlewared/etc_files/ctld.py. I opted to change the logic so when the target name starts with naa and there is an : in the name, to use the part to the left of the colon as the target field, and the part to the right of the colon as the port field. A quick delete of the pycache, and I validated. I now get this entry when I create or modify from the GUI:

target "naa.21000024ff33f1b2" {
port "isp0"
alias "qbufc0"
portal-group "pg4" "no-authentication"

lun "0" "belkira_qsdp_0"
lun "1" "belkira_qsdp_1"
}

which behaves as I need it to. From the FC initiator:

--------------------------------------------------------------------------------
HBA Instance 0: QLE2562 Port 1 WWPN 21-00-00-24-FF-33-F5-DA PortID 00-00-E8
Link: Online
--------------------------------------------------------------------------------
Path : 0
Target : 0
Device ID : 0xffff
Product Vendor : FreeNAS
Product ID : iSCSI Disk
Product Revision : 0123
Serial Number : ac1f6bb058a3002
Node Name : 21-00-00-24-FF-33-F1-B2
Port Name : 21-00-00-24-FF-33-F1-B2
Port ID : 00-00-EF
Product Type : FCP Disk
LUN Count(s) : 2
Remote Type : Unknown
Session State : N/A
Secure Mode : Disabled
Rekey Count : 0x0
Congestion Current State : Unknown
Status : Online
------------------------------------------------------------

i am doing a x-connect between the two, so I don't need full blown lun masking based on initiator. Port based zoning like this is quite sufficient for me.
 
Last edited:

AlanOne

Dabbler
Joined
Apr 6, 2022
Messages
17
I have mellanox connectx-2 EN sfp+ cards. Although I can do ethernet ISCSI, how to enable FCOE? I tried the steps described here, but the FCOE initiator from the other side does not find anything. It seems to me that the card is running in simple eth mode.
 

sfcredfox

Patron
Joined
Aug 26, 2014
Messages
340
This might just be my system, but I found that the ports were not starting after reboot even though it was being set as a loader setting:

ctladm
port -o on -t fc
LOADER

I read there was a bug somewhere, so I just added it as a post init command:
Code:
ctladm port -o on -t fc
 
Top