Chapter 13: Amazon EBS (Elastic Block Store)
Hello friends! This chapter explains EBS volumes, storage layers, snapshots, performance and recovery using a fictional workshop application. The expanded overview includes offline identity and capacity exercises. Before any real storage change, identify the correct resource, inspect its existing data and follow the procedure appropriate to its actual layout.
नमस्कार मित्रांनो! कधी ना कधी प्रत्येक सर्व्हरची डिस्क भरते – आणि ते पण चुकीच्या वेळी. या चॅप्टरमध्ये आपण स्टोरेज शांतपणे सांभाळायला शिकू: व्हॉल्यूम टाइप्स, स्नॅपशॉट्स, डिस्क वाढवणं, नवीन डिस्क जोडणं आणि सेफ डिटॅच. उदाहरण: Amul-style dairy (सॅम्पल डेटा, सरावासाठी) च्या सर्व्हरवर ऑर्डर्सचा डेटा रोज वाढतोय. प्रत्येक कमांड माझ्यासोबत करा, आणि mkfs चालवण्याआधी दोन वेळा विचार करा.
नमस्ते दोस्तों! कभी न कभी हर सर्वर की डिस्क भर जाती है – और वो भी गलत समय पर. इस चैप्टर में हम स्टोरेज को शांति से संभालना सीखेंगे: वॉल्यूम टाइप्स, स्नैपशॉट्स, डिस्क बढ़ाना, नई डिस्क जोड़ना और सेफ़ डिटैच. उदाहरण: Amul-style dairy (सैंपल डेटा, सिर्फ़ अभ्यास के लिए) के सर्वर पर ऑर्डर्स का डेटा रोज़ बढ़ रहा है. हर कमांड मेरे साथ करो, और mkfs चलाने से पहले दो बार सोचो.
In this chapter
- EBS purpose and behavior
- Volume types: gp3 to sc1
- Snapshots
- NVMe device names
- Growing a volume live
- Adding a new data disk
- fstab with UUID and nofail
- Detaching safely
Concepts in this chapter
- 13.1What and why
- 13.2EBS volume types
- 13.3Snapshots
- 13.4NVMe device naming (important!)
- 13.5Increasing the size of a volume (root or data)
- 13.6Adding a new EBS volume
- 13.7Detaching a volume safely
- 13.8EBS best practices
Review and practice
Connect the application path to the correct volume
Read all steps
- AWS volume
Identify the intended EBS volume and attachment. Capacity and placement belong to this resource; a device path copied from a tutorial does not establish its identity.
- Guest storage layers
Map the resource to the actual guest device, then inspect any partition or logical-volume layers and the filesystem. Growing the outer layer does not prove the inner layers changed.
- Mount and application
Confirm that the expected filesystem supplies the application directory. An existing directory without its required mount can lead the application to write to different storage.
- Recovery evidence
Choose a suitable recovery point and usable key access, identify the restored volume and verify application records. A snapshot resource alone is not a completed recovery rehearsal.
1. Keep the workshop records beyond one running process
A college's registration application runs on an EC2 instance. During the day it accepts workshop choices and stores the results. At night an administrator restarts the application to install an update. Students expect the saved registrations to remain. They also expect recovery if a machine fails or a file is accidentally damaged. These expectations lead to several separate questions: where is the authoritative data stored, which events preserve it, and how can a correct earlier state be recovered?
Amazon Elastic Block Store, usually shortened to EBS, provides block storage used with EC2. An EBS volume is a storage resource that an instance can access as a block device. The operating system or an application organizes information on that device. From inside Linux, it can resemble an attached disk, but its resource identity, placement, performance settings, encryption and lifecycle are managed through AWS.
Persistent does not mean impossible to lose. EBS storage can outlive an ordinary process restart or instance stop, but deletion settings and deliberate resource actions still matter. An application can overwrite a valid record on a perfectly functioning volume. A user with sufficient access can delete resources. A backup policy and a recovery procedure therefore remain necessary even when the storage service provides durability mechanisms.
For the workshop system, distinguish application files from registration data and temporary work. A deployment can replace code without needing to replace saved registrations. Temporary export files might be recreated, while the only copy of a registration cannot. This classification helps you choose storage, plan backups and understand the consequences of stopping, terminating or replacing an instance. The required behavior should be explicit rather than inferred from a folder name.
This overview teaches the relationship between AWS storage resources and the layers visible inside Linux. Its practical exercises use supplied fictional inventories and offline calculations. They do not create AWS resources or format, mount or delete disks. Learn to identify the intended volume and explain the planned change before using the detailed operational procedures in individual lessons.
2. Separate volume, partition, filesystem and mount point
A volume is the block-storage device presented to the instance. A partition is a defined region within a device, when a partition table is used. A filesystem organizes files, directories and metadata on a partition or sometimes directly on the device. A mount makes that filesystem accessible at a location in the operating system's directory tree. These are related concepts, but they are not interchangeable names for the same object.
Imagine a fictional data volume with 40 GiB of capacity. It contains one data partition occupying most of the device, with an ext4 filesystem mounted at the workshop data directory. The application opens a database file through that directory. Linux translates the application's file operations into operations on the filesystem and underlying storage. The application normally uses the pathname; the administrator must understand which mounted filesystem actually supplies that pathname.
Some volumes contain a filesystem directly without a partition. Others use several partitions or a logical-volume manager that adds further layers. Do not assume every disk has partition number one, or that every additional volume follows the root volume's layout. Inspect the actual structure and use a procedure that matches it. A command appropriate for a partitioned ext4 filesystem may be wrong for a whole-device XFS filesystem or a logical volume.
Capacity at one layer can differ from capacity at another. The volume might be larger than its partition after a resize. The filesystem can be smaller than the partition if it has not been extended. Filesystem metadata, reserved space and units also affect reported usable capacity. The filesystem's available space is different again because existing files already occupy part of it. Comparing two numbers without identifying their layers can produce a false diagnosis.
A mount point is a directory location, not the storage resource itself. If the expected filesystem is not mounted, that directory may still exist on the parent filesystem. An application that starts anyway might write new files into the wrong underlying storage. Later mounting the intended filesystem can hide those files from the same pathname without deleting them. This is one reason to verify required mounts before starting an application and to investigate an apparently empty directory carefully.
Creating a filesystem writes filesystem structures to the selected device. It is a preparation step for an appropriately identified empty target, not a repair command to run whenever files are missing. A volume restored from a snapshot can already contain a filesystem and useful data. Formatting it would replace critical structures. Before any write operation, verify the resource identity, contents, backups and expected lifecycle using the procedure appropriate to that task.
| Layer | Question | Example evidence |
|---|---|---|
| AWS volume | Which resource, zone and configured capacity? | Volume ID and AWS attachment record |
| Linux block device | Which guest device represents that resource? | Device inventory and NVMe serial mapping |
| Partition or logical volume | Which region is assigned to the data? | Inspected partition or logical-volume layout |
| Filesystem | Which structure organizes the files? | Filesystem type, UUID and reported capacity |
| Mount and application | Which storage serves the application's path? | Mount source and a verified application read |
3. Choose block, file, object or temporary storage deliberately
EBS supplies block storage. It is useful when software expects disk-like access, such as an operating-system volume or database files managed by a database engine. It does not by itself provide a shared directory protocol or an object API. You choose or operate the layers above the device, including filesystems, application access and backup consistency.
EC2 instance store is storage associated with the physical host underlying the instance. It is useful for appropriate temporary data, caches or other information that can be reconstructed. Its persistence rules differ from EBS. An ordinary reboot and events such as stopping or terminating an instance do not have identical consequences for instance-store data. Check the documented lifecycle rather than placing the only copy of important registrations there because the device appears fast.
Amazon EFS provides managed file storage that suitable clients can access through its supported network-file interface. It can be appropriate when multiple application instances need a shared filesystem. That is a different requirement from attaching a block device and putting an ordinary local filesystem on it. Evaluate file access patterns, permissions, performance and availability choices against the application instead of treating all AWS storage services as interchangeable disk sizes.
Amazon S3 provides object storage. An application stores and retrieves objects through the service interface, commonly using keys in buckets. Workshop posters, exports and other application objects can fit this model. S3 is not an EBS block device, and software expecting ordinary block access cannot simply use an S3 bucket without an appropriate integration and its associated semantics. Decide which interface the application actually needs.
A larger system may use several storage types for different purposes. The registration database can use suitable persistent storage, uploaded posters can use object storage, and temporary computation can use disposable local space. This is a responsibility-based design. It does not imply that every student project needs every service. Keep the initial design small enough to understand and add components when a concrete requirement justifies them.
Backups are another use of storage with different access and lifecycle requirements. EBS snapshots are managed through EBS interfaces even though AWS stores their data in service-managed S3 storage. You do not browse an ordinary S3 bucket to find your snapshot blocks. Similarly, an exported database backup stored as an object has a different restoration procedure from an EBS snapshot. Label the recovery source accurately in the operating notes.
4. Match attachment, Availability Zone and application access
An EBS volume and the EC2 instance to which it is attached must be in the same Availability Zone. A Region contains multiple Availability Zones, so being in the same Region is not sufficient for direct attachment. Record both the volume's placement and the intended instance's placement before planning the connection. A descriptive resource name can help people, but the actual resource identifiers and location fields establish the relationship.
To recover data into another Availability Zone, a common approach is to create a new volume there from a suitable snapshot and attach that new volume to an instance in that zone. The snapshot and restored volume are different resources. Recovery still requires the correct encryption permissions, operating-system identification, filesystem handling and application verification. Creating the resource is one step in restoring a usable service.
EBS volume data is replicated within its Availability Zone to address component failures. That does not make an attached volume a multi-zone application design. A failure affecting the zone can still interrupt access to the volume and its instance. For broader resilience, evaluate the application's replication, backup and recovery design. Describe the failure boundary being addressed instead of translating the word replicated into a promise of uninterrupted access everywhere.
Multi-Attach is a specific feature for compatible Provisioned IOPS SSD volumes and instances. It allows multiple supported instances in the same Availability Zone to attach the same volume. It does not turn a normal ext4 or XFS filesystem into a safely shared network filesystem. Multiple writers need appropriate coordination, supported filesystem or application design, and protection against conflicting access. Ordinary mounting instructions for a single instance are not enough.
For a beginner registration application, keep the storage arrangement simple and understand which process owns writes. Do not enable Multi-Attach just to make two web servers see the same upload directory. A managed file or object-storage design may fit that requirement better, depending on application needs. The feature name describes attachment capability; it does not decide the application's consistency model.
Attachment limits and performance capabilities also depend on the instance. An available volume is not a promise that every instance can accept another attachment or deliver its full configured throughput. Check the selected instance's documented limits and existing resources. Resource planning should account for the complete running system, including the root volume and any other data devices already attached.
5. Distinguish capacity, IOPS, throughput and latency
Capacity describes how much information a volume can hold. IOPS describes a rate of input/output operations. Throughput describes a rate of data transfer. Latency describes the time an operation takes. These measurements answer different questions. A database can have plenty of free space and still respond slowly because its I/O pattern or another component limits how quickly useful work completes.
Consider two idealized workloads. One reads many small records scattered across storage. Another reads a large report sequentially. Counting only bytes per second hides the number and arrangement of operations. Counting only operations per second hides their size. A workload performing four thousand operations of four KiB each transfers much less data per second than the same operation count with one hundred twenty-eight KiB per operation.
The rough arithmetic is operations per second multiplied by bytes per operation equals bytes per second. This is a planning relationship, not a guarantee that an actual application achieves the result. The storage service can split or merge I/O according to its documented rules, and request size, queueing, caching and application concurrency affect observed behavior. Use consistent binary units when calculating MiB per second from KiB-sized operations.
Suppose a fictional workload requests four thousand operations per second at thirty-two KiB each. Its requested data rate is one hundred twenty-five MiB per second. If another limit permits only sixty-two and a half MiB per second, that path cannot sustain the requested rate at that operation size. Increasing capacity alone would not necessarily remove the bottleneck. Identify which performance dimension is constrained before selecting a change.
General Purpose SSD gp3 volumes allow capacity and performance provisioning choices appropriate to many workloads. Provisioned IOPS SSD io2 volumes target more demanding storage requirements with their documented performance and durability characteristics. Older gp2 and io1 choices also exist. Read the current limits and constraints rather than memorizing figures from an old screenshot. The AWS volume-type table has changed over time, including the upper capabilities of gp3.
HDD volume types such as throughput-optimized and cold HDD serve different workload patterns, particularly large sequential transfers. They are not substitutes for SSD simply because a quoted capacity price is lower. The workshop database's small random operations and an infrequently processed large archive can have different needs. Also check whether a volume type supports the intended role, such as a boot volume, before designing around it.
The instance and volume together form the path. An instance's EBS bandwidth or IOPS capabilities can limit the aggregate work from its attached volumes. Several volumes can compete for that instance capability. The application may also be limited by CPU, memory, database locks or inefficient queries. A storage upgrade is useful only when the evidence shows that the relevant storage dimension is responsible for the observed delay.
Latency needs interpretation under a workload. A queue grows when work arrives faster than it can be completed, increasing the time requests wait. A low average can hide occasional long delays important to users. Compare representative latency distributions, workload rate, errors and resource measurements. A benchmark that overwrites a live device would be inappropriate; use approved test data and an isolated environment for performance experiments.
6. Turn snapshots into a usable recovery plan
An EBS snapshot records a point-in-time storage state. EBS snapshots are incremental: after the relevant initial data, later snapshots store changed blocks as needed. Each retained snapshot has the information needed to restore its captured state. You do not manually assemble a chain of snapshot files to restore a chosen recovery point through EBS.
Deleting one snapshot does not remove blocks still needed by another retained snapshot. AWS manages the referenced data. This also means deletion may free less storage than a learner expects if much of that data is still referenced elsewhere. Snapshot retention should follow the recovery requirement and resource policy, not an assumption that each snapshot has an independent full copy of every block.
A snapshot captures data written to the volume at the relevant time, not every value waiting in an application's memory or operating-system cache. A database can have pending work spread across buffers, logs and data files. The existence of a completed snapshot does not by itself establish that the captured state is application-consistent. Use the database or application's supported backup procedure and coordinate writes appropriately.
Crash consistency and application consistency are useful distinctions. A crash-consistent state resembles storage after an abrupt interruption; an application may need its recovery mechanisms when it starts. An application-consistent backup deliberately coordinates the application to preserve the required relationships. If data spans multiple volumes, consider coordination across those volumes as well as the application itself. Taking unrelated snapshots at different times may not capture a meaningful combined state.
AWS snapshot creation is asynchronous. A request starts the operation, and the snapshot remains pending until the required transfer completes. Observe the resulting resource state instead of treating an accepted request as a completed backup. An operating procedure should also record the captured time, application context, encryption key and recovery purpose so that the correct snapshot can be selected later.
Restoration commonly creates a new volume from the selected snapshot. That restored volume has a new resource identity and must be placed and attached appropriately. Verify its guest mapping before accessing it. Do not format it as though it were a new empty device. Inspect its existing structures and use a recovery procedure that protects the original evidence and avoids accidental writes to the wrong filesystem.
Data initialization can affect the early performance of a volume created from a snapshot. Making the volume available and obtaining its full expected performance are not always the same event. AWS provides initialization and fast snapshot restore options with their own conditions and charges. Evaluate them when a recovery time requirement depends on predictable performance, and use current documentation rather than assuming all restored blocks are immediately equivalent to an empty newly created volume.
A recovery rehearsal ends with the application, not with the attachment icon. Confirm that the restored registration data can be read and that important relationships remain valid. Compare identifiers, record counts and a sample of meaningful operations. Keep the rehearsal isolated from real notifications or payments. Record the recovery duration and the time range of newer records that would be absent at that recovery point.
7. Verify identity and protect access to stored data
On Nitro-based EC2 instances, EBS volumes are exposed as NVMe devices. The Linux device name can differ from the name requested during attachment, and discovery order can change. A tutorial's second disk path is therefore not a reliable instruction to operate on your second-looking disk. Match the intended EBS volume ID to the guest device using supported identification information, then inspect its partitions, filesystem and mount.
The NVMe device's serial information can contain the EBS volume identity. AWS documents appropriate inventory and identification commands for different distributions. Filesystem UUIDs identify filesystem instances and can be useful for persistent mounting. These identities answer different questions: a volume ID names an AWS resource, while a filesystem UUID names a filesystem structure. Restored copies can preserve filesystem identifiers, so inspect for duplicates when originals and copies coexist.
Encryption protects EBS data through AWS KMS integration, including data at rest and traffic between an instance and its attached EBS storage. It does not stop an authorized operating-system process from reading mounted files. Application identity, database permissions, operating-system access and AWS permissions still matter. Treat encryption as a specific protection within the design rather than a replacement for every other access boundary.
Key access is part of recovery. Having a snapshot is not enough if the responsible recovery identity cannot use the required KMS key. Review key policies, permissions and key lifecycle alongside snapshot retention. A key disabled or scheduled for deletion can affect the ability to use protected resources. Do not experiment with real key deletion as a learning shortcut; reason through the recovery dependency and use controlled training arrangements for any authorized key exercises.
Persistent mounting also needs deliberate failure behavior. An entry using an appropriate UUID can avoid dependence on changing device names. A setting that permits boot to continue when a data mount is missing can be useful for some recovery designs, but it does not make it safe for the application to write into the empty mount-point directory. The service's startup checks and dependencies must reflect whether that filesystem is required.
Read-only inventory is valuable before any operation. Compare the AWS resource, serial mapping, filesystem type, mount source and application data path. If these observations disagree, stop the proposed write and resolve the discrepancy. The goal is not to memorize one reassuring command; it is to establish that all layers refer to the intended storage resource and that the planned operation matches its actual state.
8. Plan expansion, detachment and lifecycle changes
When a data volume needs more capacity, first establish the actual shortage. Check whether the filesystem is full, whether a particular directory is growing, whether inode exhaustion is involved, and whether deleted files remain open. A database's own allocation or quota can also matter. Increasing the EBS volume may be appropriate, but it should follow diagnosis rather than substitute for it.
After an authorized EBS capacity increase, observe the modification state and the new block-device size. If the layout uses a partition, it may need expansion before the filesystem can use the additional space. A logical-volume layout adds its own required steps. Finally extend the filesystem using the procedure for its actual type and state, then verify the reported capacity and application behavior. Some images or automation can perform parts of this work; verify the result rather than assuming they did.
Prepare a suitable recovery point before the change. EBS capacity increases are not a reversible slider that can always be moved back to a smaller number. Reducing a storage footprint generally needs a planned migration into appropriately sized storage with filesystem and application constraints considered. A snapshot can support recovery, but restoring it is a separate operation that produces a new volume and may require interruption or reconciliation.
Detachment removes the attachment relationship. It is not the same as unmounting the filesystem inside Linux, and it is not deletion of the volume. Before detaching a data volume, arrange for its users to stop writing, complete the required flush and shutdown procedure, and unmount it appropriately. Investigate a busy filesystem rather than forcing the operation because a normal unmount refuses. Root-volume operations have additional constraints and require their own documented procedure.
Stopping an instance, terminating it and deleting a volume are different lifecycle events. The attachment's delete-on-termination behavior determines whether a volume is deleted with instance termination. Retained volumes and snapshots can continue to incur charges after compute stops. Maintain an inventory of resource ownership and intended retention so that cleanup preserves required recovery data while removing resources that are no longer needed through an authorized process.
Record completion at both the resource and application levels. A successful attachment change does not prove that the application used the intended filesystem. A completed resize does not prove that free space increased inside the filesystem. A restored snapshot does not prove that the newest expected registrations are present. Each operation needs a verification matched to the user-facing outcome it was intended to achieve.
9. Offline lab: identify the data volume and explain each layer
This lab runs ordinary Python calculations on supplied fictional records. It does not inspect your computer's disks, contact AWS, write a filesystem, mount a volume or delete storage. The identifiers beginning with vol-demo are teaching labels, not valid AWS resource identifiers. The device paths are strings in the exercise. No command uses them as real operating-system targets.
Before running each block, predict the result on paper. The purpose is to learn which evidence supports a decision. A script printing a device path is not permission to format that device on a real machine. In real work, replace fictional evidence with a verified resource inventory and an approved operation-specific procedure. Keep that distinction clear when explaining the exercise to another student.
Find the same volume after device names change
The supplied inventory contains a root volume and a workshop-data volume. Both records include placement, purpose and current device name. The second boot deliberately exchanges their NVMe enumeration names. The selection function uses the intended volume identity and checks the expected placement and purpose. It refuses missing or ambiguous matches instead of choosing the first available row.
python3 - <<'PY'
from copy import deepcopy
boot_a = [
{'volume_id':'vol-demo-root', 'device':'/dev/nvme0n1',
'az':'training-zone-a', 'purpose':'root', 'mount':'/'},
{'volume_id':'vol-demo-data', 'device':'/dev/nvme2n1',
'az':'training-zone-a', 'purpose':'workshop-data',
'mount':'/workshop-data'}
]
boot_b = deepcopy(boot_a)
boot_b[0]['device'] = '/dev/nvme2n1'
boot_b[1]['device'] = '/dev/nvme0n1'
def identify(rows, volume_id, expected_zone):
matches = [row for row in rows if row['volume_id'] == volume_id]
if len(matches) != 1:
raise ValueError('Expected exactly one matching volume')
row = matches[0]
if row['az'] != expected_zone or row['purpose'] != 'workshop-data':
raise ValueError('Placement or purpose does not match')
return row
for label, rows in [('boot A', boot_a), ('boot B', boot_b)]:
found = identify(rows, 'vol-demo-data', 'training-zone-a')
print(label, found['volume_id'], found['device'], found['mount'])
try:
identify(boot_a + [boot_a[1]], 'vol-demo-data', 'training-zone-a')
except ValueError as error:
print('Ambiguous inventory rejected:', error)
else:
raise AssertionError('Duplicate inventory should be rejected')
PY
Expect the same data-volume identity and mount path in both observations, with a different device path. Then expect a clear rejection of the duplicated inventory. If you had selected the old device name without checking identity, the second boot would point you at the root record. This is the reasoning error that a fixed tutorial device path can create.
The supplied mount field is only an inventory claim. On a real instance, verify the current mount source independently and compare it with the mapped device and filesystem. An outdated spreadsheet cannot prove a live mount. Useful inventories guide investigation, while current observations establish the actual state. Record discrepancies instead of adjusting the expected identity to match whichever device happens to be easiest to access.
Compare the storage layers before and after expansion
The next block uses rounded illustrative capacities in GiB. Its gaps are chosen to make the arithmetic visible, not to prescribe partition sizes or filesystem overhead. Each row describes a possible stage in a planned expansion. The script checks only that the nested capacities are logically ordered and reports the differences. It does not perform or recommend a real resize.
python3 - <<'PY'
stages = [
('original', 40, 39, 38),
('volume enlarged', 60, 39, 38),
('partition enlarged', 60, 59, 38),
('filesystem enlarged', 60, 59, 58),
]
for label, volume, partition, filesystem in stages:
assert 0 < filesystem <= partition <= volume
print(label, {
'volume_GiB': volume,
'partition_GiB': partition,
'filesystem_GiB': filesystem,
'outside_partition_GiB': volume - partition,
'partition_minus_filesystem_GiB': partition - filesystem,
})
assert stages[1][3] == stages[0][3]
assert stages[-1][3] > stages[0][3]
print('Volume growth alone left the filesystem size unchanged')
PY
After the volume-only change, the filesystem still has its original reported capacity. After the partition change, the filesystem remains unchanged again. Only the final row describes an enlarged filesystem. Explain which layer changed at each stage and why a filesystem-capacity report cannot be used as the only evidence that an AWS volume modification occurred.
These numbers are capacity figures, not free-space measurements. The script contains no files and therefore cannot tell you how much application data is present. A real filesystem may report reserved or available space differently, and a logical-volume manager can add additional capacity boundaries. Use the exercise to organize the questions rather than treating its four rows as a universal command sequence.
Calculate the effect of operation size and path limits
The performance block uses hypothetical workload and limit values. It is not an AWS pricing or capacity recommendation. The requested operation rate stays constant while the operation size changes. The calculation then applies both a volume throughput limit and an instance throughput limit, showing which constraint bounds the simple model.
python3 - <<'PY'
requested_iops = 4000
volume_mib_per_second = 125
instance_mib_per_second = 300
path_mib_per_second = min(volume_mib_per_second,
instance_mib_per_second)
for size_kib in (4, 32, 128):
requested_mib = requested_iops * size_kib / 1024
throughput_bound_iops = path_mib_per_second * 1024 / size_kib
model_iops = min(requested_iops, throughput_bound_iops)
print(size_kib, 'KiB operations:', {
'requested_MiB_per_second': requested_mib,
'model_upper_IOPS': model_iops,
})
assert requested_iops * 32 / 1024 == 125
assert path_mib_per_second * 1024 / 128 == 1000
print('Large operations reached the throughput bound first')
PY
Expect requested transfer rates of 15.625, 125 and 500 MiB per second. In this simplified model, the largest operation size permits only one thousand operations per second under the selected throughput bound. Real measured performance can be lower because the model excludes latency, queueing, protocol overhead, service-specific I/O accounting and application behavior. A model upper bound is not a benchmark result.
For a useful follow-up, lower the hypothetical instance limit below the volume limit and predict the new result before rerunning. Then explain why increasing the volume's provisioned throughput would not remove a lower instance bound. This task connects an arithmetic observation to a design decision without consuming cloud resources or generating load against a real application.
10. Practice tasks with evidence to submit
- Create a storage identity record. Using the supplied fictional inventory, record the data volume's identity, placement, current device path, filesystem information still needed and intended mount. Explain which fields remain stable in the exercise and which can change. Completion means your record identifies the intended resource without relying on the second disk in a list.
- Write an expansion explanation. Use the four capacity stages to explain what changed at each layer and what remained unchanged. Include the extra information you would need for a real XFS, ext4 or logical-volume layout. Completion means you distinguish the AWS modification from the operating-system procedure and the final application verification.
- Plan a recovery rehearsal. Assume a fictional snapshot was captured before a damaging application update. Describe selecting the recovery point, checking key access, creating an appropriately placed restored volume, identifying it in the guest and verifying sample registrations. Explain which newer records might need reconciliation. Completion means your plan ends with usable application evidence rather than a created-volume message.
- Review resource retention. Draw an instance, its root and data volumes, and two snapshots. Assign intended deletion or retention behavior to each resource. Describe the result of stopping the instance and, separately, terminating it under your chosen settings. Completion means the plan identifies both required recovery data and resources that could continue to incur storage charges.
11. Interview questions with explained answers
Is an EBS volume the same thing as a filesystem?
No. The volume supplies block storage. A filesystem organizes files and directories on a partition or directly on that device. A mount makes the filesystem accessible through a directory. Explain these layers when discussing a resize: changing the volume does not prove the partition or filesystem has been extended. The operating procedure must match the actual layout.
Can a volume in one Availability Zone attach directly to an instance in another?
An EBS volume and its attached instance must be in the same Availability Zone. A common recovery approach creates a new volume from a snapshot in the target zone, then attaches that volume there. The restored volume has a different identity and still needs correct key access, guest mapping and application recovery checks.
The volume was enlarged, but the filesystem still reports its old capacity. What does that suggest?
It suggests that one or more inner storage layers may not yet use the added capacity. Verify the modification state and guest block-device size, then inspect the partition or logical-volume layout and filesystem type. Do not immediately run a memorized command against an assumed device. The next step depends on the verified structure and supported growth procedure.
Does an incremental snapshot require keeping every earlier snapshot forever?
No. EBS manages the blocks needed by each retained snapshot. Removing an earlier snapshot does not remove data still required by a retained recovery point. Select retention according to recovery requirements and applicable resource policies. Also distinguish deleting a snapshot from deleting the original volume; they are separate resources with separate consequences.
Why is a snapshot not automatically an application-consistent database backup?
It captures the storage state, while an application may have buffered or coordinated changes not fully represented by those blocks. A database's supported backup procedure can coordinate writes and recovery requirements. When data spans volumes, coordinate the relevant storage and application state together. A completed snapshot status alone does not prove that a database can start and serve correct records.
Why might provisioned storage performance fail to appear in an application benchmark?
The instance path, other attached volumes, operation size, queueing, CPU, memory or application behavior can constrain the result. Provisioning a volume sets one part of the system. Compare the workload and observed metrics against the complete path. A useful diagnosis explains which bound was reached and why the proposed change would remove that bound.
Does Multi-Attach make ordinary ext4 safe for several independent writers?
No. Multiple attachments do not provide the write coordination required by an ordinary local filesystem. Use a supported shared-storage design with appropriate filesystem or application coordination and fencing where applicable. For shared application files, evaluate the required interface rather than selecting Multi-Attach solely because its name mentions multiple instances.
Does encryption make operating-system permissions unnecessary?
No. An authorized process on an instance can read data made available through its mounted filesystem if its access permits it. Encryption and key management protect specific storage boundaries. Operating-system identity, database permissions and application authorization still control how users and processes use that data. Recovery also requires access to the relevant encryption key.
12. Quiz: connect each answer to its evidence
Quiz 1: The data volume was the second NVMe device yesterday. Is that enough evidence to format today's second device?
No. Enumeration can change, and formatting is a write operation that can destroy existing filesystem structures. Verify volume identity, current mapping, contents, backups and the actual intended operation. The offline exercise deliberately demonstrates the danger of selecting by yesterday's device name.
Quiz 2: A restored volume already contains the workshop filesystem. Should it be formatted before mounting?
No. Formatting would replace filesystem structures on a volume that already contains recovery data. Inspect and follow the appropriate recovery procedure for the existing filesystem. Preparing a verified new empty volume and recovering an existing filesystem are different tasks.
Quiz 3: Four thousand operations of thirty-two KiB each request how much data per second?
They request one hundred twenty-five MiB per second in the simple arithmetic model. Multiply the operation rate by the operation size, then convert KiB to MiB. This requested rate is not a promise of measured throughput; other bounds can reduce the achieved rate.
Quiz 4: The instance is stopped. Must its retained EBS volume stop generating storage charges?
No. Compute state and storage retention are separate. A retained volume continues to exist, and its applicable storage charges can continue. Include volumes and snapshots in the resource inventory and cleanup plan instead of checking only running instances.
Quiz 5: A data mount is absent but its directory exists. Can the application safely assume it is writing to the intended volume?
No. The directory can exist on the parent filesystem. The application may then write somewhere different from the intended mounted storage. Verify the mount source and arrange startup behavior appropriate to whether that data filesystem is required.
13. Revision cards
Volume identity
The AWS resource identifier names the volume. Match it to guest evidence before selecting a device for an operation.
Storage layers
Volume, partition or logical volume, filesystem and mount describe different responsibilities. Inspect the actual arrangement.
Performance dimensions
Capacity, IOPS, throughput and latency answer different questions. Evaluate the workload and the instance path together.
Snapshot
A managed point-in-time storage recovery source. Application consistency and a successful restore need deliberate verification.
Encryption dependency
Protected storage depends on usable key access. Include that access and key lifecycle in the recovery plan.
Lifecycle
Stop, terminate, unmount, detach and delete are different actions. State which resource changes and which data remains.
Primary sources
Current AWS documentation reviewed on 22 November 2026. Consult the selected volume and instance documentation for current limits before planning a real operation.
- Amazon EBS block storage and durability
- EBS volume placement and lifecycle
- Current volume types and performance constraints
- General Purpose SSD performance
- Multi-Attach requirements and coordination
- NVMe presentation of EBS devices
- Mapping volume identities to guest devices
- Filesystems, mounting and UUID considerations
- Elastic Volumes modifications
- Partition and filesystem expansion
- EBS snapshots and recovery
- Snapshot consistency and asynchronous creation
- Snapshot retention and shared-block handling
- Restored-volume initialization
- EBS encryption and KMS
- Unmounting and detaching considerations
- EC2 instance store
- EFS file storage
- S3 object storage
Practice Tasks
Practice checks run in your browser. They check the answer for this exercise; they do not create resources or connect to your AWS account.
About this scenarioStockholm Games is a gaming business in Stockholm. Erik Lindqvist looks after its IT and cloud work. They count money in SEK and run their AWS resources in the eu-north-1 Region. In the tasks below you do real jobs for them using what this lesson teaches. All names, account IDs, IP addresses and numbers are made up for practice.
0 / 12
Easy Check free disk space
A full filesystem can prevent required writes; check the affected filesystem, available space and application errors rather than assuming every process has stopped.
Show free and used space of all mounted disks in human-readable units.
- Find the Linux command that does this job.
- Add the options (like -r or -h) the task needs.
- Add the file names, folders or users in the right order.
- Use sudo if the job changes system files or users. Click Check answer.
Easy List the disks
lsblk lists guest devices and their relationships. Map the intended EBS volume identity to the current guest device before a write operation.
List all block devices (disks and partitions) on the server.
- Find the Linux command that does this job.
- Add the options (like -r or -h) the task needs.
- Add the file names, folders or users in the right order.
- Use sudo if the job changes system files or users. Click Check answer.
Easy Check a folder's size
du normally reports allocated filesystem usage for the selected paths; apparent file size and filesystem-wide available space are different measurements.
Show the total size of /var/www/sthlmgames as one line in human-readable units.
- Find the Linux command that does this job.
- Add the options (like -r or -h) the task needs.
- Add the file names, folders or users in the right order.
- Use sudo if the job changes system files or users. Click Check answer.
Easy Check memory
Inspect available memory, cache, swap and workload evidence. High used-memory figures alone do not prove harmful memory pressure.
Show used and free memory in human-readable units.
- Find the Linux command that does this job.
- Add the options (like -r or -h) the task needs.
- Add the file names, folders or users in the right order.
- Use sudo if the job changes system files or users. Click Check answer.
Easy Snapshot an EBS volume
An EBS snapshot captures a volume storage state and is managed through EBS interfaces; application consistency needs a suitable backup procedure.
Create a snapshot of volume vol-044c54d4e2fcfdeed with description "nightly sthlmgames".
- Read the task and decide which AWS service it is about.
- Write aws, then the service name, then the operation (the action word).
- Add each needed flag (--name) followed by its value from the task.
- Flags can be in any order. Click Check answer.
Medium Attach a volume to an instance
A volume must be attached (same AZ) before the server can see it.
Attach volume vol-044c54d4e2fcfdeed to instance i-0a2b4c45d44211a2b as device /dev/sdf.
- Read the task and decide which AWS service it is about.
- Write aws, then the service name, then the operation (the action word).
- Add each needed flag (--name) followed by its value from the task.
- Flags can be in any order. Click Check answer.
Medium Create a new EBS volume
Extra data disks keep app data apart from the root disk.
Create a 20 GiB gp3 volume in Availability Zone eu-north-1a.
- Read the task and decide which AWS service it is about.
- Write aws, then the service name, then the operation (the action word).
- Add each needed flag (--name) followed by its value from the task.
- Flags can be in any order. Click Check answer.
Medium Find a disk's UUID
A verified filesystem UUID can support stable mounting, but restored copies can share a UUID. Check the intended source and required mount behavior.
Show the UUID of /dev/xvdf.
- Find the Linux command that does this job.
- Add the options (like -r or -h) the task needs.
- Add the file names, folders or users in the right order.
- Use sudo if the job changes system files or users. Click Check answer.
Medium Format a new disk
This browser-only exercise assumes a verified disposable empty target. A volume restored from a snapshot can already contain data and must not be formatted as though empty.
In this browser simulation only, write the command for an already verified empty /dev/xvdf target using XFS. Do not run it against a real device from this example.
- Find the Linux command that does this job.
- Add the options (like -r or -h) the task needs.
- Add the file names, folders or users in the right order.
- Use sudo if the job changes system files or users. Click Check answer.
Hard Grow a volume without downtime
Supported Elastic Volumes changes can increase capacity while attached. Verify modification state, then extend any required partition or logical-volume layers and the actual filesystem.
Increase volume vol-044c54d4e2fcfdeed to 50 GiB.
- Read the task and decide which AWS service it is about.
- Write aws, then the service name, then the operation (the action word).
- Add each needed flag (--name) followed by its value from the task.
- Flags can be in any order. Click Check answer.
Hard Find big files
When the disk is full, find large files first.
For this browser exercise, find files bigger than 100 MiB under /var; the M size suffix uses binary mebibytes.
- Find the Linux command that does this job.
- Add the options (like -r or -h) the task needs.
- Add the file names, folders or users in the right order.
- Use sudo if the job changes system files or users. Click Check answer.
Hard Resize an instance (vertical scaling)
When the server is too small, change its type while it is stopped.
The stopped instance i-0a2b4c45d44211a2b needs more power. Change its instance type to t3.large.
- Read the task and decide which AWS service it is about.
- Write aws, then the service name, then the operation (the action word).
- Add each needed flag (--name) followed by its value from the task.
- Flags can be in any order. Click Check answer.