Chapter 13: Amazon EBS (Elastic Block Store)
13.5 Increasing the size of a volume (root or data)
Quick answer: the short, self-contained version of this lesson is the guide How to Increase EBS Volume Size Without Downtime.
In my class students ask, “Sir, I increased the size in the console, so why does df -h still show 8G?” First confirm the intended mount and identify the guest layer that still shows the previous size.
माझ्या क्लासमध्ये स्टुडंट्स विचारतात, “सर, कन्सोलमध्ये साइज वाढवला, मग df -h अजून 8G का दाखवतो?” आधी योग्य mount जुळवा. मग guest मध्ये कोणता layer जुन्या आकारात आहे ते शोधा.
मेरी क्लास में स्टूडेंट्स पूछते हैं, “सर, कंसोल में साइज़ बढ़ाया, फिर df -h अब भी 8G क्यों दिखाता है?” पहले सही mount मिलाओ और guest में कौन सा layer पुराने आकार का है, देखो।
Supported Elastic Volumes growth can increase the attached disk without stopping the instance. Then extend only the required guest layers and verify usable space at the application’s mounted path.
Before: [ EBS 8 GiB ][ partition 8 GiB ][ filesystem 8 GiB ]
Step A: [ EBS 20 GiB ][ partition 8 GiB ][ filesystem 8 GiB ] ← lsblk shows 20G disk, df still 8G
Step B1 growpart: [ partition 20 GiB ]
Step B2 xfs_growfs / resize2fs: [ filesystem 20 GiB ] ← df now shows 20G
Take a snapshot first
Always create a snapshot of the volume before resizing. Also note: EBS volumes can only be made bigger, never smaller, and you must wait for the current modification to complete before modifying the same volume again. Check the current Elastic Volumes limits rather than assuming a fixed wait.
Part A — Modify the volume in the console
- EC2 → Instances → select instance → Storage tab → click the Volume ID.
- Compare the exact volume ID and guest mount, verify the planned size and usable recovery point, and review current compatibility before any authorized modification.
- For an approved change, request the planned size for the verified volume. Review cost and other configuration changes separately. Use the synthetic stages below for the lab.
- Wait until the volume modification state is optimizing or completed (the new size is usable as soon as it enters optimizing).
Optional read-only progress check on the exact assigned volume: aws ec2 describe-volumes-modifications --region "$LAB_REGION" --volume-ids "$LAB_VOLUME_ID". Supply both approved values first.
Part B — Extend partition and filesystem in Linux
Step 1 — check the current layout:
lsblk -o NAME,TYPE,SIZE,FSTYPE,SERIAL,MOUNTPOINTS
findmnt --target / -o TARGET,SOURCE,FSTYPE
df -hT /
Example output on a Nitro instance after Part A (root volume grown from 8 to 20 GiB):
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
nvme0n1 259:0 0 20G 0 disk
├─nvme0n1p1 259:1 0 8G 0 part /
├─nvme0n1p127 259:2 0 1M 0 part
└─nvme0n1p128 259:3 0 10M 0 part /boot/efi
Filesystem Type Size Used Avail Use% Mounted on
/dev/nvme0n1p1 xfs 8.0G 1.9G 6.1G 24% /
The disk is 20G but partition nvme0n1p1 and the filesystem are still 8G.
Step 2 — grow the partition (note the space between disk and partition number):
growpart VERIFIED_PARENT_DISK VERIFIED_PARTITION_NUMBER
Step 3 — grow the filesystem. First check the type with df -hT:
# XFS example, if the verified filesystem is mounted:
xfs_growfs -d VERIFIED_MOUNT_PATH
# Alternative for an existing verified ext4 filesystem:
resize2fs VERIFIED_EXT4_BACKING_DEVICE
Step 4 — verify:
df -hT /
lsblk
Data volume without a partition
A filesystem directly on the selected disk has no partition to extend. Verify the actual device and mount, then use the supported filesystem-specific procedure. If a logical volume backs the filesystem, inspect and extend its relevant layers instead.
Check whether automation already grew the root
Configured cloud-init modules can grow a supported root partition and filesystem on some deployments. Verify the reported device, partition and actual filesystem before deciding whether manual growth remains. A reboot is not a universal requirement.
Ravindra Bagale's Tip
Check the filesystem type and backing device first. The XFS procedure uses its verified mount path; resize2fs uses the ext-family backing device. Confirm the usable recovery point and the separate partition argument if present.
Ravindra Bagale's Tip – मराठी
आधी filesystem type आणि backing device जुळवा. XFS साठी ठरवलेला mount path वापरा. Ext filesystem साठी resize2fs ला योग्य backing device द्या. Recovery point तपासा.
Ravindra Bagale's Tip – हिंदी
पहले filesystem type और backing device मिलाओ। XFS के लिए सत्यापित mount path लो। Ext filesystem के लिए resize2fs को सही backing device दो। Recovery point जाँचो।
Lab
Use the synthetic capacity-stage lab to identify the first remaining storage layer. A real modification needs an approved change plan and verified resource, guest layout and recovery point.
Verify the larger device, extend only the actual guest layers and check the usable space at the intended path. The next lesson covers a separate data volume.
मोठा device जुळवा, फक्त आवश्यक guest layers वाढवा आणि योग्य path वर usable space तपासा. पुढचा धडा स्वतंत्र data volume बद्दल आहे.
बड़ा device जाँचो, केवल ज़रूरी guest layers बढ़ाओ और सही path पर usable space देखो। अगला पाठ अलग data volume का है।
Follow the extra capacity until the application can use it
Mauli Dairy's order archive is nearly full. The trainer changes the approved EBS volume from 40 GiB to 80 GiB in the maintenance plan. Someone checks the Linux filesystem containing the archive and still sees the old capacity. Both observations can be true. EBS supplies the size of the outer block device. Linux can still have its earlier partition boundaries or filesystem size, or the app can be writing to a different path. The goal is to verify which thing grew and which thing the application actually uses.
A supported Elastic Volumes change lets an EBS volume's capacity increase while attached without requiring detach or restart for the AWS operation. Verify the eligible volume and instance and the guest operations in your specific layout. Treat the expected application result as a separate check. Maintain a usable recovery point, and have the appropriate owner plan the amount, result and timing. The educational worksheets below use only fictitious data. They never modify real AWS resources, block devices, mount settings or filesystems.
There can be more than two layers. A simple disk may have a filesystem directly on it. A partitioned disk has a partition boundary between the disk and filesystem. An LVM layout can add a physical volume, volume group and logical volume to the chain. A mount ties a filesystem to the app's path. Record only the layers that exist and change only what's required. A list copied from a root-device example is unsafe for a data volume with a different setup. Start with the report path and identify the exact device behind it.
Verify identity, available space and a recovery point
Start with the result you need. Does the order import need an extra 30 GiB of usable space, or is a burst of temporary files consuming current capacity? Use a read-only check of the path's actual mount source and usable filesystem space. Inspect whether a particular quota or inode limit applies. Deleting a file may not immediately free used blocks if a process still has an open reference. A large archive and many tiny work files can cause different kinds of allocation failures. The right repair should address the observed requirement, not automatically increase every attached volume.
Trace the path to its volume before submitting a planned change. In AWS, confirm the instance, desired volume ID, Region, AZ, role and existing capacity and configuration. In the guest, match the EBS device and inspect the current filesystem and actual mount. A partition or a logical device may be the filesystem's immediate source even though an EBS disk supports it underneath. Use the NVMe identification lesson when the device number does not match what the console shows. Keep the new intended size and checks next to the matched volume ID in the maintenance note.
For needed data, arrange an approved recovery point before any change. AWS recommends taking a snapshot before extending the storage. A database spanning several devices needs its consistency and coordinated backup procedure. Confirm the usable recovery point and remind stakeholders what the point can restore. A prior snapshot can create a new independent volume, but it does not undo the active volume expansion in place. New writes after the selected backup need a reconciliation plan if a restore becomes necessary. For an application where an outage is expensive, verify its maintenance, backup and recovery details before changing the live filesystem.
Read the hard constraints first. Elastic Volumes does not support decreasing an EBS volume's size. For storage needing less capacity, plan a new compatible smaller volume and migrate data by a supported application or guest method, preserving and verifying the originals. A full snapshot restore cannot be assumed to shrink a volume below its source size. Check the destination type's sizing and other requirements. An older boot image or partition table can impose its own size limit even when EBS supports a larger outer capacity. AWS documents particular boot requirements around 2 TiB for Linux. Consult the actual partition scheme and bootloader guidance.
Distinguish the resource state from the modification state
In the approved change plan, record the current settings and the intended target size. A supported operator can request an Elastic Volumes modification of that specific resource using the configured tools. A new capacity may change ongoing charges. If you also change the type or provisioned IOPS, probe and review those as independent dimensions. Keeping changes narrow makes later measurements easier to interpret. The procedures here explain what supported changes mean rather than issuing an AWS mutation as part of the exercise.
The volume's attachment state and modification progress are different. in-use indicates attachment or use in the volume's own lifecycle. The modification has statuses such as modifying, optimizing and completed. AWS documents that a size increase takes effect at optimizing. That means the appropriate guest expansion can begin once that state is seen and the guest has the larger block device. It does not mean IOPS and throughput have reached their final post-change performance yet. Wait for the previous modification to complete before submitting another modification of that same volume.
As of this lesson, AWS documents up to four modifications in a rolling 24-hour period when the volume is in the appropriate state and all previous modifications are complete. A rolling window moves with the current time. It is not reset by crossing midnight on the calendar. A generic six-hour pause is not the current rule. Check the current official limits and the exact response for a proposed modification. Waiting for the outer resize also does not prove the guest rediscovered it. Read both before acting on the inner layers.
aws ec2 describe-volumes-modifications --region "$LAB_REGION" \
--volume-ids "$LAB_VOLUME_ID" \
--query 'VolumesModifications[].{Id:VolumeId,State:ModificationState,Before:OriginalSize,After:TargetSize,Progress:Progress}' \
--output json
Use this as an optional descriptive check only for an already assigned volume with a modification history. Populate the exact IDs and Region first. The response can show the most recent modification. It cannot show filesystem usage or whether the selected app path uses this volume. An empty result or an error needs scoped investigation of the exact request and resources. Do not submit another increase to force a state value. In the local exercise, use the supplied stage records instead of making cloud calls.
Explain which Linux storage layer needs the space next
Once the outer device shows the increased size, compare the parent and the selected child. Use a read-only device tree for block capacity and its hierarchy, and a filesystem tool for visible capacity at the path. The contiguous partition may still end near the prior disk boundary. A partitioned disk can have other partitions, such as an EFI or reserved partition. Verify their layout and that the intended partition can grow into adjacent unused space. A result that shows less than the whole outer size can be correct. Filesystem metadata and reserved space can also affect the totals shown to ordinary users.
lsblk -o NAME,TYPE,SIZE,FSTYPE,SERIAL,MOUNTPOINTS
findmnt --target /srv/dairy -o TARGET,SOURCE,FSTYPE,OPTIONS
df -hT /srv/dairy
Use the actual existing application path in those examples. A basic partitioned XFS case proceeds from larger EBS disk, to the intended larger partition and finally the mounted XFS filesystem. Linux growpart takes the parent device and a separate partition number. For a path ending in nvme2n1p1, the namespace is /dev/nvme2n1 and partition number is 1. Passing a partition device as the first argument loses that distinction. Some versions provide a dry-run mode to inspect the proposed change; check the actual tool version and captured layout. The example names are only for a paper exercise.
Use filesystem-specific operations after its underlying storage is ready. The AWS example for XFS uses xfs_growfs -d with the exact mounted path. XFS must be mounted for the documented growth operation. For an ext4 filesystem, resize2fs operates on the actual block device holding that filesystem, such as the selected partition, whole disk or logical volume. Check supported online behavior for the particular filesystem and distro. Never choose a tool solely because an older handout says one distro probably uses XFS or ext4. Verify the actual mounted filesystem type.
A whole-device filesystem skips the partition event because there is none. An ext4 filesystem directly on an EBS disk uses that device as the backing argument in the appropriate approved procedure. A whole-device XFS filesystem is still grown through its verified mount path. If the disk belongs to LVM, first inspect the physical device and volume group. The underlying capacity may require a partition step and a physical-volume resize to become free extents. Extend the intended logical volume by the planned amount before growing the appropriate filesystem. An unallocated volume group is not automatically the filesystem's new capacity.
Consider default automation. Some AMIs may use cloud-init's growpart and filesystem resize modules for the configured root device. Their behavior depends on the deployed configuration and storage support. An application requirement does not mandate an extra reboot to trigger a guess. Check the live volumes and filesystem first. If a supported deployment process already grew both guest layers, record the evidence and skip redundant mutation. If it grew only the partition, proceed with the correct filesystem procedure in the assigned change scope.
Translate the layout into a specific growth sequence
Use these fictional disk layouts as a whiteboard review. For each row, pick the layer after the outer capacity change that still needs growth. The changes themselves belong to the authorized operator working on the verified volume. If a filesystem, partitioning or boot constraint differs from the row, follow the applicable tool and vendor documentation before changing anything. A simple diagram explains why each step moves the boundary exactly once.
| Observed layout at the app path | Growth dependency after the outer disk | Observable result |
|---|---|---|
NVMe namespace → partition 1 → XFS → /srv/dairy | Verify and extend partition 1, then grow the existing mounted XFS using the exact path. | Partition capacity increases, then the path's filesystem can allocate its added capacity. |
NVMe namespace → ext4 directly → /srv/cache | Skip partition operations. Extend the existing ext4 on the verified namespace using the appropriate supported procedure. | The disk reports the new size and the mounted ext4 shows a larger allocation size. |
| EBS disk → partition → LVM physical volume → group → logical volume → ext4 | Follow the verified partition, physical volume and logical volume procedure before extending the filesystem. | The group sees free extents, the intended LV grows by the requested amount, then the filesystem grows. |
| Path still resides on root while the intended volume is visible | Stop and resolve the mount and data-owner problem first. | The directory must be supplied by the intended storage before a capacity calculation at that path applies. |
The documented program patterns below illustrate the different argument shapes, with descriptive placeholders. They are references for building a reviewed maintenance procedure, not runnable lab commands. Replace every placeholder only after resolving the verified layout. A child partition such as nvme2n1p1 can be the target of a filesystem size change while its parent nvme2n1 is the beginning of a partition command. Distinguishing both paths prevents using the wrong device or resizing the wrong layer.
# Illustrative command shapes only:
growpart VERIFIED_PARENT_DISK VERIFIED_PARTITION_NUMBER
xfs_growfs -d VERIFIED_MOUNT_PATH
resize2fs VERIFIED_EXT4_BACKING_DEVICE
For partitioned XFS the first two shapes apply, in order, if both inner layers need an increase. For direct ext4 only the third shape applies after the device grew. For ext4 above LVM, the immediate filesystem backing device is the logical volume, not the parent EBS disk or its physical partition. Use the documented LVM commands and review the volume group's allocation policy first. Growing one logical volume can consume extents other logical volumes need later. A maximum use-all option is a storage planning choice rather than a normal requirement for every resize.
Record two sets of figures. Before the guest changes, the AWS size and reported block-device size should agree within their displayed units and rounding. After extending a partition, its start should remain at the intended position and its usable extent should increase within the safe layout. The filesystem should then report more usable space at the selected mount. Differences caused by other partitions, filesystem metadata or reserved space may remain. A container may also see a different mount than the host. A successful check uses the namespace which actually runs the application.
Read no-change or no-space messages at the layer that issued them
A learner may see NOCHANGE when asking a partition tool to grow an already extended partition. Compare the actual geometry and whether another partition prevents growth into adjacent space. The same log can appear if the guest has not yet observed a larger block-device size or there is insufficient usable change for the selected tool. It does not automatically mean that the AWS request failed. Check the volume modification state and the actual parent and child figures. If the partition is already correct, confirm whether the existing filesystem still needs growth. Do not try to validate by recreating its partition table.
A working filesystem resize tool may say its target is already at its supported size. Confirm the actual filesystem type and immediate backing device, plus whether upstream layers exposed any new capacity. If you accidentally selected XFS with an ext4-specific tool, do not keep trying variations. Stop and recheck the source and filesystem, then consult its supported procedure. The wrong syntax can be a benign failure in a training example, but confusing the target during a different operation can damage another filesystem. A reasoned diagnosis starts from the evidence and keeps one confirmed resource ID.
A grow script can fail because it cannot create its temporary files on a full host filesystem. This is different from the selected partition's maximum extent. AWS lists insufficient workspace as a possible reason when growpart reports no space creating a temporary directory. Read the actual error location. Consult the platform's safe method of freeing scoped disposable space or preparing appropriate workspace. Do not delete logs or application data you have not identified. Check inodes and protected capacity as appropriate. A volume on another path cannot automatically solve the work directory's allocation failure.
If there is less application space than expected after successful growth, check the same path and units and whether a quota or other storage layer is responsible. Raw disk GiB from AWS differs from reported filesystem capacity and actual room for the service account. Some systems layer a quota on users, projects or tenants independently of filesystem growth. Run an appropriate authorized check under the intended context and verify the application still sees existing orders. Verification should not require filling the filesystem until it fails. A modest representative operation under the approved procedure gives safer evidence.
Lab one. Diagnose four capacity observations with a local fixture
Use a private directory and Python 3. The CSV below has simplified state records, not real lsblk or AWS output. Each record is a separate observation from the fictional dairy change. It compares outer size, inner partition and filesystem size. A later record tests a whole-device layout and another failure case deliberately points the app to a different source. Save the data as capacity-stages.csv and trace the rows by hand before running the Python block. The script only prints a diagnosis and never calls storage tools.
case,state,disk_gib,partition_gib,fs_gib,mount_verified
queued,modifying,40,39,38,yes
disk ready,optimizing,80,39,38,yes
partition ready,optimizing,80,79,38,yes
validated,completed,80,79,78,yes
whole-device,completed,80,,38,yes
wrong path,completed,80,79,78,no
In the simplified data we allow about one GiB for reserved or layout differences in the paper example. An app need here is at least 75 reported GiB in total filesystem capacity, with its required usable headroom checked separately. This gap threshold is only a modeling assumption for the case. Actual storage procedures should use precise capacity and layout measurements and should not rely on a one-GiB magic cutoff. Inspect the correct mounted device, actual partition boundary, operating limits and usable space to decide what a real resize can do.
python3 - <<'PY'
from pathlib import Path
from csv import DictReader
def assessment(row):
if row["mount_verified"] != "yes":
return "Resolve the intended mount source before growth."
if row["state"] not in {"optimizing", "completed"}:
return "Wait for the outer change and recheck."
disk = int(row["disk_gib"])
part = int(row["partition_gib"]) if row["partition_gib"] else None
filesystem = int(row["fs_gib"])
if filesystem > (disk if part is None else part) or (part is not None and part > disk):
return "Inconsistent stage input. Verify the observations."
if part is not None and disk - part > 1:
return "Partition is still at its earlier size."
backing = disk if part is None else part
if backing - filesystem > 1:
return "Filesystem has not used the backing capacity yet."
if filesystem < 75:
return "Layers agree, but the capacity target is not met."
return "Capacity target met in the model; verify the real app read."
with Path("capacity-stages.csv").open(newline="", encoding="utf-8") as data:
for stage in DictReader(data):
print(f"{stage['case']}: {assessment(stage)}")
PY
queued: Wait for the outer change and recheck.
disk ready: Partition is still at its earlier size.
partition ready: Filesystem has not used the backing capacity yet.
validated: Capacity target met in the model; verify the real app read.
whole-device: Filesystem has not used the backing capacity yet.
wrong path: Resolve the intended mount source before growth.
Check the first difference between successive records. At disk ready the only changed size is the disk. At partition ready the filesystem has not moved even though the partition has. The whole-device row still needs its filesystem change but has no partition to grow. The wrong path row stops immediately before using any capacity number. A capacity measurement from the wrong mount cannot validate the intended storage. Finish by explaining which evidence each fictional row supports and which actual data or application check remains.
Test one impossible input in a copy, such as a 90 GiB filesystem claimed directly on a 79 GiB partition in this simple model. The program indicates inconsistent stage input. A real guest may have a more complex relationship, such as aggregating multiple devices, so verify its actual layout instead of declaring a fault based on this toy rule. Your output is a worksheet, not a command sequence. Remove only your fictional CSV and copied script when the exercise is complete.
Lab two. Plan a sequence inside a moving modification window
Write four fictional modifications to the same volume at Monday 10:30, Monday 13:00, Monday 17:15 and Tuesday 08:00. Assume each completed, there are no other modifiers, and the resource is eligible. At Tuesday 09:00 all four fall within the preceding 24 hours. Crossing midnight did not reset the count. At Tuesday 11:00 the first event is outside the preceding 24 hours while the other three remain inside. This paper exercise demonstrates the arithmetic behind the documented limit and does not establish the actual service's decision for an account.
Now suppose the last request is still optimizing, though the guest sees the intended new size. AWS distinguishes when the current increase takes effect from when another modification may be submitted. The required guest operation may be appropriate after identity, backup and larger backing device are verified, while a new modification waits for completion and eligibility. If the app goal is already met by the current resize, no additional request is needed. Check the newest official service rules before making a schedule based on a classroom timeline.
Pick a more realistic way to avoid unnecessary retries. Record the job ID or volume and expected check interval. If the operation is still in progress, inspect its scoped progress and verify the source and requested size. Review elapsed time in light of its actual volume and performance settings. If a service quota or unsupported operation blocks the request, preserve its error evidence and choose a supported change with the owner. Indefinitely repeating a mutation to find a successful response can create conflicting jobs and charges. The read-only worksheet is enough to demonstrate this concept.
Work through a logical volume separately from simple partition growth
Think of LVM as a layer that manages capacity across block storage. A physical volume provides space to a volume group. The volume group allocates portions to logical volumes. A filesystem belongs on the logical volume backing it. The dairy can have an orders logical volume and a reports logical volume above the same group. Extending the outer EBS device does not decide which of those two should get the resulting capacity. That allocation is an application operating decision with potential consequences for both services.
Use a fictional allocation. The orders logical volume starts at 30 GiB and reports at 10 GiB. The group's initial free extents are already reserved by policy. A verified expansion brings roughly 40 GiB of newly available free extents after the relevant EBS, partition and physical volume steps. The order team asks for 25 GiB more logical capacity instead of consuming all the new extents. Allocate the approved 25 to the orders logical volume, leaving roughly 15 for later decisions. Then grow the existing orders filesystem and verify its usable result. Exact free extents and sizes in a real LVM group depend on geometry and metadata, so read the real reported values.
Another team says the group already had 30 GiB of unused extents. Ask if it actually needs an EBS size change. If the required increase can be allocated from already available, approved group capacity, extending the outer disk might be superfluous. Fresh EBS capacity and unallocated LVM capacity are separate resources. The promotion criterion is the expected filesystem capacity and app output under the intended logical volume. Commands such as pvs, vgs and lvs can support authorized inspection of those layers. Use the actual organization's LVM procedure, including special cases such as thin pools, RAID and other consumers.
Keep failure evidence local to the layer. A physical volume has grown but the logical volume did not. Check the group allocation and specifically which logical volume was selected. The logical volume grew but the mounted filesystem did not. Check the filesystem's type and actual device. The app writes to a different path. Review its runtime configuration and namespace. Copying a command sequence for direct ext4 onto any of those cases can choose the wrong device and still produce a plausible looking output.
Compare success and recovery evidence for root and data volumes
A data-volume experiment often leaves boot storage untouched, but it can still interrupt a production service when it changes the wrong filesystem. A root-volume operation can affect application journals, system boot, logging and any data stored on root. Treat each scope independently. Verify a stable recovery plan for boot settings and data required before replacing a root volume. If the root filesystem is at capacity, even a command needed for a corrective procedure can fail when it lacks working space. Plan a change well before the host can no longer log or create temporary files.
Root often has multiple partitions for boot, firmware or reserved purposes. A read-only storage inventory shows their sizes and mountpoints. The exact size of the filesystem's backing partition need not match the entire disk once it grows. Enabling modern partitioning for a very large root also requires compatible boot mode and boot software. A design to increase an old root across a limit in its layout or operating system might need a separately planned migration with recovery evidence. Do not attempt to convert an unsupported boot disk's partition table as a step inside a basic growth lesson.
The rollback plan should specify separately whether the chosen recovery point preserves boot, application and data consistency. Recovering an earlier data volume from a snapshot creates a new volume in the intended AZ. It can contain an earlier dataset and may not include writes after the snapshot. Switching a live app to it can therefore require reconciliation. Consider whether a narrower repair of the guest layout is preferable when it is authorized and safe. A completed size increase cannot be canceled into a smaller in-place device. Treat any actual recovery as a separately reviewed operation with a known path for verifying both storage and the user workflow.
For the data archive, define a representative check suitable for a production-like exercise. Verify an existing known order and report. Measure usable free space at the actual archive path as the intended service sees it. If the expansion goal was a 30 GiB headroom increase, state how you will compare free space within the same units and observation window. New writes during the procedure may change available space and performance. Preserve the measurements and actual source path. A successful df line alone has no evidence about whether the database still understands its data.
Check where the new space sits in an actual layout
Consider a page that shows a single number for each device. Two 80 GiB disks might both have an orders partition reporting 38 GiB. On the first disk, most remaining space is unallocated immediately after the partition. On the second disk, a reports partition sits after it, before the unused space. A partition cannot grow straight through the next partition just because the outer volume is large. Only the adjacency and the planned table layout show whether the simple growth procedure is appropriate. Inspect the current geometry with the authorized read tools and use a layout-specific strategy. The working application should keep all its original sectors and data.
Partition tooling works at represented sector boundaries, while application worksheets often use friendly GiB. The two units aren't directly interchangeable. There can be start offsets, aligned endpoints, firmware partitions and small reserved regions at each end. The simplified fixture deliberately rounds those away. In a real decision, record the parent size in bytes, physical and logical sector context as needed, and the selected partition's start and end under the platform's inspection. A safe output should show that the selected partition's capacity grew without a surprise change to neighboring partitions. Confirm the running kernel sees the updated capacity before the filesystem operation.
If there is not a straightforward way to extend the relevant partition, identify which storage redesign the service can support. A separate data volume can be an alternate place for a specific dataset. An already configured logical-volume architecture might be extended according to that architecture's documented capacity plan. A major repartitioning of the active root filesystem is a fundamentally different operation and can change boot and recovery. Decide with the application's data owner which option meets the scheduled increase and protects existing records. Do not mix a migration plan with the teaching fixture's mechanical step order.
Measure working room as well as the new total
The app asks to write a new forty GiB file during next month's import. The storage worksheet says the filesystem grew from 38 GiB total to 78 GiB total, but 33 GiB are in use. Simple subtraction of those rounded figures suggests around 45 GiB before other allocations. The app might not actually have 45 GiB: the tool's displayed availability already accounts for the filesystem's rules, and quotas or a producer's service context can affect allocation. Inspect the actual free space and establish its scope. Decide how much safety room local temporary files, concurrent writes and monitoring require. The ordinary output's 78 GiB total is only one ingredient in the decision.
If the import writes a staging file and then a final file at the same time, temporary peak use can exceed the size of the final deliverable. A destination filesystem can be large enough for direct storage yet insufficient for the planned workflow. Trace which job writes where and what files coexist at the peak. Prefer representative workload evidence at a safe scale rather than deliberately filling a real production filesystem. A newly grown volume is useful only after the application sees the intended mount, correct existing records and enough usable headroom for the whole planned operation. Record the constraint separate from how AWS reports the outer size.
Submit a growth plan from a short incident ticket
The workshop supervisor says, “Console shows 80, Linux shows 40, the order import is tomorrow, and I can no longer rotate a log.” Build a table for AWS size, guest block size, partition size if any, logical volume if any, reported filesystem capacity and application headroom. Capture identification and purpose first. Decide how you would test a low-space cause on the working filesystem used by the tool. Write which observation would support extending a partition and which would support fixing a missing mount. Do not propose deleting records as a general way to make temporary space.
For a second answer, assume the orders application uses a whole-device ext4 filesystem. Explain which parts of the root diagram can be skipped and which checks remain. For a third answer, suppose the disk is used by LVM and both the orders and reports logical volumes need future room. Plan where the additional extents should be assigned. State how each choice would leave evidence that the intended mount and expected synthetic order still work. A tool that changes a correct layer of the wrong volume is still a serious incident.
Finally, define the recovery objectives and conditions that stop a change. Examples include a missing expected EBS ID, a different filesystem type, an unproven backup or a logical layout the assigned procedure does not cover. Do not let an old expectation for specific NVMe numbering decide whether a target is correct. Select a read-only check to resolve each uncertainty. On the paper lab, mark all three outcomes and write the commands or tool observations that would verify each had it been an approved real environment. Actual output should be distinguished from the expected data in the worksheet.
Explain the resize decisions in an interview
Why can the console show a larger disk while df shows the original size?
They observe different layers. The console describes provisioned AWS capacity. The guest block device may see that capacity, while its partition, logical device or filesystem still uses the old size. The app might also use a different mount. Check the exact source and layer sizes before selecting the approved guest step.
When may the guest start growing its filesystem?
AWS says the larger EBS size takes effect once the modification reaches optimizing. Verify the guest sees the increased device and that every required backing layer, such as its partition or logical volume, has grown. Then use the filesystem's supported procedure. Submitting a second EBS modification still waits for the first to complete and applicable limits.
What is the difference between a growpart and resize2fs argument?
growpart selects a verified parent disk and the relevant partition number as distinct arguments. resize2fs receives the block device that contains the ext-family filesystem. That could be a partition, a whole disk or a logical volume. In the AWS XFS example, use the verified path where the XFS filesystem is mounted instead.
What should you do if the new quota is unavailable despite a larger filesystem?
Compare whether the app sees the same mount, the expected free space and any user or project quota or inode limit. Capacity, available blocks and application allocation policy are distinct. A storage increase gets full credit only when the intended operation has enough usable capacity and still sees the correct data.
How could you get a smaller EBS volume after overprovisioning?
You cannot reduce its capacity through Elastic Volumes. Plan a separate smaller compatible volume and an appropriate data migration. Verify scope, app consistency, capacity and the restored or copied data before moving traffic. Creating from a snapshot has its own source-size constraint and is not a general shrink method.
Test the sequence before making a change
The guest knows the disk is 80 GiB but the mounted filesystem still uses its original 39 GiB partition. What should be checked first?
Show answer
Verify the exact partition and its layout and whether it can be safely extended. Growing the filesystem cannot use capacity its backing layer does not expose.
The ext4 filesystem lives directly on the verified disk. Which layer is absent?
Show answer
There is no partition to extend. Use the approved ext4 growth procedure on its actual backing device after the outer capacity is ready.
Cloud status is optimizing. Does this permit an unrelated second modification of the same volume immediately?
Show answer
Keep the operations separate. The size can be available for appropriate guest growth at optimizing, but a second modification needs the previous one completed and quota eligibility.
Two disks show the same size. Can you select a fixed NVMe name from this lab?
Show answer
No. Match the known EBS ID to guest identity and the intended partition or filesystem. Device numbering can vary.
The process's target directory exists but is backed by root when a data mount is expected. Is a capacity increase for the observed path evidence of a correct data volume?
Show answer
Resolve the incorrect mount first. The reported capacity comes from a different filesystem and cannot validate the planned data storage.
Revision cards
- Outer size
- Elastic Volumes changes the AWS block device. Check that the guest sees it at the expected identity.
- Inner layers
- Check only the actual partition, logical volume and filesystem layers. The application uses its selected mounted path.
- Optimizing versus completed
- The size can take effect at optimizing. A later modification requires the prior one completed and applicable rolling quota.
- Filesystem tools
- Use the supported operation for the observed type and backing device. XFS in this example is grown through its mounted path.
- Recovery
- Have a usable backup and retain source identity. A snapshot restore makes another volume and reflects its own point in time.
- Measure the result
- Compare usable space at the app's real path and verify the expected data. Display rounding can differ from provisioned capacity.
Official references
- Elastic Volumes size and rate rules, modification progress and supported OS and instance requirements
- AWS filesystem extension procedures and inspect current modification
- Canonical growpart and cloud-init modules
- resize2fs, xfs_growfs, pvresize and lvextend
- lsblk device tree, findmnt mounted source and restore an EBS volume from a snapshot