So what is "Storage", As the name suggests it’s about storing something and in our case its Data, we have come this far and talked so much about database servers and data, the servers whether application or Database will never store production data on local disks, there are many reasons for that:
· The local disks or storage, although being redundant but still results in downtime when you want to replace it
· You cannot share a local disk with multiple servers which is a major requirement for creating database clusters such as Oracle RAC
· The local storage has a fixed storage size and cannot scale up
So instead of local disks what do we use, its Network based storage, there are basically 2 types of network-based storage i.e. SAN and NAS, let’s look into them, one by one:
"Storage Area Network" is a network based storage system which ideally consists of Storage controllers, enclosures & SAN Switches,
· Storage controllers handle the compute part for the entire system and handles functions such as:
o Creation of RAIDs (Redundant storage pools)
o Creation of LUNs (logical carving out of storage from the RAID pool for assigning it to the servers)
o Assigning the LUNs to the respective servers based on HBA (Unique storage card numbers of servers) numbers
· Enclosures are just containers which are filled up with hard disks where actually your data resides
· SAN Switches provide connectivity from servers to the storage controllers and are responsible for Zoning (mapping of servers WWN (HBA card identification number) numbers to the storage controller, SAN switches are like normal network switches, but the only difference is that it has Fiber Channel ports and the protocol used is FC
Once you have established the proper connectivity from servers to SAN Switch to Controllers to enclosure and mapped storage LUNs from the storage controller to the respective server, the LUN would actually be visible in the server as a disk which may seem locally attached and from the operating system you may need to initialize and setup the partition format (GPT or Mbr) and accordingly create logical partitions in the disk and start using it
Storage Area Networks (SAN)
So, if you look at the diagram, any Read or Write operation which is originating from the server is sent via the SAN switch to the controller and the controller passes that Read/Write operation to the respective LUN in the storage pool
"Network Attached Storage", if you know how a file server works then understanding NAS is very easy as NAS is nothing but a file server, only difference would be that in a file server, an admin has to login into the file server and manage folders and permissions from within the operating system whereas in a NAS system you would have a direct web based console by which you can directly manage all folders / shares for users from the Web based console, no need to login into the operating system and manage shares in a traditional way
Hardware wise, NAS is similar to a SAN box which has a controller, hard disk enclosures in the backend along with the option of RAID pooling, only difference is that NAS is connected on Ethernet ports via Ethernet Switches to the Ethernet network. Instead of creating LUNs which attach to servers you would be creating shared folders which can be accessed using a user_ID and Password, so on a server the respective folder can be accessed using a particular service account.
Just remember storage from NAS server is no different than file shares which we normally access from our Laptops on a network, It uses the same protocols such as SMB, NFS, S3, etc. to share the folders / file systems
NAS can be used by Servers as well as normal users for accessing shared folders and storing files