Monday, August 18, 2014

Storage Concepts

Storage  -->    1. DAS  --direct connection(Ex. SCSI, SAS etc)
                        2. NAS  --
                       3. SAN 

NAS: 
     Pros: 1. File based storage
                          2. Basic unit of storage is file.
                          3. Platform independent operation
                          4. Lower cost than SAN
    Cons:  1. Performance penality
                               2. High end buisness not suitable

SAN: 
     Blocked based storage
     Pros: 1. High availablity
                          2. High Performance
                          3. Enables sharing across the multiple server
    Cons:        1. High cost

SAN Types:   1.  FC SAN
                       2. FCoCE SAN
                      3.  SCSI SAN
                      4. IP SAN (ISCSI)

Components of FC -SAN:
         1. Nodes, Cables, Connectors, Interconnect devices, SAN management software.
          Node--> Endpoint of source or destination
          Cables--> Copper, FC cables(SR/LR),
          Interconnect devices--> Hubs, Switches and directors

  FC topology:  
              1. AL(Aribitary loop) --> no switch reauiremnet and supports about 126 nodes
              2. SF(Switched fabric)--> 24 bit address and types
                                                         A) N-port
                                                         B)E-Port
                                                        C)F-port
                                                         D)G-port

The simpliest way to interconnect fiberchannel devices is shown below: Just plug an optical cable (may also be a copper connection, depends on the type of fiberchannel interface you have installed) between the two machines you want to talk to each other.
  
  

This is done sometimes when  a large storage array has to be connected to the host wanting to use it exclusively - like a big external hard disk.

You see there's marked "L_port". The fiberchannel interface has to be in an L_port-configuration (Loop Port) - as well as the interface of your storage array on the other end.

In fact this is the simpliest case of an Arbitrated Loop.

Arbitrated Loop.


Arbitrated Loops (ALs) have been used extensively in the early days of fiberchannel networking - nowadays it has disappeared nearly completely - except for this "back-to-back" configuration.

In an arbitrated loop devices are daisy-chained, just like in the early parallel SCSI days - with the exception that you don't need a termination here. The devices are configuring their ports automatically (they arbitrate the loop themselves).

An arbitrated loop fiberchannel network can be connected like this:




Nowadays normally we use a switch fabric network. That's the same thing you do with ethernet networks using switches to connect hosts to the network. In Fiberchannel terminology this is called a Switched Fabric.

Switched Fabric:
 

For a fabric network we need N_ports and F_ports. If you recall ethernet you remember that you needed a twisted cable to be able to connect switches to each other (nowadays most gigabit switch ports are completely autosensing) and with Fiberchannel we have something similar: The ports are not the same. In fact we have 3 primary port types and 2 secondary ones:

    L_port
    This is the port type we need to form an arbitrated loop. L_ports are autoconfigured and need to know the topology of the loop.
    N_port
    This is the node port. Every fiberchannel node (a fiberchannel card, a storage device, a fiberchannel tape, ...) is an N_port as default. You can not connect two N_ports to talk to each other.
    F_port
    This is a port of a fiberchannel switch, it is named a fabric port. You can connect two F_ports together to create an interswitch-link.

The two secondary port types are:

    NL_port
    This is a normal node port which is capable to connect to an arbitrated loop as well - it has loop capability.
    FL_port
    This is a switch port which can emulate a loop port. If a switch port is configured as FL_port, you may use a daisy chain of loop devices on this port.


The fabric configuration has a massive disadvantage however: If the switch on the left fails you won't have any access to the storage device any more. The switch is a single point of failure in this scenario.
Typically you use a redundant configuration when using a switched fabric.


The "red" and "yellow" networks do not see each other. On one fiberchannel interface the hosts sees the red interfaces of the storage devices, the other interface sees the yellow network.
    If one switch breaks, you still have connection.
In this scenario, the host computer will see four storage devices instead of two, because it does not know that two different links lead to the same device. To cover this you need multipathing
    Often you don't want to have devices seeing each other. On Ethernet LANs you can use VLANs to dinstinguish multiple networks and you use trunks to carry multiple networks across the switch structure.
On Fiberchannel this is more or less the same with the difference that the networks are named "Zones" (Cisco tries to rename that to "VSAN" to have something similar to VLAN):


Fiberchannel target / initiator terminology:

Using fiberchannel storage devices there are always two sides of communication (on the protocol layer):

The fiberchannel initiator initiates the connect and requests storage from the storage device. A normal hosts wanting to use a fiberchannel storage device will be the initiator.
The fiberchannel target accepts fiberchannel SCSI commands and executes them - the storage device has to be in target mode.

Terminology:
   A WWPN (world wide port name) is the unique identifier for a fibre channel port where a  WWN (world wide name) the unique identifier for  
    the node itself.
    A good example is a dual port HBA.  There will be two WWPN's (one for each port) and only a single WWN for the card itself.
A WWPN (World Wide Port Name) is physically assigned to a part in a Fibre Channel device, such as a FC HBA or SAN. It is the equivalent of the MAC address in the Ethernet protocol as it is supposed to be a unique identifier in the netwok.
The WWN’s are administred by the IEEE like the MAC Address is. The first few octets are assigned to a manafacturer, the rest is arbitrary.

WWNN--World wide node name --> It is 64 bit unique identifier(Original" IEEE formats are essentially a two-byte header followed by an embedded MAC-48/EUI-48 address (which contains the OUI.) The first 2 bytes are either hex 10:00 or 2x:xx (where the x's are vendor-specified) followed by the 3-byte OUI and 3 bytes for a vendor-specified serial number. )

20 - this is a Node (WWNN)
21 - this is the WWPN of Port 1
22 - this is the WWPN of Port 2