Ravindra BagaleCourses & study guides मराठी Track your progress

Chapter 13: Amazon EBS (Elastic Block Store)

AWS Cloud

13.6 Adding a new EBS volume

An attached EBS volume appears as a block device. On Nitro Linux, verify the NVMe disk identity. Prepare an approved blank target or preserve an existing filesystem from a restored volume, then verify the mount.

Goal: plan a 10 GiB gp3 data volume and its associated application mount. Use the local scenarios for verification.

Step 1 — Find the instance's Availability Zone

In an already assigned region, find the exact instance and record its Availability Zone in EC2. A descriptive CLI check can select the same information.

aws ec2 describe-instances --region "$LAB_REGION" --instance-ids "$LAB_INSTANCE_ID" --query "Reservations[].Instances[].Placement.AvailabilityZone" --output json

Step 2 — Create the volume (same AZ!)

In an approved plan, choose the correct AZ, size, type, source and applicable encryption policy. Record the returned volume ID and wait for the appropriate attachment state.

Step 3 — Attach it

Only the verified assigned volume should attach to the chosen same-AZ instance. Record the requested mapping and verify the real attachment state afterward.

Step 4 — Identify the new disk

lsblk -o NAME,TYPE,MODEL,SERIAL,SIZE,FSTYPE,UUID,MOUNTPOINTS
NAME          MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
nvme0n1       259:0    0   20G  0 disk
└─nvme0n1p1   259:1    0   20G  0 part /
nvme1n1       259:4    0   10G  0 disk                 ← example device without a listed mount; inspect its actual identity and content

Check the known volume origin and match its guest identity. Inspect its actual filesystem or partition evidence with authorized read-only tools.

lsblk -o NAME,TYPE,FSTYPE,UUID,MOUNTPOINTS VERIFIED_EBS_DEVICE

Formatting changes filesystem metadata

Formatting a disk that already contains data (for example a volume restored from a snapshot) destroys that data. Only run mkfs on a new empty volume, and double-check the device name.

Step 5 — Create a filesystem

# Approved blank-layout example only:
mkfs.ext4 VERIFIED_EMPTY_TARGET_DEVICE

Step 6 — Create a mount point and mount

# Approved mount shape with verified inputs:
mount VERIFIED_FILESYSTEM_DEVICE VERIFIED_OWNED_MOUNT_PATH

Step 7 — Review persistent mount settings

A running mount and persistent boot configuration are separate. For an approved fstab entry, verify unique source identity, target, filesystem type and boot behavior.

# Fictional ext4 example for review:
UUID=4cb9b688-b268-49a1-9b76-ddf366557ad8 /srv/dairy-reports ext4 defaults 0 2

Validate the candidate configuration against the actual target. Test only the approved mount and check the application dependency, without affecting unrelated mounts.

findmnt --verify --tab-file APPROVED_CANDIDATE_FSTAB
findmnt --mountpoint /srv/dairy-reports -o TARGET,SOURCE,FSTYPE
fstab field Value Meaning
1 device UUID=... Stable identifier — survives NVMe renaming
2 mount point /data Folder where the disk appears
3 type xfs / ext4 Filesystem type
4 options Options chosen for required or optional mount policy Apply the intended boot policy and independently check required app storage.
5 dump 0 Legacy backup flag
6 fsck order 2 Typical non-root ext4 check example. Select the correct field for its actual filesystem and policy.

Why nofail matters

Decide whether the filesystem is optional for startup. A boot option can allow a host to continue without the mount, so separately verify which application operations require the right mounted source.

Step 8 — Use it

findmnt --target /srv/dairy-reports -o TARGET,SOURCE,FSTYPE,OPTIONS
df -hT /srv/dairy-reports

Common uses: move MySQL data (/var/lib/mysql), website files, logs or backups onto a separate volume so they survive root-volume problems and can be snapshotted separately.

Ravindra Bagale's Tip

Retain the original configuration and use a verified unique identifier. Check the assigned mount and the writer’s requirements separately. Choose optional boot behavior only when the deployment calls for it.

Lab

Use the local attachment and persistent-mount worksheets to distinguish a new blank target, a restore and an unexpected source. Compare their expected verification results.

Choose and attach the verified resource, preserve or prepare its filesystem, then check the intended source and service path. The next lesson covers detachment.

Add a place for daily reports while keeping the current orders safe

Mauli Dairy wants a dedicated location for the reports generated after deliveries. Today the files share the instance's root filesystem with its operating system. The team expects the reports to grow and wants their capacity, permissions and retention to be easier to manage. Adding a separate EBS volume can provide a distinct block device for the service. The change has a cloud side and an operating system side. A new volume must attach to the right instance, then the guest must expose the correct filesystem at the path the report service uses.

Start by writing down what belongs there. The report workers need to open their known directory and write generated files. The data already stored on the root stays where it is unless a deliberate migration is in scope. If key data is moved, the application needs a controlled write pause or a supported migration procedure so the two copies cannot diverge unexpectedly. A new path grants no automatic access to the service account. The team must create the supported filesystem and authorized directory layout, then validate representative files under the same identity and service context that will actually use them.

Decide whether the target is a newly provisioned empty volume or a restore that already contains a filesystem. Both are described as newly created EBS resources. Their original content is different. A snapshot-based volume can contain essential records, a partition table and filesystem metadata from its source. Formatting it during attachment would overwrite the structure the team intended to read. A newly provisioned empty volume may lack any recognized filesystem. Use the cloud creation source, device identity and guest signatures as separate evidence before choosing either path. Size, a new device name and absence from the mount list cannot decide that on their own.

Choose the target Availability Zone, volume settings and ownership

Volumes ordinarily attach to an EC2 instance in the same Availability Zone. Start with the instance information for the exact assigned target, not an AZ copied from a tutorial. Region and AZ are different scopes. A standard regional snapshot can restore into a selected AZ in its Region, but the resulting volume is still zonal. If you plan to create a new blank volume, select the intended AZ when creating it. In a more complex deployment, a restored copy can need other checks for destination placement, size, support and access. Map the new volume's ID to the approved instance and maintain that identity as the rest of the change proceeds.

Select a volume type and size based on the feature that needs the data. A hypothetical lab plan can use 10 GiB gp3. The actual available filesystem capacity will be smaller or otherwise differ according to its layout and metadata. Provisioned performance settings add their own constraints and costs. Choose applicable encryption settings and the approved AWS KMS key according to account policy and source encryption. Encrypted volume recovery and attachment depend on the relevant configured permissions. A choice you can see in the console may be determined by account defaults rather than an unrestricted checkbox. Record the actual result rather than assuming every configuration uses the same default.

Confirm the instance's supported attachment limit. The limit can depend on instance family and size, and some Nitro types share attachment capacity with other devices. A volume in the right AZ can still fail to attach when its instance has exhausted the applicable limit. Read the scoped error and current attachment state rather than creating more disks to retry in a loop. Plan the new volume's tags and owner together with the expected lifetime. Set its retention and delete-on-termination behavior according to the approved training or service purpose. An unattached or unused provisioned volume can still incur storage charges independently of its attachment.

Use a concise change sheet. Record the account and Region, intended instance and AZ, resource ID when created, expected cloud source and encryption, chosen static application path and each owner. Mark whether a data migration is expected and what result will prove it. The volume should be in an acceptable state before attachment. The guest interpretation after attachment is a separate job. This lesson's offline worksheet exercises the whole selection without producing paid resources or changing an instance.

Prove which disk was attached and what it already contains

During the authorized attach operation, the API or console asks for a device mapping name. Nitro-based Linux normally shows attached EBS disks as NVMe block devices. The requested name and current OS name can differ. Identify by expected EBS volume ID and guest serial, not by the name of the most recently seen device. Observe before and after states if that is part of the authorized plan. Then read the device tree to see any partitions, filesystem types, UUIDs and mountpoints. In the attachment evidence expect the approved target, ID and state. A valid cloud attachment is necessary, but it does not imply the filesystem is mounted.

lsblk -o NAME,TYPE,MODEL,SERIAL,SIZE,FSTYPE,UUID,MOUNTPOINTS
findmnt --mountpoint /srv/dairy-reports -o TARGET,SOURCE,FSTYPE,OPTIONS
findmnt --target /srv/dairy-reports -o TARGET,SOURCE,FSTYPE,OPTIONS

Use these read-only Linux checks with an already assigned guest and existing path. The last command answers which filesystem supplies the path. The exact mountpoint query answers whether a filesystem is attached right there. If the path is missing or belongs to another context, the observations can fail or describe a different filesystem than the operator expected. Confirm the service and owner namespace. No need to change a mount to see whether the directory you prepared is already in use.

For signatures, inspect only the assigned and verified device or the exact child which traffic should use. lsblk, a scoped blkid probe and the operating system's supported tools can observe common metadata. A file-identification command printing data means that probe did not recognize the content. It is not proof that existing bytes are disposable. An empty UUID column can also reflect an unexpected layout, an unreadable device or discovery that has not settled. Format only when the resource's proven origin and intent designate it as a new empty target, the guest identity matches, and the authorized procedure confirms no existing data should be preserved.

ClueWhat you knowReasonable next step
Newly allocated empty EBS, correct ID, no existing signaturesThere is evidence to plan formatting the verified blank target.Review the authorized layout and filesystem before proceeding.
Restored from snapshot, ext4 partition is presentThe target already carries filesystem data and metadata.Check the supported mount and identity, preserving the restored data.
Console volume attached, but serial or layout unexpectedThe cloud request is separate from the guest observations.Reconcile the exact identity and stop guest mutations.
No mount is shown for a known filesystemIts filesystem can exist even when unmounted.Verify its expected use and the safe target path.

Choose a filesystem and mount only after identifying the target

For a simple empty data device, the team's design might create a filesystem directly on the block device. Other deployments use a partition and put the filesystem there, or add a logical-volume layout. Choose the storage design deliberately. It determines which object has the filesystem UUID and which block device or mount point a future resize tool should use. Consider supported layout and partition limits for the operating system and planned capacity. A fixed default copied from a distro example can choose the wrong filesystem or root partition.

Creating a filesystem with an mkfs tool writes new metadata. It changes the verified target and can destroy access to previous data. The guest-side concept is straightforward: create an appropriate filesystem on only the approved blank target, then mount that filesystem in the desired directory. For a restore, the existing filesystem is what you want to inspect. Use the documented read and mount options for that recovery. The examples below show argument roles only. They cannot run as supplied and are not needed for the offline exercise. Select active commands from the platform procedure after the owner has verified the intended layout and data.

# Illustrative shapes, with required verified input names:
mkfs.ext4 VERIFIED_EMPTY_TARGET_DEVICE
mount VERIFIED_EXISTING_FILESYSTEM_DEVICE VERIFIED_OWNED_MOUNT_PATH

A mountpoint is a directory in the guest's tree that becomes the entry to a filesystem. Mounting another filesystem there hides that directory's prior files while it is mounted. Testing over a busy directory can hide live files and confuse application write paths. Before mounting a new filesystem, choose an approved path with appropriate clean scope, then verify any required switchover. For the reports example, the service should explicitly use the newly verified mount rather than quietly continuing to write to its root-side directory. Follow its deployment procedure to stop concurrent writes during an actual move.

Verify the actual result before assigning write permissions. The namespace, mount, filesystem type and configured path should match the design. Assign access to the approved service identity or a narrow group, with a minimal owned subdirectory when possible. Changing the whole volume to the administrator's login account isn't a general solution. Read a known synthetic marker and, for an approved writable exercise, create and read a harmless artifact under the intended service account. Confirm both permission and path. If a marker accidentally appeared in a fallback location on root, that is not evidence that the new volume is usable.

Make the new path durable across service and host startup

Mounting a device in a running Linux session and recording a persistent mount are separate. The mounted state is visible in the kernel and tools such as findmnt. A persistent setting describes how it should be mounted on a subsequent start, often through /etc/fstab or a supported mount unit. If the file and current state don't match, an authorized boot or service activation can produce a different result from the manual exercise. Prepare the persistent configuration as its own reviewed change. Retain the original configuration for recovery, and make and test only the assigned entry.

A typical fstab entry has a source, destination, filesystem type, options and dump and check settings. Use a suitable stable source identifier based on the observed filesystem or partition according to the layout. On a simple unique ext4 filesystem, the UUID can survive renumbering. It can be copied by a block-level restore, so check for duplicates among relevant visible volumes. Make sure the path and data ownership agree with the service configuration. Pick boot behavior carefully. A report cache with an alternative temporary location can be optional. A sole authoritative orders path needs its own verified dependency before its writer runs.

# Illustrative ext4 entry for this worksheet; the UUID is fictional:
UUID=4cb9b688-b268-49a1-9b76-ddf366557ad8 /srv/dairy-reports ext4 defaults 0 2

The final numeric fields have separate purposes. The first is the traditional dump option. The next configures the intended filesystem check order through the platform tools. The 2 is a common example for a non-root ext4 volume and does not choose a device. Choose the appropriate value for your actual filesystem and platform. A filesystem with its own boot-time check policy may use different settings. Do not use a handwritten template to change all existing mount records or to decide the entire service dependency model.

A nofail option can make the mount nonessential to boot according to the relevant platform's mount setup. That sometimes helps administrators reach a host when an optional disk is missing. It cannot ensure the application sees the intended disk. If a report writer would create missing directories and keep writing on root, an optional mount can conceal a dangerous fallback. Check how the service controls its startup. On systemd, supported mount dependencies can explicitly order the service after necessary configured mounts. Add a check of the actual source and expected data when the app must use one particular volume. Useful recovery behavior can keep the machine reachable without starting the writer on the wrong filesystem.

Use an approved parser or verification command appropriate to the system. For util-linux, findmnt --verify --tab-file can check a candidate fstab file in the assigned context, including its parsability and usability checks. An offline sample with imaginary UUIDs may not be usable on a live system. Validate a configured entry against the actual selected device and mount policy. If a live verification is assigned, scope mount actions to your approved path; a command to mount all entries can affect others unrelated to the change. Systemd-based setups can need an appropriate configuration reload after fstab edits. An ordinary development lab does not need a machine reboot to explain any of these distinctions.

Lab one. Decide what to do with fictional attachments

Save the following CSV as attachments.csv in an empty local scratch folder. The values are invented, including short labels instead of actual AWS IDs. A row can describe a validated blank plan, a known restore, a cross-AZ mismatch or evidence that needs review. The outcome must reflect the intended cloud source and guest observation together. In the model each activity is separate, and no actual disk, filesystem or EC2 resource is changed.

case,instance_zone,volume_zone,cloud_origin,device_match,guest_signature,app_mount
new reports,A,A,verified-empty,yes,none,none
restored reports,A,A,snapshot,yes,ext4,none
zone mismatch,A,B,verified-empty,yes,none,none
unknown source,A,A,unknown,yes,none,none
wrong guest,A,A,verified-empty,no,none,none
unexpected signature,A,A,verified-empty,yes,xfs,none
ready mounted,A,A,snapshot,yes,ext4,intended
wrong mount,A,A,snapshot,yes,ext4,other

The cases are stages in a decision, not a disk-manipulation recipe. For the zone mismatch label, both zones can be inside the same Region and the mismatch still prevents normal attachment. An unknown source with no signature is the more important case. We have not established that the bytes can be discarded. An unexpected signature in the positively new origin case also pauses the work. Either the observation or the intended source may be wrong. A compatible mount and known provisioning record are positive evidence required for the next decision.

python3 - <<'PY'
from csv import DictReader
from pathlib import Path

def review(row):
    if row["instance_zone"] != row["volume_zone"]:
        return "Resolve the Availability Zone mismatch."
    if row["device_match"] != "yes":
        return "Resolve the guest device identity."
    if row["app_mount"] == "other":
        return "Resolve the mounted source before writing."
    if row["app_mount"] == "intended":
        return "Verify filesystem and app evidence on the intended mount."
    if row["cloud_origin"] == "snapshot":
        return "Preserve and inspect the restored filesystem."
    if row["cloud_origin"] == "verified-empty" and row["guest_signature"] == "none":
        return "Review the authorized blank-target filesystem plan."
    return "Stop and reconcile the source or unexpected signature."

with Path("attachments.csv").open(newline="", encoding="utf-8") as source:
    for entry in DictReader(source):
        print(f"{entry['case']}: {review(entry)}")
PY
new reports: Review the authorized blank-target filesystem plan.
restored reports: Preserve and inspect the restored filesystem.
zone mismatch: Resolve the Availability Zone mismatch.
unknown source: Stop and reconcile the source or unexpected signature.
wrong guest: Resolve the guest device identity.
unexpected signature: Stop and reconcile the source or unexpected signature.
ready mounted: Verify filesystem and app evidence on the intended mount.
wrong mount: Resolve the mounted source before writing.

Predict the first mismatched clue for each case and compare with the output. The lab intentionally returns an instruction to review the plan even for the positively verified empty case. A fingerprint or absence of one does not authorize a mutation. The mounted case receives a recommendation to verify meaning even though its simulated source agrees. Run the fixture in your own directory only. If a result differs, compare the case fields and order of the checks. The script has no AWS client, reads a local CSV only and exits after printing its observations.

Now change the restore's signature to none in a copied worksheet. Its origin still says snapshot, so the supported next step is preservation and investigation. The tool cannot interpret every filesystem, volume manager or encryption layer. An unreadable filesystem can be more important than a recognizable easy one. Similarly, change the known blank record's mount to other. The app path is then pointing elsewhere and no size or provenance assertion should proceed to writes. Return the test data to its original state or remove only the scratch directory you made.

Lab two. Review a persistent mount entry against a fictional inventory

This walkthrough needs Python 3 and uses strings inside one process. It does not read or write the real fstab file. Three proposed lines select a stable source for the illustrative report path, reference an older duplicate and accidentally omit the required path. A fourth would be reasonable only for a mount whose optional policy has been explicitly approved. The script models a narrow simple case with no spaces or special escaping in the mount field. It is not a general fstab implementation or a replacement for platform validation.

python3 - <<'PY'
filesystem_counts = {
    "4cb9b688-b268-49a1-9b76-ddf366557ad8": 1,
    "76fdf4f0-72c7-42f7-a4f7-e6518a38e2d4": 2,
}
scenarios = {
    "expected": "UUID=4cb9b688-b268-49a1-9b76-ddf366557ad8 /srv/dairy-reports ext4 defaults 0 2",
    "cloned UUID": "UUID=76fdf4f0-72c7-42f7-a4f7-e6518a38e2d4 /srv/dairy-reports ext4 defaults 0 2",
    "wrong location": "UUID=4cb9b688-b268-49a1-9b76-ddf366557ad8 /srv/dairy-old ext4 defaults 0 2",
    "optional flag": "UUID=4cb9b688-b268-49a1-9b76-ddf366557ad8 /srv/dairy-reports ext4 defaults,nofail 0 2",
}

def inspect(entry):
    fields = entry.split()
    if len(fields) != 6:
        return "Check field count for this worksheet."
    source, target, fstype, options, dump, check_order = fields
    if target != "/srv/dairy-reports":
        return "Wrong target path for this service."
    if not source.startswith("UUID=") or filesystem_counts.get(source[5:]) != 1:
        return "Expected one eligible filesystem for this UUID."
    if fstype != "ext4":
        return "Verify the filesystem type."
    if "nofail" in options.split(","):
        return "Verify optional boot policy and a separate writer guard."
    return "Worksheet fields agree; verify actual source and app."

for scenario, proposed in scenarios.items():
    print(f"{scenario}: {inspect(proposed)}")
PY
expected: Worksheet fields agree; verify actual source and app.
cloned UUID: Expected one eligible filesystem for this UUID.
wrong location: Wrong target path for this service.
optional flag: Verify optional boot policy and a separate writer guard.

Read the result before imagining the live scope. A UUID value can be well formed and still identify two copied filesystems. Correct fields in the configuration do not establish that Linux mounted it, that the intended service will use it, or that the mount holds the right report. In this fictional exercise the known ext4 type is judged against its intentionally selected layout only. A real fstab can contain managed pseudo-filesystems, complex escaping, network storage and other cases. Use its documented validation and ensure all related application dependencies work before activating a change.

Draw the next records you would collect for each scenario. An acceptable case needs proof of the actual mount and read or write by the assigned service. A cloned UUID needs stable AWS identity and a suitable isolated recovery approach before choosing a source. A wrong target needs review of the deployed app's configured path and the intended mount. An optional flag needs a decision about which user operations should be available with missing storage. This interpretation is the completion criterion. Remove no system configuration files to clean up a dry run.

Verify permissions using the same service identity that writes reports

After mounting a verified filesystem, the owner and permission information at the path comes from the mounted filesystem, in the guest's normal model. Before the mount the same path names an ordinary directory from its parent filesystem. The underlying directory's owner can differ. A learner may prepare the directory with the desired ownership first, then see the new filesystem's root owned differently after mounting. That is normal evidence that the path's backing source changed. Check precisely which created subdirectory should be writable inside the mounted storage and which files should keep existing ownership.

For the reports example, prefer giving the application account write access only to the expected reports directory. Leave root and configuration ownership within the existing approved operator scope. A working test as an administrator does not prove the dedicated writer can write and read its own outputs. Use an authorized simple report under the service identity with synthetic content and a distinct acknowledgement. A familiar hello file written as the login account into a directory whose source nobody checked is poor evidence. Verify the source first, write in the approved small scope, read the marker, then record the owner and intended retention.

Similar considerations apply when an app runs inside a container or under service sandboxing. The host may mount the filesystem at one path and supply it to a container at another. An operator who checks the host mount is testing one boundary. A worker running in its own mount namespace may see a different source or mode. Inspect the deployment's authorized binding and permissions in the context that actually produces reports. If the guest mount is correct but the app cannot write, inspect its scoped filesystem permissions, readonly binding or policy evidence before changing attachments. Restoring broad write permission can mask a missing scoped access rule.

Keep records of the exact changes and authorized owner. If a service was paused to move data, verify its ready state and expected retention before resuming writers. A service can start successfully and still use the old configured path. Check the actual destination of a representative new result from the selected account. If recovery needs to exclude private information, use synthetic record IDs or sizes in the shared evidence. Finish with the system's mounted-source result and an application-level statement such as report rehearsal returned the expected date and file from the intended service storage.

Separate adding storage from moving an existing dataset

The simplest case starts writing new disposable exports to the new path while leaving old exports alone. Moving the only order database is different. Plan where the existing files, journal and configuration live, which process currently writes them, and when the new location should become authoritative. A database's documented migration or backup procedure may be needed to manage live writes and consistency. Copying files from a running state can miss transactions or leave a mixed snapshot of related files. Decide what acceptable downtime or replication plan the data owner requires. Start with a recovery point that can be tested.

One controlled approach is to prepare the new storage and verify its available space, stop writes using the application's procedure, move or restore the data with the supported method, then validate the new copy before changing traffic. Some services support incremental migration or replication that can shorten the paused window. Those are deliberate application-level choices. A new file appearing on the destination does not prove the application can use it, and a directory that looked empty before the mount may hold hidden root-side data after it. Inspect original ownership and expected content before arranging an actual cutover.

A handover should state which writer can accept work after the cutover and which path is retained for rollback. If the new app starts writing and the team then switches back, the original copy may no longer have the newest records. Treat rollback of configuration and reconciliation of data as separately planned tasks. Verify known sample records and representative service work after either choice. Where read-only evidence is all the training assignment needs, use the prior local snapshot and storage fixture to demonstrate independent copies. It cannot measure a live database migration but can teach how to distinguish the current and earlier states.

Do not retire either storage resource until the data owner confirms its role. A separate EBS volume can protect an intended data path from accidental root replacement if its retention and backup were designed, but a shared instance or AZ can still affect both. Plan future snapshots, monitoring and use of the new path. Schedule a sample restore or review with the next learner. A successful addition is the start of its operating life. It creates a storage capacity relationship that needs an owner, cost history and backup assignment, even when the first few reports do not occupy much room.

Locate the failed step using an attachment and mount checklist

Suppose the instance does not appear in the expected attach selection. Compare the instance's Region and AZ with the volume and read its current status. Check compatibility, mapping availability and the attachment limit for that approved instance. Permission to see a resource does not necessarily include permission to use it. A missing choice may also reflect the wrong console region or operator role. Observe the exact failure and ask the responsible owner before queuing more work. The local worksheet illustrates an AZ mismatch without provisioning anything.

When the cloud attachment exists but the guest is missing its expected disk, confirm the selected instance and the guest's current device discovery. Compare the EBS ID with the observed serial and use the supported OS tools. The user interface's chosen mapping may look different from the actual device name. Allow normal discovery and verify metadata when needed rather than adding partitions to make a disk appear. If the disk is visible but findmnt does not show the intended mount, revisit filesystem and persistent configuration evidence. A reported raw device does not make that filesystem visible to an app automatically.

There are two useful categories of no-space report. If df for the intended mounted path shows insufficient available space, review actual volume layout and expected data growth. If it shows enough space under the observer, determine whether the app reaches that same mount and whether the service account has a relevant quota or permission limit. A failure while mounting means something different from an app unable to open its reports. Keep the respective messages and exact target in the handover. Ask both the host and application owners to verify the service context, rather than trying to make all conditions true by attaching an extra volume at random.

Use the release criteria as separate rows. Cloud resource exists with planned ID, AZ and encryption. Authorized attachment maps to the intended instance. Guest storage identity and verified filesystem match. Actual mount source supplies the service directory. Persistent startup configuration suits the use. A known report appears under the intended writer's scope. Retention, monitoring and recovery ownership are recorded. If any row is missing, report that exact unresolved step. A diagram of the row order gives a learner a clear starting place when their observation changes after a reboot.

Preserve an existing filesystem while proving a restored copy

Suppose staff need to inspect one report from last month. A volume restored for that purpose should be treated as data-bearing even when you just made the AWS resource. Put the new ID, source snapshot and target instance in the request. Select isolated inspection to protect the live service's mount and writer. Then identify the restored disk and any filesystem or partition it already carries. A restored filesystem can have the same UUID as one already visible on a recovery host. If the selector is ambiguous, use the platform-specific approved recovery procedure or an appropriate separate inspection environment.

Understand what read-only protection means at each layer. An application configured to read from a path can leave the operating system free to change its filesystem metadata. A filesystem mounted read-only restricts ordinary writes through that mount, but certain filesystems and states can still cause mount-time changes such as journal replay. Linux's mount documentation gives ext3 and ext4 journal replay as examples. If the evidence must be preserved without device writes, follow the documented and authorized storage and filesystem procedure for that requirement. Do not invent a generic mount flag for all filesystems or overwrite the only copy to make it readable.

Verify the report with the correct reader and scope. If the new volume contains the expected old report and the original service still reads the current one, record both. Choosing the earlier data point is useful when recovering a historical result even while production continues. It does not make the older report current. Do not point the live writer at that restored disk just because the test report appeared. Add the approved retention and cleanup decision for the temporary restored volume, and keep the original recovery point protected.

Compare the selected cloud attachment with the guest path on paper

Use a managed inventory for any already assigned example. Select the exact EBS ID and Region in the console or a read-only AWS CLI check. Record the target placement, attachment mappings and whether a snapshot was the creation source when the metadata provides that evidence. An empty snapshot field isn't proof the volume stayed empty after creation. Ask the resource owner how it was used and what should be preserved. The result should align with the intended EBS disk and approved guest observations before you choose the blank-volume case.

aws ec2 describe-volumes --region "$LAB_REGION" \
  --volume-ids "$LAB_VOLUME_ID" \
  --query 'Volumes[].{Id:VolumeId,Zone:AvailabilityZone,State:State,SourceSnapshot:SnapshotId,Encrypted:Encrypted,Attachments:Attachments}' \
  --output json

Use distinct milestones in that record. An available volume is ready for attachment, not an accessible application directory. An attachment can be in use without a prepared filesystem or valid mount. A mounted filesystem can still have a missing required subdirectory. A prepared subdirectory can have access limited to another account. A known report under the correct service identity is the final functional observation. If the approved lab doesn't include an existing AWS resource, work through the fiction with the same sequence and label the difference. For a paper solution, specify which test would prove each future live claim before authorizing a change.

Plan an authorized addition and challenge a teammate’s design

Write an example change note for the dairy's 10 GiB report target. Identify the fictional instance, AZ and resource name. Decide whether to request a new blank disk or restore existing reports. In the blank case, list the positive evidence needed before preparing a filesystem. In the restore case, plan verification of the expected record using a separate scope and explain how a duplicate UUID could appear. Your final app path should have a matching verified source, and your plan should name who can write to it.

Add a maintenance scenario with the new disk missing after boot. For an optional disposable cache, explain how the host and application should behave and how work resumes. For a required export source, choose a service startup guard that verifies its data source and fails in a way operators can diagnose. Your answer should explain why machine startup and correct app data are separate requirements. It's possible to keep the host operational so the operator can fix an attachment while preventing the app from writing on root. Notice that the same mount rule can have different effects in different application designs.

Ask a teammate to inspect your final evidence list. They must identify the expected report, mount file plan, durable identity and what to restore if the setup fails. Make sure none of your expected fields assume the console path becomes a fixed guest NVMe path. Be explicit about which outcomes were fictional and which were observed using existing authorized resources. A good worksheet can be repeated by another learner using only the local fixtures and contains enough approved checks to guide a later real deployment.

Write one sentence explaining how you know the original order path stayed safe. The attachment plan should identify original and additional resources independently. A test on the report mount should not move the old root-side directory, change production configuration or delete the original snapshot. The narrower evidence is both the unchanged known original result and the new report on the intended mount. A worksheet can preserve those separate before-and-after observations using only synthetic labels.

Answer the most common questions about adding a volume

Why must the data volume match the instance's Availability Zone?

An ordinary EBS volume is zonal, and it can attach to compatible instances in its own AZ. Region matching alone is insufficient. If the data must appear in another AZ, plan an authorized separate volume from an appropriate regional snapshot in the target location.

Why can a newly created EBS volume already contain data?

The creation can have used a snapshot. The resource has a new ID, but its restored blocks include the source filesystem and data. Check the verified origin and current guest layout. Formatting should only apply to an approved, positively identified blank target.

Where should the mount point come from?

Choose an approved directory tied to the application's configured storage path. Verify whether files are already in the directory and what backing source it currently uses. Mounting a new filesystem changes which contents are visible there. The service should verify that its configured directory actually uses the intended device.

What does an fstab UUID protect against and where does it fail?

It can keep the mount source stable when Linux changes its transient disk enumeration. A snapshot restore can copy the same filesystem identity onto a different EBS device. Check unique scope and match the actual resource before relying on it as a stable selector.

Why should nofail be considered alongside service startup?

It can let a host boot even when its optional mount fails, depending on platform behavior. A required application path may still need a mount dependency and meaningful identity check before writes. Decide separately whether the machine can boot and whether an app can safely start without its data.

Check the provisioning and mount decisions

  1. The source says snapshot and the device has an ext4 signature. Which path should you choose?

    Show answer

    Preserve the existing filesystem and use the approved restore inspection and mount procedure. A new EBS resource ID does not make its data blank.

  2. The new volume and instance are both in the same Region but different AZs. Can they attach?

    Show answer

    The actual volume and target instance must share an AZ. Correct the plan for a separately suitable target or authorized volume.

  3. The path exists but the mountpoint query returns nothing. Can the app read the new volume through it?

    Show answer

    Its directory may still live on the parent filesystem. Verify the exact planned mount and filesystem before reading or writing through it.

  4. Why should you test a report under the actual service identity?

    Show answer

    An administrator can have different permissions and a different mount context. The expected identity and path matter to the deployed operation.

  5. Will a successful fstab parse prove the app can see its new disk after startup?

    Show answer

    It helps validate configuration but does not prove a live mount or meaningful app data. Check actual mounted source and service result separately.

Revision cards

Placement
Choose the intended instance and match its Availability Zone, compatible volume settings and known attachment limit.
Source history
Check whether the EBS volume came from a blank allocation or snapshot. The two paths can require different guest work.
Guest identity
Match the expected EBS ID and actual disk serial, then verify its partition and filesystem. Do not infer identity from NVMe numbering.
Mount scope
A visible directory and a verified mounted filesystem are distinct. Confirm the actual source before granting or testing writes.
Persistent policy
Use a unique supported identifier, correct filesystem type and intended boot behavior. Test dependencies for required service data.
Application evidence
Check a representative result with the deployed service identity and retain the backup and cleanup plan for the new resource.

Official references