SAN Storage area network questions

Cooky

Golden Member
Apr 2, 2002
1,408
0
76
Our SAN is handled by a different team, so while I don't have much practical experience w/ SAN, I do have a few questions:

1. I know SAN needs to be lossless, but exactly what happens when a frame/packet is dropped?

My team manages the DWDM infrastructure, which carries some of the SAN traffic between datacenters.
Once in a while there's an issue w/ one leg of the dark fiber, and we'd need to shut down that portion of the ring.
All the SAN traffic in flight would be dropped.
What are the negative impacts when this happens?
==========

2. Some servers have FC HBA's w/ two ports.
One goes to SAN-A, and one goes to SAN-B.
How does a server know which port to use?
Is it determined by the OS, or HBA driver, similar to active-standby NIC team in the ethernet world?

TIA
 

ch33zw1z

Lifer
Nov 4, 2004
39,794
20,383
146
Look up Fiber Channel Protocol. It's similar to ethernet but not exactly.

Then lookup Multipath IO

Much of what you're asking depends on configuration. There are some guys on here that will explain it better than me. But those two terms will get you started.
 

Cooky

Golden Member
Apr 2, 2002
1,408
0
76
Thanks for the reply, but I'm still not getting the answers I was looking for.

Any SAN engineers here that want to chime in?
 

imagoon

Diamond Member
Feb 19, 2003
5,199
0
0
Lost packets will cause a retransmit, be sent down an alternate path, or be lost. Nearly all of the [switched] SAN techs out there now use WWN which is just an identifier to register on the HBA. From there it is up to the software on the server (HBA side) and the software / hardware on the SAN. Some SANs only support Active/Passive paths so when a preferred path fails, the non preferred path can be lit up and take over operations. This switch is handled on the HBA and the SAN reacts to the change. Passive paths normally are degraded for various reasons I can go in to if you want to more. Others SAN devices can support multiple paths per controller (think 4 1gig or 2 10gige ports per controller.) Some go farther and can do that with Active/Active configurations where all paths and all controllers can participate in IO. It also can be some option in the middle (like 2 active controllers, 2 active and 2 passive paths on each controller etc etc.) A bit further along is protocols like ALUA that allow the SAN to tell the server which paths are better than others for traffic.

So generally.... if you have real MPIO, there will be a hiccup when you unplug that fiber, in flight frames will be retransmitted down the alternate path. What happens on the SAN varies, you might get a degraded path alert (nonoptimal path alert) or you might just get an alert about a failed path and everything keeps on trucking.
 
Feb 25, 2011
16,994
1,622
126
Our SAN is handled by a different team, so while I don't have much practical experience w/ SAN, I do have a few questions:

1. I know SAN needs to be lossless, but exactly what happens when a frame/packet is dropped?

Specifics depend on the protocol used, but afaik all protocols will verify receipts and reattempt if there's a problem.

My team manages the DWDM infrastructure, which carries some of the SAN traffic between datacenters.
Once in a while there's an issue w/ one leg of the dark fiber, and we'd need to shut down that portion of the ring.
All the SAN traffic in flight would be dropped.
What are the negative impacts when this happens?
==========
Lag, mostly. The SANs I'm familiar with all use iSCSI replication for SAN->SAN DR. So TCP/IP handled send/ack stuff, resends the missing bits, etc. The SANs also talk to each other and make sure that everything is up to date. So the net result, if everything is working the way it's supposed to be, is-

is-

is-

is-

is-

is not much of anything at all. At least from an end user perspective. Our SANs don't even notice/alert/log brief outages from things like switch reboots.

Your SAN admins will probably be able to tell you specifics re: failover timer settings, that sort of thing. And they'll be able to tell you what replication protocol they're running.

2. Some servers have FC HBA's w/ two ports.
One goes to SAN-A, and one goes to SAN-B.
How does a server know which port to use?
Is it determined by the OS, or HBA driver, similar to active-standby NIC team in the ethernet world?

TIA
Are SAN A and SAN B really different SANs? Or is it a dual-controller system? Because the answer is slightly different depending.

Basically, fiber devices have something called World Wide Names (like a MAC address for Ethernet.)

A SAN controller will map a volume to a specific WWN, and say to that WWN, "This is your LUN." If there's a switch involved, than those WWNs are set up into different zones. (A zone is sort of like a VLAN, except the same WWN can be in multiple zones.) Zones are used both to manage traffic, and for access control.

You could certainly have a server plugged into to completely different SANs and accessing LUNs on both.

In a dual-controller setup, both controllers have access to the same disk enclosures, and know about all of the volumes that the other controller is serving up, and to whom. When the other controller goes down, the remaining controller spends a few seconds (60 is default for our gear) mourning the loss of its friend, before taking control and restoring access to LUNs that were being managed by the other controller. But that also means that both controllers need to have a path to the server!

Either way: the HBA on the server will then present the LUN to the server OS as though it were a local volume. The problem is that the HBA is stupid. It gets the "This is your LUN" message from the SAN controller, but it'll get a copy for each possible path (multipathing) to the SAN over the fabric. And it passes all that to the OS.

So an MPIO capable OSes will do some magic to keep track of which paths go to which LUNs, which paths go to the same LUNs, and which it's going to use. FreeBSD (gmultipath) does it by putting a little code at the very end of the disk. Other OSes may do it differently, iDunno, but it works.

The server can use multiple paths in either an active/active or an active/passive arrangement, depending on how you want to configure it.

If you are running an OS that is NOT MPIO-capable, then you do some tricks with the SAN controller or the fiber zoning to make sure the server only sees a single path.

But that's a bad idea, because there'd be no failover. So what you'd REALLY do, probably, is make an ESX host and virtualize your non-MPIO OS. VMWare can pass through raw LUNs (Raw Device Mapping, or RDM) to a specified Guest VM, and the host handles the multipathing.
 
Last edited:

Cooky

Golden Member
Apr 2, 2002
1,408
0
76
Thank you all for the detailed explanation.
The consensus is if a packet is dropped in SAN, it'll be re-transmitted.
It sounds very similar to TCP in the ethernet world.

So why is it a bigger deal in the SAN world?
Why emphasize on building a LOSSLESS network, when dropped packets would just be re-sent?
Does someone have a real world example?
Like corruption in a database, or something more severe than slow page loading in a browser?
 

kevnich2

Platinum Member
Apr 10, 2004
2,465
8
76
Atleast for iscsi SAN designs, it uses TCP/IP for the transport so it's just like any other ethernet frame and would be re-transmitted if there's no reply. On my ISCSI, mine are in active-active config and if I unplug a cable or take down one of the switches, everything keeps rolling like nothing ever happened. Gives me lots of redundancy.
 

imagoon

Diamond Member
Feb 19, 2003
5,199
0
0
Resends = latency. Enough resends can choke the pipe enough that eventually the HBA on the server issues a failure can cause a new path election / changes etc etc. On a single path only server that failure would be viewed as a Disk failure similar to when an HDD fails and just "falls offline." It varies but generally all the options are not that great.
 

imagoon

Diamond Member
Feb 19, 2003
5,199
0
0
Atleast for iscsi SAN designs, it uses TCP/IP for the transport so it's just like any other ethernet frame and would be re-transmitted if there's no reply. On my ISCSI, mine are in active-active config and if I unplug a cable or take down one of the switches, everything keeps rolling like nothing ever happened. Gives me lots of redundancy.

[Cooky,] This is what is supposed to happen. You still have a "blip" but the delay is normally in the ms and the path switch is typically sub 30ms and the retransmit is sub 50ms so the systems keep trucking without issue. Performance might be reduced though. I mean if you have 4 1gig paths and round robin on them, when one fails you know only have 3gb to work with. If the SAN is pushing 3.5gbps all the time that can be a real issue.
 
Feb 25, 2011
16,994
1,622
126
So why is it a bigger deal in the SAN world?
Why emphasize on building a LOSSLESS network, when dropped packets would just be re-sent?
Does someone have a real world example?
Like corruption in a database, or something more severe than slow page loading in a browser?

Performance, performance, performance, performance.

You don't spend six+ figures on a SAN for a single application; these things host gobs of stuff. So if you have a performance "blip" your entire organization is effected, from "page loading in a browser" type stuff to core revenue-generating functions.

Imagine if, say, Wal-Mart's transaction database started lagging. Eventually, that backlog would build up, until transactions started timing out and having to be re-rung, which adds to the load. In the meantime, everybody in line at the checkout counter is even angrier.

Sure, everybody gets their stuff, and walmart gets their money, but the world is a worse place.
 

yinan

Golden Member
Jan 12, 2007
1,801
2
71
Performance, performance, performance, performance.

You don't spend six+ figures on a SAN for a single application; these things host gobs of stuff. So if you have a performance "blip" your entire organization is effected, from "page loading in a browser" type stuff to core revenue-generating functions.

Imagine if, say, Wal-Mart's transaction database started lagging. Eventually, that backlog would build up, until transactions started timing out and having to be re-rung, which adds to the load. In the meantime, everybody in line at the checkout counter is even angrier.

Sure, everybody gets their stuff, and walmart gets their money, but the world is a worse place.
The less money WalMart gets the better.