Once upon a time there was Fibre Channel Utility. Then there was a System Preference pane. But the command line utility, fibreconfig, is the quickest, most verbose way of obtaining information and setting various parameters for your Apple branded cards.
To get started with fibreconfig, it’s easiest to start with just asking the fibreconfig binary to simply display all the information available on the fibre channel environment. This can be done by using the –l option as follows:
Read more for the rest...
Which would result in something similar to the following:
Controllers PortWWN 10:00:00:05:1C:A0:90:1A Port Status: Link Established Speed: Automatic (2 Gigabit) Topology: Automatic (N_Port) Slot: Slot-2 Port: 1 PortWWN 10:00:00: 05:1C:A0:90:1B Port Status: Link Established Speed: Automatic (2 Gigabit) Topology: Automatic (N_Port) Slot: Slot-2 Port: 0 Targets NodeWWN 20:05:00:B0:A1:19:9B:14 Status: Connected LUNs: 0, 1, 2, 3 NodeWWN 20:05:00:B0:A1:20:2A:1A Status: Connected LUNs: 0, 1, 2, 3 NodeWWN 20:05:00:B0:A1:20:9B:14 Status: Connected LUNs: 0, 1, 2, 3 NodeWWN 20:05:00:B0:A1:19:2A:1A Status: Connected LUNs: 0, 1, 2, 3
In the above output, notice that the PortWWN of the card is listed as well as an indication as to whether the port is connected.
Immediately below that are the speed and topology of the card, the only two settings for Controllers that can be customized. When you are changing the setting of a Controller you will need to identify which controller to make a change for by using the –c option followed by the Controller’s PortWWN. This means that each time you make a change, if you want that change to be replicated to both you will need to run the command a second time for the second port.
Available topologies for the card include nport, nlport and auto, with each card set to auto by defualt. Occasionally you will have an issue where you need to set them manually, which can be automated to a number of hosts by sending them a command using the –t option followed by the topology to set. For most Xsan environments you will need to will want to use N Port, also known as point-to-point. To customize the topology you can use the following two commands (one per Controller):
fibreconfig -c 10:00:00:05:1C:A0:90:1A -t nport fibreconfig -c 10:00:00:05:1C:A0:90:1B -t nport
As for speed, you can statically assign that from the command line as well. To do so you would use the –s option followed by the speed to 1gigabit, 2gigabit, 4gigabit and auto. To customize the speed you can use the following two commands (one per Controller):
fibreconfig -c 10:00:00:05:1C:A0:90:1A -s 4gigabit fibreconfig -c 10:00:00:05:1C:A0:90:1A -s 4gigabit
A final setting that can be customized from the command line is the Loop Arbitration Physical Address (aka – the AL_PA). If you are setting this with an Xsan then you might have large issues, long term, but in case you must, to set the AL_PA you can use the –a option followed by an address.
Finally, fibreconfig is very useful to automate reporting with Xsan, especially when used en masse through Apple Remote Desktop. You can use it to display which targets are available to metadata controllers and clients by focusing on the NodeWWN information. This can be incredibly useful in triangulating zoning and RAID controller issues quickly and effectively. Using the following command we will obtain a listing from fibreconfig but constrain the output to NodeWWN items with grep, as follows:
fibreconfig -l | grep NodeWWN
Finally, you can obtain the unique address information from all of your clients concurrently, again using a combination of the fibreconfig command and Apple Remote Desktop. This can be a very useful way to get a list of addresses by node name so that you can label your ports in your fibre channel switch, allow access if you’re LUN masking on a Promise or just document settings. To grab the PortWWN, just send the following command through ARD
fibreconfig -l | grep PortWWN
Overall, there aren’t a lot of settings available in the fibreconfig command. Of the settings that are available, most that are useful in an Xsan environment are also available from the GUI. However, when managing Xsan clients en masse fibreconfig can help to speed up the process of triangulating issues, reporting, setting up RAIDs and fibre channel switch configuration.