Book Image

Learning Microsoft Azure Storage

By : Mohamed Waly
Book Image

Learning Microsoft Azure Storage

By: Mohamed Waly

Overview of this book

Microsoft Azure Storage is the bedrock of Microsoft's core storage solution offering in Azure. No matter what solution you are building for the cloud, you'll find a compelling use for Azure Storage. This book will help you get up-to-speed quickly on Microsoft Azure Storage by teaching you how to use the different storage services. You will be able to leverage secure design patterns based on real-world scenarios and develop a strong storage foundation for Azure virtual machines. You will start this book with an introduction to Microsoft Azure storage and how it can be used to build large-scale, real-world applications using Azure storage services such as blob, table, queue, and file. This book will also teach you about the different types of Azure Storage. You will then find out the best practices for designing your Azure VM storage, whether it is Windows based or Linux based and how to migrate your storage in different scenarios. You will learn also how to plan and implement your SQL database solution on Azure, and how to build your SQL database in different service models (IaaS/PaaS). Moreover, you will also learn best practices for dealing with Azure Backup, the role of Azure Site Recovery, and the solutions they offer in different scenarios. Finally, you will use StorSimple to unlock the maximum value from all of your data, and some tools that will help you manage your storage on-and off-premise (Azure), such as AzCopy and Storage Explorer. Monitoring your storage in no laughing matter, so you will learn to monitor, diagnose and troubleshoot it.
Table of Contents (9 chapters)

Azure Storage accounts

An Azure Storage account is a secure account that provides access to Azure Storage services (which will be covered in the next chapter), and a unique namespace for storage resources.

During the creation of a new Azure Storage account, you will have the option to choose one of two kinds of storage accounts:

  • General-purpose storage account
  • Blob storage account

General-purpose storage accounts

A general-purpose storage account gives you access to all Azure Storage services, such as Blobs, Tables, Files, and Queues (these will be covered in the next chapter), and has two performance tiers:

  • Standard Storage tier
  • Premium Storage tier

Both were covered within the Performance type topic earlier in this chapter.

Blob storage accounts

Unlike a general-purpose storage account, not all Azure Storage services are meant to be stored in a Blob storage account because they are dedicated to storing unstructured data. Therefore, a Blob storage service is the only type allowed to be accessed by a Blob storage account. However, it only supports block and appends Blobs.

A Blob storage account has a usage pattern called access tiers, which determines how frequently you access your data and based on that you will get billed.

Currently, there are two types:

  • Hot access tier
  • Cool access tier

Hot access tier

With the hot access tier, objects will be accessed more frequently, so you will pay less for data access, but pay more for data size.

Cool access tier

With the cool access tier, objects will be accessed less frequently, so you will pay more for data access, but less for data size.

Azure Storage Account tips

The following tips will increase your knowledge about Azure Storage, and will definitely help you when you want to design a storage solution on Azure:

  • You cannot switch between an Azure general-purpose storage account and an Azure Blob storage account
  • You can switch between access tiers with a Blob storage account, but with the possibility of additional charges being incurred
  • A Blob storage account does not support ZRS replication type at the time of writing
  • Premium Storage only supports Locally Redundant Storage as a replication type at the time of writing
  • Premium Storage is not supported for a Blob storage account at the time of writing
  • Azure supports up to 200 storage accounts per subscription by default
  • A storage account can store data up to 500 TB
  • Azure Storage supports encryption for only two storage services at the time of writing (Blobs and Files), and you can enable it during the storage account creation
  • If you are using REST APIs to connect to Azure Storage, you can secure the transfer by enabling that option during the creation of a storage account
  • Only lowercase letters and numbers are supported for the name of the storage account

Creating an Azure Storage account

Let's get our hands dirty with creating a storage account with the following parameters:

  • Name: packtpubsa
  • Deployment model: Resource Manager
  • Account kind: General purpose
  • Performance: Standard
  • Replication: Locally-redundant storage (LRS)
  • Storage service encryption (blobs and files): Disabled
  • Secure transfer required: Disabled
  • Subscription: Select the right subscription for this task
  • Resource group: Create a new or select an existing resource group, as per your needs
  • Location: Select the nearest location to you

Without further ado, let’s get started:

  1. Open the Azure portal from here:
  1. Click on More services and a new blade will open. In the search bar, write storage account, as shown in the following screenshot:
Figure 1.5: Searching for a storage accounts service
  1. Click on Storage accounts and a new blade will open. Click on Add, as shown in the following screenshot:
Figure 1.6: Adding a new storage account
  1. A new blade will open, wherein you need to fill in the fields and determine the types as per your needs:
Figure 1.7: Creating a new storage account blade
  1. Fill in the fields as before, and click on Create:
Figure 1.8: Filling in the fields of the blade
  1. Once done, you can find your storage account in the Storage accounts blade:
Figure 1.9: Storage accounts blade

Something to keep in mind:

  • When using Storage service encryption (blobs and files), your data is encrypted once it is written in Azure and gets decrypted once you try to access it.
  • When you enable Secure transfer required, the storage account will only be accessed using HTTPS if you are using REST APIs, and since Azure file service uses Server Message Block (SMB), the connection will fail if you are using SMB 2.1 and SMB 3.0 without encryption, and the same goes for the Linux SMB client in some flavors.
  • When you enable Secure transfer required, you will not be able to use a custom domain, because Azure Storage does not currently support that. As a result, you can only use the default domain.