Short for 'Storage Area Network', a SAN is a network for block level storage. One or more controllers present logical drives (called LUNs) to one or more hosts through a switched fabric.
Structure of a Storage Area Network
SAN is short for 'Storage Area Network', and is different from 'Network Attached Storage'1 in the protocols used, and to some extent the physical network media2. SANs consist of the following major components:
One or more controllers. A controller is a specialised computer that fronts one or more physical storage arrays and presents a block level interface similar to a disk.
A fabric. A fabric is a network consisting of one ore more switches. SAN media such as Fibre Channel are packet based, switched protocols at layer 2-33, and carry an application level protocol for block or mode page communication.
One or more hosts. A host is a computer that mounts volumes off the SAN controllers. The SAN volumes appear much like local disks to the host, which interacts with the controllers using a block level protocol.
A controller presents volumes through a network address and a Logical Unit Number (LUN), essentially pretending to be one or more disks. Fibre Channel devices have an addressing scheme called 'World Wide Name' (WWN), which is roughly analogous to a MAC address on Ethernet.
LUNs allow a single controller to make multiple volumes available through the same network address. The controller sets up arrays within its pool of attached disks, and volumes can be sliced off one or more of the arrays to be presented as a logical disk, identified through a LUN.
Block Level Protocols
Fibre Channel, iSCSI and FCoE carry a payload that is very similar to the SCSI mode page and block protocols. Fibre Channel uses dedicated hardware (Optical and copper connections are available) and a dedicated layer 2 data link protocol. iSCSI and FCoE use ethernet layers 1 and 2, and iSCSI adds IP at layer 3 with the payload sitting on top of an IP stack.
Fibre Channel offers redundancy right down to the individual disks - a fibre channel disk has two complete F/C interfaces, and a backplane supports two loops. A controller may present an interface through fibre channel, but use different interfaces such as SAS for the disks. Dual-domain SAS disks have two SAS channels, allowing the implementation ofa a similar 'no single point of failure' capability. A proprietary protocol called SSA is also used on IBM hardware.
The redundancy is exposed to the operating system through a facility called 'multipathing'. Multiple host interfaces and switches offering multiple paths to the controllers are exposed to the host, which can route requests over one or more of these paths. This is not transparent in the way that IP routing is, the paths are exposed to the host operating system, which must manage the options for different paths to the controllers.
Other features of SAN controllers
Apart from high availability through redundancy in the architecture, SAN controllers implement intelligence behind the scenes. Some features implemented by various SAN controllers include:
Journalling and consistent snapshot mechanisms: The controller can maintain a journal and a redundant set of mirrored storage. The mirror can be frozen for a backup, allowing the backup to be taken from a consistent view of the data. When the backup is finished the journal can be played forward on the mirror to bring it into sync with the main volume.
Tiered storage: A controller can cache hot data in fast disk or SSD storage with cooler data moving off onto cheaper, slower nearline disks. This can provide better performance over the top of a large amount of realitively cheap (but slow) nearline storage.
Replication: A controller can replicate journalled changes to a remote site, either over a fibre channel link (single-mode fibre can run for several 10's of KM) or a wide area network.
Deduplication and Compression: The controller can compress data, or match data items to a canonical copy through a hashing mechanism. If repeated data is present the controller can save on the redundant storage.
1 Network Attached Storage refers to file server appliances using file level protocols such as NFS or CIFS. Some controllers can do both block and file level protocols.
2 Certain media such as ethernet can carry block and file storage protocols. Fibre Channel can carry IP traffic, but is not normally used for file level protocols such as CIFS.
3 iSCSI tunnels SCSI over IP, which is a layer 3 protocol, whereas FCoE uses the Layer 1 and 2 (physical hardware and ethernet frame format) to transport the SCSI payload.