Chapter 13: Amazon EBS (Elastic Block Store)
Practice Questions and Lab Exercises
Come on, now practice! Take a snapshot before every lab, and at the end delete the volumes you used.
चला, आता प्रॅक्टिस! प्रत्येक लॅबच्या आधी स्नॅपशॉट घ्या, आणि शेवटी वापरलेले व्हॉल्यूम्स डिलीट करा.
चलो, अब प्रैक्टिस! हर लैब से पहले स्नैपशॉट लो, और आख़िर में इस्तेमाल किए वॉल्यूम्स डिलीट करो.
- What is EBS? How is it different from instance store?
- Compare gp3, gp2, io2, st1 and sc1 volume types with one use case each. Which cannot be used as boot volumes?
- What is an incremental snapshot? How do you move an EBS volume to another AZ?
- Why do device names differ between the console (
/dev/sdf) and Linux (/dev/nvme1n1)? - List the commands to grow an XFS root volume and an ext4 root volume after modifying the size.
- Why do we use UUID and
nofailin/etc/fstab? How do you test fstab before rebooting? - Lab: Increase your root volume from 8 GiB to 12 GiB on a running Amazon Linux 2023 instance and verify with
df -hT. - Lab: Repeat on Ubuntu (ext4) using
resize2fs. - Lab: Create a 5 GiB gp3 volume, attach, format as XFS, mount at
/datawith a permanent fstab entry, reboot and verify. - Lab: Take a snapshot of the data volume, create a new volume from it in another AZ, attach it to another instance and read your file (do not run
mkfs!). - Lab: Detach the volume safely and delete it.
Got it? EBS is EC2's disk – in one AZ, protected by snapshots, and in fstab with UUID and nofail. Now let's move on to EC2 operations – Elastic IP, AMI and scaling.
समजलं का? EBS म्हणजे EC2 ची डिस्क – एका AZ मध्ये, स्नॅपशॉटने सुरक्षित, आणि fstab मध्ये UUID आणि nofail. आता पुढे जाऊया EC2 ऑपरेशन्सकडे – Elastic IP, AMI आणि स्केलिंग.
समझ आया? EBS मतलब EC2 की डिस्क – एक AZ में, स्नैपशॉट से सुरक्षित, और fstab में UUID और nofail. अब आगे चलते हैं EC2 ऑपरेशन्स की तरफ़ – Elastic IP, AMI और स्केलिंग.
Quick Revision
- EBS = persistent network block storage in one AZ; snapshots are regional & incremental.
- Types: gp3 (default SSD, 3,000 IOPS baseline), gp2 (older, size-based IOPS), io2 (provisioned high IOPS), st1 (throughput HDD), sc1 (cold HDD).
- Nitro:
/dev/sdfappears as/dev/nvme1n1; use UUIDs. - Grow: console Modify volume →
growpart /dev/nvme0n1 1→xfs_growfs -d /(XFS) orresize2fs /dev/nvme0n1p1(ext4) →df -hT. - Add: create in same AZ → attach →
lsblk→file -s→mkfs→mkdir→mount→ fstabUUID=... /data xfs defaults,nofail 0 2→mount -a. - Detach: stop users →
umount→ remove fstab line → detach in console.