Where is my mind

Just can’t stop listening that. For the last two days I’ve been spining this song all over and over again. Brilliant and truly talented lad.

Brocade and Qlogic (SANbox2) switches in one fabric

Below is a quick guide about how to merge Brocade and Qlogic (SANbox2) switches together. I understand, that a more intellegent approach would be to stay away from mixing different vendors in a SAN environment but at times we live with what we’ve been given. As always in our life, there is a trade-off one will have to pay: since in the latest Brocade firmware (6.x) the interoperability mode 1 has been depricated thus you won’t be able to plug a new Brocade switch into a fabric built on Qlogic hardware. Another, and a more serious, issue is that with 6.x I was unable to propogate zone changes from Brocade in native mode to Qlogic switch which was set to interopmode 1. The only way to do that was to swipe out zone’s configuration completely from the Qlogic switch and recreate an ISL. If this a show-stopper then refrain from upgrading your Borcade switch and stay with 5.x firmware version.

Our initial state looked like this (port 3 was plugged to Qlogic):

swd77:admin> switchshow
switchName:     swd77
switchType:     34.0
switchState:    Online   
switchMode:     Interop
switchRole:     Principal
switchDomain:   97 (unconfirmed)
switchId:       fffc61
switchWwn:      10:00:00:05:1e:02:a1:3c
zoning:         OFF
switchBeacon:   OFF

Area Port Media Speed State            Proto
  0   0   id    N2   Online           F-Port  50:05:08:b3:00:92:59:91
  1   1   id    N4   No_Light         
  2   2   id    N2   Online           F-Port  50:06:0b:00:00:38:fd:42
  3   3   id    N2   In_Sync          
  4   4   id    N2   Online           F-Port  50:05:08:b3:00:92:59:99
  5   5   id    N4   No_Light         
  6   6   id    N2   Online           F-Port  50:06:0b:00:00:38:fb:a2
  7   7   id    N4   No_Light         
  8   8   --    N4   No_Module        
  9   9   --    N4   No_Module        
 10  10   --    N4   No_Module        
 11  11   --    N4   No_Module        
 12  12   --    N4   No_Module        
 13  13   --    N4   No_Module        
 14  14   --    N4   No_Module        
 15  15   --    N4   No_Module     

swd77:admin> islshow
No ISL found
swd77:admin> cfgshow
Defined configuration:
 cfg:   default all_wwns
 zone:  all_wwns
                50:05:08:b3:00:92:59:91; 50:06:0b:00:00:38:fd:42; 
                50:05:08:b3:00:92:59:99; 50:06:0b:00:00:38:fb:a2

Effective configuration:
 no configuration in effect

swd77:admin> portcfgshow 3
Area Number:              3
Speed Level:              AUTO
Trunk Port                ON
Long Distance             OFF
VC Link Init              OFF
Locked L_Port             OFF
Locked G_Port             OFF
Disabled E_Port           OFF
ISL R_RDY Mode            OFF
RSCN Suppressed           OFF
Persistent Disable        OFF
NPIV capability           ON

The switches were connected through ports 3 and 0 on the Borcade’s and Qlogic’s sides repsectively and as you’ve already noticed port 3 was in sate “In_Sync”, which is a synonymous for “Bad”. The only way to recover from this state was a manual intervention and forcebly configuring port 3 as a G_Port.

swd77:admin> portcfggport 3,1

Only after doing that, an active ISL link was brought on-line:

swd77:admin> islshow
  1:  3->  0 10:00:00:c0:dd:02:cb:fa  98                 sp:  2.000G bw:  2.000G 

swd77:admin> fabricshow
Switch ID   Worldwide Name           Enet IP Addr    FC IP Addr      Name
 97: fffc61 10:00:00:05:1e:02:a1:3c        >"swd77"
 98: fffc62 10:00:00:c0:dd:02:cb:fa         "SANbox2-8"

So manually configuring port 3 on my brocade switch as a G_Port was the main trick that actually made everything spinning. Keep that in mind and have fun!

Posted in: SAN |

Hylafax game

Bellow is my short summary of how I was configuring a Hyalafax server on Ubuntu 10.04. The end result which I was striving to achieve was a fax server that could act both as a fax2email and an email2fax gateway.

Installing and configuring Hylafax server with a proven hardware is easy and surely not a rocket since at all. My advice, try to avoid as much as you can any kind of softmodem (winmodem) equipment and stick to hardware based one, that would save you a huge amount of time and your brain nerve cells as well. I’ve learned that hardway myself since I had no option but to use several of them myself (Intel536ep, Intel537, Lucent, Conexant HSF) and in my case only intel536ep delivered an acceptable level of stability. But in general all softmodems suck!

Back to our story. As I’ve already mention, the installation process is really easy in itself and reminds me the times when I had to install a Windows application: next, next, next, … , finish. Just double check that your modem has been identified and is active by using minicom or cu tools. Try to enter several AT commands, .e.g. ATZ, AT+FCLASS=1, etc. Here is a list of other AT commands you could find useful.

To setup a fax to email gateway is also a no brainer and is just a matter of adding a few lines into /etc/hylafax/FaxDispatch file:

FILETYPE="tiff pdf"

With these settings Hylafax would send fax in tiff and pdf formats to email@address1 and if you want the fax to be emailed to more than one address then just add another SENDTO1, SENDTO2, SENDTO3, etc. line/lines. Sometimes, tiff and pdf are not enough and you’d like to have a jpeg version of a fax but Hylafax doesn’t support that out-of-box. So I had to come up with a simple patch that would convert an incoming fax into jpeg and if it’s a multipage then a zip archive will be created with all pages inside. This patch was created against Hylafax server version 6.0.3 and could be download from here. After you apply this pach update FILETYPE and add jpeg or jpg as another option. Just a reminder, before applying the patch make a backup copy of your original common-functions file.

Setting an email to fax gateway is not harder and I will show how easy to do that with Postfix.

  • Edit /etc/postfix/main.cf and add another transport map:
  • transport_maps = hash:/etc/postfix/transport
    fax_destination_limit = 1
  • Add a new transport destination in /etc/postfix/transport. In this example all email to @fax.your_hostname.org will be redirected to fax process.
  • fax.your_hostname.org fax:localhost
  • Finaly, update /etc/postfix/master.conf and add fax’s definition:
fax    unix    -    n    n    -    1    pipe    flags=    user=faxmaster    argv=/usr/bin/faxmail -d -n -N -T ${user}

In the end, I’d like to mention a very uselfull Hylafax’s option called jobcontrol that gives you the ability to customise outgoing jobs, i.e. have a different LocalIdentifier depending on a recipient or a sender. Just follow this link to get a better idea and take a look at different examples.

Happy faxing.