Day 25: Expanding and Managing Disk Storage

Опубликовано: 18 Май 2026
на канале: Otter Tech
16
0

💽 Day 25: Expanding and Managing Disk Storage | 100 Days of Cloud (Azure)

Welcome to Day 25 of the 100 Days of Cloud (Azure) series! In this lab, you’ll learn how to resize an existing VM disk and attach a new managed disk for additional storage.

📌 Lab Objective:
Expand the OS disk of an Azure VM and attach a new data disk mounted at a specific location.

🛠️ Task Requirements:

VM Name: nautilus-vm
Expand OS disk: 32Gi → 64Gi
Create new managed disk:
Name: nautilus-disk
Type: Standard HDD (Standard_LRS)
Size: 64Gi

Mount disk at:

/mnt/nautilus-disk

💻 Step-by-Step Solution (Azure CLI):

🔹 1. Get Resource Group

az group list --query "[].name" --output table

🔹 2. Stop the VM (Recommended)

az vm deallocate \
--name nautilus-vm \
--resource-group YOUR_RESOURCE_GROUP

🔹 3. Expand Existing OS Disk

👉 Find OS disk name:

az vm show \
--name nautilus-vm \
--resource-group YOUR_RESOURCE_GROUP \
--query "storageProfile.osDisk.name" \
--output tsv

👉 Resize disk to 64Gi:

az disk update \
--resource-group YOUR_RESOURCE_GROUP \
--name OS_DISK_NAME \
--size-gb 64

🔹 4. Create New Managed Disk

az disk create \
--resource-group YOUR_RESOURCE_GROUP \
--name nautilus-disk \
--size-gb 64 \
--sku Standard_LRS

🔹 5. Attach Disk to VM

az vm disk attach \
--resource-group YOUR_RESOURCE_GROUP \
--vm-name nautilus-vm \
--name nautilus-disk

🔹 6. Start VM

az vm start \
--name nautilus-vm \
--resource-group YOUR_RESOURCE_GROUP

🔹 7. SSH into VM

ssh azureuser@PUBLIC-IP

🔹 8. Identify New Disk

lsblk

👉 Example new disk:

sdc

🔹 9. Create Filesystem

sudo mkfs.ext4 /dev/sdc

🔹 10. Create Mount Point

sudo mkdir -p /mnt/nautilus-disk

🔹 11. Mount Disk

sudo mount /dev/sdc /mnt/nautilus-disk

🔹 12. Verify Mount

df -h

✅ /mnt/nautilus-disk should appear

📚 What You’ll Learn:

Resizing Azure managed disks
Creating and attaching data disks
Linux disk formatting & mounting
Persistent storage management
Azure VM storage administration

🌟 Why This Lab Matters:
Managing storage expansion is a common real-world cloud administration task, especially for growing applications and databases.

🎯 Series: 100 Days of Cloud (Azure)
Keep mastering real-world cloud infrastructure step by step.

🔔 Follow OtterTech for more hands-on labs and practical tutorials!

#Azure #VirtualMachine #Storage #ManagedDisk #CloudComputing #Linux #DevOps #AzureCLI #100DaysOfCloud #OtterTech #Day25