How does SAN provides block access to data?
I was reading about file storage and that lead me to SAN. I read about SAN and that it provides block access to data. I was looking for these concepts in some video, where the guy creates a VM on some cloud platform and attach a block storage of 5 GB from SAN to the virtual machine. Now since SAN provides block access and it means data can be stored in different disks and then blocks are combined when we retrieve it. So does that mean the 5GB storage i mentioned above can be from different disks also?Is it possible to attach a 5GB block storage to the VM and that 5GB storage is actually coming from different disks?Is that how SAN works?
Solution 1:
A pool of disks is called an array. With parity or mirroring mechanisms like RAID, an array can have more performance or durability than one disk alone.
Connecting hosts to send block storage creates a storage network. Commonly Fibre Channel or Ethernet links to arrays. Allows the storage to be located in different hardware chassis from the compute.
A LUN is a logical disk accessed via SAN. An array that presents LUNs can allocate them from any combination of its physical medium. So yes, each can be on different physical drives.
Solution 2:
Block access in SAN means, that VM (or hypervisor) have raw access to storage over network without any file system. It looks like raw local attached storage (DAS). Depending on SAN configuration the data blocks may be stored on:
-
one physical disk (not used in enterprise SAN, but may be configured)
-
hardware/software RAID array of disks on SAN device (most common situation for SAN)
-
multiple SAN devices/servers logically combined in one namespace or virtual LUN (CEPH, VMware vSAN)
Is it possible to attach a 5GB block storage to the VM and that 5GB storage is actually coming from different disks?Is that how SAN works?
Not only SAN works like you have described. NAS operates the similar way. The difference between SAN and NAS is access protocol – block (iSCSI, FC, NVMe-oF) or file (NFS, CIFS). For example, you may have NAS with NFS and store VMs on remote NFS share. Here more about SAN and NAS differences - https://www.hyper-v.io/san-nas-public-cloud-lets-pick-secondary-storage/