[1.8] AWS EBS Mastery: Expanding Storage and Sharing Volumes
![[1.8] AWS EBS Mastery: Expanding Storage and Sharing Volumes](/_next/image?url=https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1748097005379%2F650038ce-b3c6-4a08-8359-499fec031b74.png&w=3840&q=75)
Motivated, teamwork-oriented, and responsible Data Analyst enthusiast with significant experience in increasing comprehension of reports and presentations by the average professional. Highly educated, possessing a bachelor's, and a professional certification in Google data analytics, Standard Machine learning, and statistics.
Imagine we’re renovating our home. We need to expand our kitchen (resizing EBS volumes), build a shared workspace for our family (attaching EBS to multiple instances), and choose the right appliances for each room (selecting EBS volume types). Managing Amazon EBS is just like that - balancing space, access, and performance. Let’s break down how to resize, share, and optimise our cloud storage.
1. Resizing EBS Volumes: Expanding Our Cloud "Home"
When our family grows, we might knock down a wall to add space. Similarly, resizing EBS volumes lets us expand storage for our applications.
Step 1: Modify the Volume (Knock Down the Wall)
AWS Console: Navigate to EC2 > Volumes, select our volume, and click Modify Volume. Increase the size or adjust IOPS/throughput.
Catch: We can’t shrink volumes - once expanded, there’s no going back. Think of it like adding a room; we can’t unbuild it!
Step 2: Resize the File System (Update the Floor Plan)
After expanding the volume, our OS won’t recognise the new space until we resize the file system.
For Linux:
Check partitions: Use
lsblkto see if our volume has partitions (like checking if our new room has doors)Expand partitions: If needed, use
growpart /dev/xvdato stretch the partition.Resize the file system:
Ext4:
sudo resize2fs /dev/xvda1.XFS:
sudo xfs_growfs -d /.
Verify: Run
df -hTto confirm the new space.
Root Volume Tip: Resizing the root volume (where our OS lives) is similar but may require stopping the instance first - like turning off the electricity before rewiring.
2. Sharing Storage: The Family Workspace
Imagine a shared home office where everyone can access the same files. EBS Multi-Attach lets up to 16 EC2 instances share a single volume - but only if they’re in the same Availability Zone.
Rules of the Shared Space
Volume Types: Only Provisioned IOPS SSD (io1/io2) support Multi-Attach. Think of these as premium, collaborative workspaces.
Cluster-Aware File Systems: Use systems like GFS2 or OCFS2 to prevent data chaos. Regular file systems (e.g., EXT4) aren’t designed for concurrent writes.
How to Set It Up
Create an io2 volume: Enable Multi-Attach during creation.
Attach to instances: Link the volume to multiple EC2 instances in the same AZ.
Mount with care: Format the volume with a cluster-aware file system to avoid corruption.
Use Case: Perfect for high-availability databases (e.g., MySQL clusters) where multiple nodes need simultaneous access.
3. EBS Volume Types: Choosing the Right "Appliances"
Just as we’d pick a fridge for the kitchen and a blender for the bar, EBS offers volume types tailored for different workloads.
The EBS Lineup
| Volume Type | Analogy | Best For | Max IOPS/Throughput |
| gp3 (General Purpose) | All-in-one microwave | Everyday workloads (web servers) | 16,000 IOPS, 1,000 MB/s |
| io2 (Provisioned IOPS) | Industrial oven | Databases, multi-attach setups | 256,000 IOPS, 4,000 MB/s |
| st1 (Throughput HDD) | Freight elevator | Big data, logs | 500 MB/s |
| sc1 (Cold HDD) | Attic storage | Rarely accessed archives | 250 MB/s |
Picking the Right Fit
Need speed? Choose io2 for transactional databases.
Budget-friendly? gp3 offers a balance of performance and cost.
Handling logs? st1 provides high throughput at lower costs.
4. Real-World Scenarios: Putting It All Together
Case 1: Scaling a Web App
Resize: Start with a
gp3volume. As traffic grows, expand from 100 GB to 500 GB.Multi-Attach: Add an
io2volume for a shared database, attaching it to three EC2 instances.Optimize: Use
st1for storing user uploads and logs.
Case 2: Disaster Recovery
Take snapshots before resizing volumes.
Use Multi-Attach
io2volumes for failover clusters, ensuring minimal downtime.
Conclusion: Build a Smarter Cloud Home
Managing EBS is like mastering home renovation:
Resize when we need more space.
Share storage wisely with Multi-Attach.
Choose volume types that match our needs.


![[2.1] AWS Building Blocks: AMIs, Target Groups, and Load Balancers](/_next/image?url=https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1748363066238%2Fa6d797d3-2f72-4839-8066-a7ba94def6a2.png&w=3840&q=75)
![[2.0] AWS EBS Snapshot Management: Secure Copies, Encryption, Cleanup, and Instant Recovery](/_next/image?url=https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1748358088149%2Fce267e8f-5e53-4fb5-b72a-65cf6aac969c.png&w=3840&q=75)
![[1.9] AWS EBS Snapshots and Recovery](/_next/image?url=https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1748103085170%2F0e6dbb14-b63d-461d-8234-cf6da4f88051.png&w=3840&q=75)
![[1.7] AWS Networking & Storage: Elastic IP, Block Storage, and EBS Operations](/_next/image?url=https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1747848571162%2F374b1a76-3173-46b9-b864-13167727ff86.png&w=3840&q=75)