Register for the iXsystems Community to get an ad-free experience and exclusive discounts in our eBay Store.

FC target support in FreeNAS 9.1.0

Western Digital Drives - The Preferred Drives of FreeNAS and TrueNAS CORE

aran kaspar

Member
Joined
Mar 24, 2014
Messages
68
i got a Little Problem, after a update and reboot the FreeNAS System.

The extents and target/extents was missing,
after i entered this again, the volume was showing in esx, but all data are lost and i must reformatting it.
its a bit strange, i do now a new test...

i use the last nighlies Version, was this wrong ? or mus i use only the stable version ?
Stable should work. Try it and let us know. Thank you
 

Thomas Lindell

Neophyte
Joined
Jun 5, 2015
Messages
5
In my case I have
Freenas Box with
qty 2 qle2562 Dual port cards. 4 Ports total

qty 2 esxi servers with qty 2 qle2562 Dual port cards. 4 ports for each box

Each esxi Server connects two ports from different cards to the freenas box

ESXI Sees the VMFS Formated FibreChannel Luns on both hosts and I can do hot migrations etc.

I do not know if this would work the same way if I have a Fibre Channel Switch but since I only have the two esxi hosts it's a decent setup.






Thanks for the reply.
It could be my fault, but on the switch's FLOGI or FCNS database there is no LUN's WWNs entries.
tlindel
It works great for one ESXi server. After connecting to the storage's HBA, the server sees all the LUNs.
Because LUNs are not visible on the switch, sharing the storage with multiple servers is not feasible.


Qlogic is the HBA on the storage, and have multiple LUNs.
Emulex is on the server side. It does see all the LUNs after connecting to the storage.
On the switch, the port is FX (auto select F or FL, and it is F now)
Find the HBA, but no LUN WWNs.
========================================================================================
FCNS output:
--------------------------------------------------------------------------
FCID TYPE PWWN (VENDOR) FC4-TYPE:FEATURE
--------------------------------------------------------------------------
0x310000 N 21:01:00:1b:32:3b:7a:fe (Qlogic) scsi-fcp:target
0x360000 N 10:00:00:00:c9:97:5c:3d (Emulex) ipfc scsi-fcp:init

FLOGI
--------------------------------------------------------------------------------
INTERFACE VSAN FCID PORT NAME NODE NAME
--------------------------------------------------------------------------------
fc1/3 3067 0x310000 21:01:00:1b:32:3b:7a:fe 20:01:00:1b:32:3b:7a:fe
 

MaIakai

Member
Joined
Jan 24, 2013
Messages
25
Well I did it, 8GB fibre working single host to freenas target.

So far so good. Amazing how easy it was compared to before. Only problem is I lost my original iSCSI lun mappings during the 9.3 upgrade, and now it seems everything only goes through FC. Oh well no biggy. The speed is welcome.
 

aran kaspar

Member
Joined
Mar 24, 2014
Messages
68
How did you select the dashes? Looks like when you pick the ----- it will default to 0.0.0.0. I believe this force ISCSI for all able interfaces.
Correct, it makes it 0.0.0.0 anyway so maybe it doesn't matter lol. Use trial and error my friend... (six, long, grueling, hair-pulling, months)!
 

aran kaspar

Member
Joined
Mar 24, 2014
Messages
68
Aran,

Great job on breaking this all out and documenting this. Question regarding the "target mode." In 9.3 STABLE releases the ispfw_lad is set in the loader.conf by default, ctl_load is not. Shouldn't matter thought.

Does anyone know what the values of (Target, Initiator, Both) is? Some information out there is conflicting out on the baords and it looks like you have it nailed down here.

For the follow, what are the possible values?
hint.isp.0.role

Target = 0
Initiator = 1
Both = 2

or

None = 0
Target = 1
Initiator = 2
Both = 3

--------------------------------------

For the
  • ctladm port -o on -t fc
We could do a post script to execute after...

I think it's like this...
Target = 0
Initiator = 1
Both = 2
 

mav@

iXsystems
iXsystems
Joined
Sep 29, 2011
Messages
1,120
I think it's like this...
Target = 0
Initiator = 1
Both = 2
No, it is not. The real values are:
None = 0,
Target = 1,
Initiator = 2,
Both = 3.

But there are few tricks to know:
- "Both", while potentially possible, is not supported now;
- "Target" mode should not be enabled via this tunable directly to avoid transition effects during boot; if you want to run target, tunables should be set to "None" instead, while CTL ports should be enabled with mentioned ctladm command after boot, that will automatically switch FC port mode to "Target".
 

mav@

iXsystems
iXsystems
Joined
Sep 29, 2011
Messages
1,120
Hey Mav,
Is there a good article you know of that I can read regarding benefits of multipath?
Multipath is mostly just a several independent SCSI connections. What benefits can it give depends on specific initiator, load pattern and configuration. At least it improves reliability. Whether it improves performance -- depends.
 

mbucknell

Newbie
Joined
May 31, 2015
Messages
2
The FC support works really well, i have been playing with it for the last couple of weeks, i did find an interesting issue and it was the same with iSCSI, which is why i started messing about with FC in the first place.

I have a couple of ESXi boxes and 2 x freenas datastores point to point connected via FC (qlogic 2564 / 2560 & 2460)

If you set up a dedup dataset and then create a zvol under the dataset and share it out, it seems to work fine to start with, but as soon as you pass a few hundred gigs, the LUN goes off-line and keeps disconnecting / re-connecting stalling out all the time and totally un-usable.
I did manage to get it to work fine by creating a file extent under the dedup dataset, ESXi complains about the latency sometimes, but i didn't get the LUN going off-line.

Hope this helps anyone who wanted to use a dedup LUN from their freenas box.
 

mav@

iXsystems
iXsystems
Joined
Sep 29, 2011
Messages
1,120
If you set up a dedup dataset and then create a zvol under the dataset and share it out, it seems to work fine to start with, but as soon as you pass a few hundred gigs, the LUN goes off-line and keeps disconnecting / re-connecting stalling out all the time and totally un-usable.
Dedup is generally not recommended due to very high memory usage to store dedup tables. Dedup tables consist of records for every unique block. ZVOL block size is typically very small (8-16K), that much smaller then default for datasets (128K). It means that dedup table will grow really huge due to bigger number of records, that can make storage unusable. Don't do that unless you know what you are doing!
 

xx0m3gaxx

Neophyte
Joined
Aug 6, 2015
Messages
6
Is it possible to put one port in one mode and the other in another on a 2 port card? Sorry for asking this if it seems obvious I am kinda new to this still
 

mav@

iXsystems
iXsystems
Joined
Sep 29, 2011
Messages
1,120
Is it possible to put one port in one mode and the other in another on a 2 port card?
Yes, it is absolutely possible. Dual-port Qlogic cards work like two completely separate cards.

On the other side recent FreeNAS versions (9.3.1) should support even being both initiator and target on the same FC port. It is still kind of new and experimental, but it is supposed to work. You can set loader tunable for initiator role, and then enable also target role via ctladm after boot.
 

xx0m3gaxx

Neophyte
Joined
Aug 6, 2015
Messages
6
Every time I try and change it no matter what I seem to set bit to it seems to stay in target mode I cent even get it back into I mode. Changing the value of hint.isp.1.role from 0 to 1 or 2 does not seem to put in any other mode or am I doing something wrong here?
 

mav@

iXsystems
iXsystems
Joined
Sep 29, 2011
Messages
1,120
Setting hint.isp.1.role to 2 should enable initiator mode. You haven't provided enough input to guess what can be wrong, so I don't know. It works for me. Can you tell how exactly are you enabling target mode on port 0? May be the way you do it affects port 1?
 

xx0m3gaxx

Neophyte
Joined
Aug 6, 2015
Messages
6
Have eveything set up as shown in the guide.

Ctl_load YES
Ctladm port -0 on -t fc
Hint.isp.0.role 0
Hint.isp.1.role 0 ( tried setting it to 2)
Ispfw_load YES

Have tried to switch isp.1 value to 2 for init but seems to stay or switch into target mode still.

Still confused a bit on what each thing does, I assumed that isp.0 is the config for port 0 an isp.1 is the config for port 1?
 
Last edited:

mav@

iXsystems
iXsystems
Joined
Sep 29, 2011
Messages
1,120
Have eveything set up as shown in the guide.

Ctl_load YES
Ctladm port -0 on -t fc
Hint.isp.0.role 0
Hint.isp.1.role 0
Ispfw_load YES

Have tried to switch isp.1 value to 2 for init but seems to stay or switch into tags mode still.
The problem is probably that `ctladm port -0 on -t fc` command switches _all_ FC ports to target mode. If you wish only some, you have to replace `-t fc` with `-p X`, where X is a port number from `ctladm portlist` output.

Still confused a bit on what each thing does, I asumed that isp.0 is the config for port 0 an isp.1 is the config for port 1?
Yes, isp.0 is port 0 and isp.1 is port 1. Setting them to zero disables ports for later. `ctladm port -0 on ...` command enabled specified ports for target mode.
 

xx0m3gaxx

Neophyte
Joined
Aug 6, 2015
Messages
6
under tasks>scripts the command setting there seems to change things but seems I have 1 port in init mode now. working on getting the other port into target mode again

under system>tuneables it looks to be the same "command?"(port -0 on -t fc) again I have changed this around but it seems not to do anything?
 

xx0m3gaxx

Neophyte
Joined
Aug 6, 2015
Messages
6
In the guide it says to...

"
Add Script in "Tasks" section
  • Type:command________command:ctladm port -o on -t fc____When:Post Init
"
This seems to have an effect on things, However..

"
4. Add Tunables in "System" section
  • variable:ctladm _______value:port -o on -t fc _type:loader___(bind the ports)?
"
This seems to have no effect on anything if I change this? Wondering if it is needed or if I missed something?

I do have it set up as init/target now thanks to your help also, thank you.
Just trying to better understand some of the things and educate myself on whats going on based on the commands.
 
Top