Fedora DIY FC SAN

That’s pretty much what I figured. I’m going to wipe and try CentOS 8 real quick. If I still get the same issues, I’ll use Fedora 31 I just downloaded. I have a KVM over IP I’m using and it allows me to remote mount images to do this pretty quickly.

1 Like

Turned out CentOS 8 was an even bigger bust. I installed Fedora 31 like you suggested. I had to make some config changes like the /sys/module/qla2xxx/parameters/qlini_mode which showed enabled. Changing it to disabled makes the module not load at boot so I had to make an entry into /etc/modules-load.d/qla2xxx.conf to ensure it’s loaded at boot.

Next, I then tried targetcli again. I got that dreaded error again! @#$#@!!

# targetcli

targetcli shell version 2.1.fb49

Copyright 2011-2013 by Datera, Inc and others.

For help on commands, type 'help'.

/> /qla2xxx info

Fabric module name: qla2xxx

ConfigFS path: /sys/kernel/config/target/qla2xxx

Allowed WWN types: naa

Allowed WWNs list: naa.10008c7cffc58b01, naa.10008c7cffc7dc01, naa.10008c7cffc52801, naa.10008c7cffc7ef01, naa.10008c7cffc58b00, naa.10008c7cffc7dc00, naa.10008c7cffc52800, naa.10008c7cffc7ef00

Fabric module features: acls

Corresponding kernel module: tcm_qla2xxx

/> /qla2xxx create naa.10008c7cffc52801

Could not create Target in configFS

Sorry, but I don’t have a 16Gb HBA to do any testing with.

If you just type qla2xxx create and hit tab… what options does it give you? ( No forward slash)

Also have you read through journalctl for any errors related to the hbas?

Which qlogic model hbas do you have?

It’s weird. Just like that when I do it, the terminal blinks (errors). Hitting return give this:
/> qla2xxx create
Command not found qla2xxx

There’s diddly squat in there. Just audit and ssh hack attempts. I cleared the log, rebooted and then grepped out the file into something less cluttered if it’ll help.

# lspci | grep QLogic
04:00.0 Fibre Channel: Cavium QLogic BR-1860 Fabric Adapter (rev 01)
04:00.1 Fibre Channel: Cavium QLogic BR-1860 Fabric Adapter (rev 01)
41:00.0 Fibre Channel: Cavium QLogic BR-1860 Fabric Adapter (rev 01)
41:00.1 Fibre Channel: Cavium QLogic BR-1860 Fabric Adapter (rev 01)
42:00.0 Fibre Channel: Cavium QLogic BR-1860 Fabric Adapter (rev 01)
42:00.1 Fibre Channel: Cavium QLogic BR-1860 Fabric Adapter (rev 01)
44:00.0 Fibre Channel: Cavium QLogic BR-1860 Fabric Adapter (rev 01)
44:00.1 Fibre Channel: Cavium QLogic BR-1860 Fabric Adapter (rev 01)

I installed targetd and rebooted but came across errors in the log about the root password not being set in the config file. CRITICAL:root:password not set in /etc/target/targetd.yaml I went ahead and populated that but now came across this:

master python3 -s /usr/bin/targetd[1437]: detected unhandled Python exception in '/usr/bin/targetd'
master targetd[1437]: Traceback (most recent call last):
master targetd[1437]: File "/usr/bin/targetd", line 24, in <module>
master targetd[1437]: sys.exit(main())
master targetd[1437]: File "/usr/lib/python3.7/site-packages/targetd/main.py", line 258, in main
master targetd[1437]: load_config(default_config_path)
master targetd[1437]: File "/usr/lib/python3.7/site-packages/targetd/main.py", line 210, in load_config
master targetd[1437]: config[key] = value
master targetd[1437]: TypeError: 'str' object does not support item assignment
master systemd[1]: targetd.service: Main process exited, code=exited, status=1/FAILURE
master systemd[1]: targetd.service: Failed with result 'exit-code'.

Currently using targetd.noarch 0.8.9-1.fc31

If you go through your env vars do you have anything set that pertains to targetcli?

Ohhhhh

The driver module likely doesn’t support this model in Target mode.

The only models I have used for qla2xxx targets, have been QLE25xx models.

If your hba supports iscsi … Try that in target mode?

@SteffanCline
btw… have you tried

#targetcli
/> qla2xxx/ create wwn=naa.xxxxxxxxxx

It says it does. It’s a qle2662

I’ll give that a shot.

Where did you see this?

All of the documentation on the qlogic site.

They’re a Cavium QLogic BR-1860 QLE2662 which is supported from all I’ve read. Here are some details.

# systool -c fc_host -v
Class = "fc_host"

Class Device = "host2"
Class Device path = "/sys/devices/pci0000:00/0000:00:02.0/0000:04:00.0/host2/fc_host/host2"
active_fc4s = "0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 "
dev_loss_tmo = "60"
fabric_name = "0x0"
issue_lip = <store method only>
max_npiv_vports = "255"
maxframe_size = "0 bytes"
node_name = "0x20008c7cffc7ef00"
npiv_vports_inuse = "0"
port_id = "0x000000"
port_name = "0x10008c7cffc7ef00"
port_state = "Linkdown"
port_type = "Unknown"
speed = "unknown"
supported_classes = "Class 3"
supported_fc4s = "0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 "
supported_speeds = "2 Gbit, 4 Gbit, 8 Gbit, 16 Gbit"
symbolic_name = "QLogic-1860-2p | 3.2.25.1 | | | "
tgtid_bind_type = "wwpn (World Wide Port Name)"
uevent =
vport_create = <store method only>
vport_delete = <store method only>

Device = "host2"
Device path = "/sys/devices/pci0000:00/0000:00:02.0/0000:04:00.0/host2"
uevent = "DEVTYPE=scsi_host"

Given up?

I dont have your HBA model, so Im not sure how else I can help.

And the output above that you posted does not show me (maybe I missed it or dont understand it) how it means that this model is supported by the driver module in target mode.

But I do see that it says your port state is “down”

I plan to go and remove those cards and replace them with 4x2564 in the server and 2562s in all the clients/nodes. Since the 16gb 2692s are still out of reach, I can’t afford all those right now. I hope to be able to aggregate/bond those 2x8gb ports per node to get that full 16gb capability. Hopefully tomorrow I’ll make it down there to try it out. Were you able to achieve full bandwidth using two ports?

My pool is still pretty small, and I haven’t done any more perf testing since I upgraded to the 8gb model. Might try to do some soon

Ok, made great progress. Reinstalled Fedora and did all updates. I have the backstores, targets and LUNs set. Now for the ACLs. Do they have to be specific to a particular address or can they be set to a wildcard? On FreeNAS I can literally plug in anything in any one of the ports and it automatically works. I’m figuring there has to be a similar method here too.

1 Like

I’ve never tried using a wildcard.

I set ACLs for luns and client wwns under each target


This is where I am with it at the moment. I tried this
cat /sys/class/fc_host/host*/port_name | sed -e s/0x// -e 's/../&:/g' -e s/:$//
to see if I could spot the address of the one active card plugged in but the only addresses that show up are of the ports themselves. I suppose I can go into the initiator and get it there but this seems like there should be an easier way. Suggestions?

I usually run this on the initiator

find /sys -name port_name | xargs head

Odd. I have a QLE2562 in this initiator. One port is tied to a FreeNAS box and one to this new target. It doesn’t appear to be showing the new target. I don’t have any ACLs set up yet so that might be it.

#find /sys -name port_name | xargs head
==> /sys/devices/pci0000:00/0000:00:03.0/0000:04:00.0/host7/fc_host/host7/port_name <==
0x21000024ff56a8a8

==> /sys/devices/pci0000:00/0000:00:03.0/0000:04:00.1/host8/rport-8:0-0/fc_remote_ports/rport-8:0-0/port_name <==
0x21000024ff6ba2cc

==> /sys/devices/pci0000:00/0000:00:03.0/0000:04:00.1/host8/rport-8:0-0/target8:0:0/fc_transport/target8:0:0/port_name <==
0x21000024ff6ba2cc

==> /sys/devices/pci0000:00/0000:00:03.0/0000:04:00.1/host8/fc_host/host8/port_name <==
0x21000024ff56a8a9

Looks like 0x21000024ff6ba2cc is the FreeNAS box and 0x21000024ff56a8a9/0x21000024ff56a8a8 are the QLE2562.

Is it fair to assume that since the last 3 are on 04:00.1 that they’re on a9 and a8 is connected to the new target?

I’ll do no such things.

haha… Ok. Well, I’ll try that later on. Hopefully once I enter in the ACLs I can then see them show up under /dev on the initiator.

How’s this looking?

From what I can see it looks right but no link up. When I plugged it in before doing the config, there was no link. I’d just assumed it was because I didn’t have the config right but now I’m wondering what it could be. I used a known good jumper so I’m unsure. Suggestions?