Ravindra BagaleCourses & study guides

Chapter 13: Amazon EBS (Elastic Block Store)

Practice Questions and Lab Exercises

  1. What is EBS? How is it different from instance store?
  2. Compare gp3, gp2, io2, st1 and sc1 volume types with one use case each. Which cannot be used as boot volumes?
  3. What is an incremental snapshot? How do you move an EBS volume to another AZ?
  4. Why do device names differ between the console (/dev/sdf) and Linux (/dev/nvme1n1)?
  5. List the commands to grow an XFS root volume and an ext4 root volume after modifying the size.
  6. Why do we use UUID and nofail in /etc/fstab? How do you test fstab before rebooting?
  7. Lab: Increase your root volume from 8 GiB to 12 GiB on a running Amazon Linux 2023 instance and verify with df -hT.
  8. Lab: Repeat on Ubuntu (ext4) using resize2fs.
  9. Lab: Create a 5 GiB gp3 volume, attach, format as XFS, mount at /data with a permanent fstab entry, reboot and verify.
  10. 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!).
  11. Lab: Detach the volume safely and delete it.

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/sdf appears as /dev/nvme1n1; use UUIDs.
  • Grow: console Modify volume → growpart /dev/nvme0n1 1 → xfs_growfs -d / (XFS) or resize2fs /dev/nvme0n1p1 (ext4) → df -hT.
  • Add: create in same AZ → attach → lsblk → file -s → mkfs → mkdir → mount → fstab UUID=... /data xfs defaults,nofail 0 2 → mount -a.
  • Detach: stop users → umount → remove fstab line → detach in console.