Chapter 13: Amazon EBS (Elastic Block Store)
13.1 What and why
Friends, sooner or later every server runs out of disk space — usually at the worst possible time. This chapter teaches you how to handle storage calmly. Mauli Dairy's orders data is also growing every day. Let's first understand what EBS is.
मित्रांनो, कधी ना कधी प्रत्येक सर्व्हरची डिस्क स्पेस संपते — आणि ते पण नेमक्या चुकीच्या वेळी. हा चॅप्टर स्टोरेज शांतपणे कसं सांभाळायचं ते शिकवतो. Mauli Dairy च्या ऑर्डर्सचा डेटा पण रोज वाढतोय. आधी EBS म्हणजे काय ते समजून घेऊया.
दोस्तों, कभी न कभी हर सर्वर की डिस्क स्पेस ख़त्म होती है — और वो भी ठीक गलत समय पर. ये चैप्टर सिखाता है कि स्टोरेज को शांति से कैसे संभालें. Mauli Dairy के ऑर्डर्स का डेटा भी रोज़ बढ़ रहा है. पहले समझते हैं कि EBS क्या है.
Amazon EBS provides block-level storage volumes — virtual hard disks — that you attach to EC2 instances. The root disk of almost every EC2 instance is an EBS volume.
Why EBS?
- Persistent: data survives instance stop/start (unlike instance store, which is lost).
- Flexible: increase size, change type or performance while the volume is in use.
- Durable: automatically replicated within its Availability Zone.
- Backups: point-in-time snapshots stored in Amazon S3 (managed by AWS), copyable across regions.
- Encryption: one tick box (AWS KMS) encrypts data at rest, in transit to the instance and in snapshots.
Availability Zone ap-south-1a
+------------------------------------------------------------+
| EC2 instance |
| ├── /dev/nvme0n1 (root EBS, gp3 8 GiB) → / |
| └── /dev/nvme1n1 (data EBS, gp3 20 GiB) → /data |
+------------------------------------------------------------+
│ snapshot (incremental)
▼
EBS Snapshots (regional, stored in S3) ──► create new volume in ANY AZ of the region
Key rules
- An EBS volume lives in one Availability Zone and can only attach to instances in the same AZ. To move it to another AZ/region, take a snapshot and create a new volume from it.
- Normally one volume attaches to one instance at a time (io1/io2 support Multi-Attach for special clustered workloads).
- You pay for the provisioned size (GiB-month), even if the disk is empty and even while the instance is stopped.
Ravindra Bagale's Tip
Many students create the volume in one AZ while the instance is in another – then the volume never shows up in the attach list. Check the instance's Availability zone before creating a volume. And remember: even an empty disk is billed for its provisioned size.
Ravindra Bagale's Tip – मराठी
खूप students volume एका AZ मध्ये बनवतात आणि instance दुसऱ्या AZ मध्ये असतो – मग attach list मध्ये volume दिसतच नाही. Volume बनवण्याआधी instance चा Availability zone बघा. आणि लक्षात ठेवा: रिकाम्या disk ला पण provisioned size प्रमाणे पैसे लागतात.
Ravindra Bagale's Tip – हिंदी
बहुत students volume एक AZ में बनाते हैं और instance दूसरे AZ में होता है – फिर attach list में volume दिखता ही नहीं. Volume बनाने से पहले instance का Availability zone देखो. और याद रखो: खाली disk के भी provisioned size के हिसाब से पैसे लगते हैं.
Lab
Chala, EC2 → Volumes ughda aani tumchya instance chya root volume cha type, size aani AZ liha. Mag instance chya Storage tab madhe Delete on termination chalu aahe ka te bagha.