Managing AWS EBS Volumes on EC2 Instances
If I had to relearn Linux for observability…
I would master AWS EBS volume management early —
because in the cloud, storage problems = production incidents.
✅ Expand observability storage without stopping the server
✅ Add separate volumes for logs, metrics, and data
✅ Protect workloads during scale-outs and backups
✅ Restore services faster when disk fills up
🛠️ What is an EBS Volume?
✅ It’s your cloud "disk" that persists even if the instance reboots!
🔧 How to Manage EBS Volumes on EC2 (Step-by-Step)
1️⃣ Create an EBS Volume
✅ Go to AWS Console ➔ EC2 ➔ Elastic Block Store ➔ Volumes ➔ Create Volume
2️⃣ Attach EBS Volume to EC2 Instance
✅ After creating the volume:
Example: It appears as /dev/xvdf, /dev/sdf, etc.
3️⃣ Connect to Your EC2 Instance
ssh -i mykey.pem ec2-user@<public-ip>
✅ You must SSH into the instance to work with the volume.
4️⃣ Prepare the Volume
Check if the volume is detected:
lsblk
You should see a new device, e.g., /dev/xvdf.
✅ If it's a brand new volume (blank), you must format it:
Recommended by LinkedIn
sudo mkfs.ext4 /dev/xvdf
✅ If you attached an existing volume with data, skip formatting!
5️⃣ Mount the Volume
sudo mkdir /mnt/data
sudo mount /dev/xvdf /mnt/data
✅ Now /mnt/data contains the volume’s filesystem.
6️⃣ Make Mount Permanent (Auto-Mount on Reboot)
Edit /etc/fstab:
Get UUID first:
sudo blkid /dev/xvdf
Example fstab entry:
UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx /mnt/data ext4 defaults,nofail 0 2
✅ Always use UUID instead of device name to avoid issues after reboot!
7️⃣ Expand an Existing EBS Volume
✅ If you run out of space:
lsblk # check updated size
sudo growpart /dev/xvdf 1
sudo resize2fs /dev/xvdf
✅ Now the filesystem knows about the extra space!
Simple Analogy
Managing AWS EBS Volumes is like managing external hard drives for your laptop 🧳:
✅ In AWS, you plug, unplug, resize drives —
without shutting down the machine!
🗺️ Where Are We in the Linux Journey?
Physical Disks → Logical Volumes → Cloud Storage (EBS) → Dynamic Observability Scaling
✅ You now understand how storage works not just in Linux, but inside the cloud too.