Azure Storage Account

Overview


Key Features


Workflow

     +--------------------+
     | User / Application |
     +--------------------+
             |
             v
  +-------------------------+
  |  Azure Storage Account  |
  +-------------------------+
    |      |      |      |
    |      |      |      +---> [ Blob Storage ] (Objects/Files)
    |      |      |
    |      |      +----------> [ File Storage ] (SMB Shares)
    |      |
    |      +-----------------> [ Queue Storage ] (Messaging)
    |
    +------------------------> [ Table Storage ] (NoSQL)
    |
    +------------------------> [ Managed Disks ] (VM Storage)


☁️ Azure Blob Storage Types

In Azure, Blob (Binary Large Object) storage is used to store massive amounts of unstructured data. There are three main types of blobs tailored for different needs.

1. Block Blobs 🧱

Best for: Storing text, binary data, documents, photos, and videos.

2. Append Blobs 📝

Best for: Logging and auditing.

3. Page Blobs 📄

Best for: Random read/write operations and Virtual Machine disks (VHDs).


⚖️ Summary Table: Azure Blobs

FeatureBlock BlobsAppend BlobsPage Blobs
Primary UseGeneral files (Images, Video)Logs, JournalingVM Disks (VHDs)
Data AccessSequentialAppend-onlyRandom Read/Write
Max Size~190.7 TiB~195 GiB8 TiB
Hinglish CoreNormal File storageLock/Register styleVirtual Hard Disk

Common Use Cases


Steps to Manage Storage Account using Azure CLI

1. Login to Azure

az login

2. Create a Resource Group (if not exists)

az group create --name MyResourceGroup --location eastus

3. Create a Storage Account

az storage account create \
  --name mystorageacct123 \
  --resource-group MyResourceGroup \
  --location eastus \
  --sku Standard_LRS \
  --kind StorageV2

4. List Storage Accounts

az storage account list -o table

5. Get Storage Account Keys

az storage account keys list \
  --resource-group MyResourceGroup \
  --account-name mystorageacct123

6. Create a Blob Container

az storage container create \
  --name mycontainer \
  --account-name mystorageacct123

7. Upload a File to Blob

az storage blob upload \
  --container-name mycontainer \
  --file ./localfile.txt \
  --name remotefile.txt \
  --account-name mystorageacct123

8. Download a Blob

az storage blob download \
  --container-name mycontainer \
  --name remotefile.txt \
  --file ./downloadedfile.txt \
  --account-name mystorageacct123

9. Delete Storage Account (Caution!)

az storage account delete --name mystorageacct123 --resource-group MyResourceGroup --yes

Notes