Chapter 13: Amazon EBS (Elastic Block Store)
13.4 NVMe device naming (important!)
Friends, a disk requested as /dev/sdf in EC2 can appear under an NVMe name such as /dev/nvme1n1 on Nitro Linux. Match the actual volume ID in the device serial before selecting the disk.
मित्रांनो, Nitro Linux वर कन्सोलमधील /dev/sdf mapping डिस्कला /dev/nvme1n1 सारखं नाव दिसू शकतं. डिस्क निवडण्याआधी device serial मधला volume ID जुळवा.
दोस्तों, Nitro Linux पर कंसोल का /dev/sdf mapping, /dev/nvme1n1 जैसे device नाम से दिख सकता है। डिस्क चुनने से पहले उसका serial और volume ID मिलाओ।
On modern Nitro-based instances (t3, t4g, m5, m6i, m7i, c5, c7g, r6i ...), EBS volumes appear as NVMe devices, not with the name you chose in the console.
| Console "device name" | Example Xen Linux path | Example Nitro Linux path |
|---|---|---|
/dev/xvda or /dev/sda1 (root) |
/dev/xvda |
/dev/nvme0n1 |
/dev/sdf (extra volume) |
/dev/xvdf |
/dev/nvme1n1 (number depends on current device discovery) |
| Partition 1 of root | /dev/xvda1 |
/dev/nvme0n1p1 |
The paths above are examples. To identify the assigned device, compare the planned EBS volume ID with the disk’s current model and serial and verify its actual mount.
lsblk -o NAME,TYPE,SIZE,MODEL,SERIAL,FSTYPE,UUID,MOUNTPOINTS
NVMe names can change
An NVMe path can change across guest enumeration. Use a supported stable and verified filesystem or partition reference for persistent mounting. A copied filesystem can duplicate a UUID. Eligible Amazon Linux images may also create mapping symlinks.
Ravindra Bagale's Tip
A numeric device name can change. Choose a verified stable mount reference appropriate to the layout, and confirm its uniqueness. Compare the current EBS disk’s serial with the planned volume ID.
Ravindra Bagale's Tip – मराठी
Numeric disk नाव बदलू शकतं. Layout साठी योग्य stable mount reference निवडा आणि ते unique आहे का ते तपासा. EBS disk चा current serial volume ID शी जुळवा.
Ravindra Bagale's Tip – हिंदी
Numeric disk नाम बदल सकता है। Layout के लिए सही stable mount reference चुनो और उसकी uniqueness जाँचो। EBS disk का current serial, volume ID से मिलाओ।
Lab
Use the fictional Linux inventories to identify the data disk after renumbering. If you already have an assigned guest, check its observed EBS serial, filesystem and mount with read-only tools.
Identify the same EBS disk even when Linux calls it something else
Mauli Dairy's operator schedules a maintenance window and records that its new data volume was requested as /dev/sdf in EC2. Later, they log into the assigned Nitro-based Linux instance and see /dev/nvme0n1, /dev/nvme1n1 and /dev/nvme2n1. It is tempting to pick the middle row and assume it is the extra disk. That can point to an unrelated volume. Start from the cloud volume ID and compare it with the guest's device identification. A name in a screenshot is evidence from that one observation, not the identity of an EBS volume for its entire lifetime.
For EBS volumes on Nitro-based instances, the storage presents as NVMe block devices. The Linux driver creates device nodes as devices respond to discovery. The console or API requests a device name for the block-device mapping, while the driver's name follows the guest's actual enumeration. AWS documents that enumeration can differ across starts. There may be instance store devices using NVMe names too, so the prefix alone does not determine the storage service. A volume ID can be found in the EBS-specific device serial. Use the mapping supplied by the service and the current guest evidence together.
Finding the right device is needed before formatting, mounting, resizing and detaching. This lesson only observes and reasons about identification. No device is changed. A safe decision has several parts: you can name the intended AWS resource and attachment, find its matched disk and any partition, recognize the expected filesystem, and check whether that filesystem is already mounted where the app uses it. These facts do not always come from the same command. A blank mount field can show that a filesystem isn't currently mounted under the tool's observation. It does not prove the device is blank and safe to format.
Write down which layer owns each identifier
The cloud control plane knows a volume ID such as vol-0dea0000000000002 and the attached instance and AZ. This ID names the resource lifetime in AWS and stays with the volume over guest device renaming. A new volume restored from its snapshot receives a different volume ID. The attachment includes an EC2 block-device mapping name such as /dev/sdf. For suitable Amazon Linux images a udev rule may create a convenience symlink based on the associated EC2 mapping. Other systems may not have that link. Stable EBS volume IDs and the approved storage layout still guide identification.
In the guest /dev/nvme1n1 identifies the currently enumerated NVMe namespace in that example. AWS uses the device serial for the EBS volume ID and a controller identification area can hold the requested mapping. The EBS serial commonly appears without the hyphen shown in the AWS volume ID. Normalize that known representation when comparing, rather than comparing two strings that merely contain similar digits. Verify the reported model and attachment. An instance store device can have an entirely different serial and its own owner. A visible NVMe path can remain meaningful only for the current guest snapshot.
A partition is a region of a device, with an identifier and its own device node if used. Linux typically writes p1 onto an NVMe namespace name to show partition 1. That suffix is part of the local path, and isn't part of AWS's volume ID. A partition identifier such as a PARTUUID identifies an entry in a supported partition table. A filesystem UUID identifies a filesystem that can live directly on a device, in a partition or in another logical layer. They are different pieces of metadata. To decide what should be mounted, read the filesystem type and verify where that filesystem actually exists.
| Identifier | Scope | What can change it |
|---|---|---|
| AWS EBS volume ID | A specific EBS volume resource | Creating an independent replacement or restore yields a new ID. |
| EC2 attachment name | A specific mapping requested for an instance | Attachment policy, launch or a different mapping can request another name. |
| Guest NVMe path | A currently enumerated namespace or a local partition path | Device discovery and attachments can change the enumeration. |
| Partition identity | An entry in a partition table | Replacing or editing that layout can alter its identifiers. |
| Filesystem UUID | The filesystem's metadata | Creating a new filesystem or an approved filesystem identity change affects the value. A cloned filesystem can preserve it. |
| Mount point | A path in the guest where a filesystem is made accessible | Changes to mount policy, actual mount state or the environment seeing that path. |
Keep a small evidence statement in your notes. “The planned data volume ID is attached to the assigned instance. Its serial is on the currently observed NVMe disk. The partition has the intended filesystem UUID and the app's directory is mounted from that specific filesystem.” Each sentence is a different testable proposition. If the plan uses a logical volume above multiple components, include that layout rather than assuming a one-to-one relationship between EBS disk and filesystem. The simplified lab uses one partition per data disk to make the mapping easy to see.
Perform read-only checks in the expected instance and namespace
First confirm the instance, Region, AZ and current intended EBS volume ID in the assigned AWS view. Match the attachment to that instance rather than working in a nearby tab with a different resource. In Linux, use an explicit set of columns. A disk row can report the model and serial. A nested partition row may contain the filesystem UUID and mount points. Joining sheets by visual row order is unreliable. Draw the parent-to-child relationship you see in the device tree and match the volume ID at the disk layer. Older util-linux versions may expose MOUNTPOINT where a newer one also provides MOUNTPOINTS.
lsblk -o NAME,TYPE,SIZE,MODEL,SERIAL,FSTYPE,UUID,MOUNTPOINTS
findmnt --mountpoint /srv/dairy -o TARGET,SOURCE,FSTYPE,OPTIONS
findmnt --target /srv/dairy -o TARGET,SOURCE,FSTYPE,OPTIONS
Use your approved existing exercise path. findmnt --mountpoint looks for that specific mount point. findmnt --target can report the filesystem supplying an existing file or directory even if the path is just a subdirectory. That distinction matters. An ordinary directory /srv/dairy with no attached data filesystem can still reside on the root filesystem. The second check can show root in that situation, whereas the exact mount query may have no match. Verify the dedicated mount holds the intended data before starting a job which writes there.
On a supported Amazon Linux image, ebsnvme-id can inspect an assigned NVMe disk and give its EBS ID and block-device mapping. Other Linux distributions with nvme-cli can use nvme id-ctrl with the applicable vendor-specific output. Use the package and options documented for your installed platform. These are optional inspection commands for one already identified candidate disk. The commands in this lesson are representative of the AWS-documented read operations, and should not be run against private unrelated devices.
# Example for an authorized, inspected device. Replace the path with the observed disk.
sudo ebsnvme-id /dev/nvme1n1
# Alternative where nvme-cli supplies the vendor-specific output:
sudo nvme id-ctrl -V /dev/nvme1n1
Compare the reported ID against the cloud attachment and then examine actual guest storage. A convenience symlink under /dev/disk/by-id/ can point to a current local path. Treat it as an identifier supplied by your configured device rules. If a symlink resolves to a different device than expected, investigate the mismatch rather than moving a mount. After a recent attachment the device may be visible before udev-derived details have settled. Give the normal discovery and rule processing a chance to finish, or use the documented observation tools for your system. Missing details alone do not justify creating a new filesystem.
Access scopes matter. A container can see a different path and mount namespace from the host. An ordinary local user can also see less device metadata than a privileged operator. A direct read using a tool such as blkid may give more specific filesystem evidence when run with the permitted scope. Do not widen filesystem access or change device permissions just to make a teaching check easier. Use the authorized host and guest context and record which observer produced the evidence. If you cannot verify the expected target, stop any planned disk mutation until the owner reconciles it.
Make the mount stable and check which volume actually supplied it
Many Linux deployments use /etc/fstab to describe persistent mounts. A directory path, filesystem type and option set belong to each entry. A filesystem UUID is commonly a better source reference than a transient NVMe device path. A supported stable label, partition ID or system-specific stable path can also be appropriate. Each choice needs to identify its intended object uniquely under the deployment's actual configuration. A filesystem UUID and a partition UUID mean different things. Choose the one that matches your layout and verify that the filesystem at the selected source is the expected one.
For a simple ext4 data volume whose filesystem UUID has been verified, a teaching example entry looks like this. It is a review example only. Do not copy this fictional value into a real configuration. Before an approved edit, retain the current file, verify the actual source, type and desired boot behavior, then validate and test only the assigned path. A shared kernel or service configuration deserves its own ownership and activation procedures. Changing a file entry and seeing a working directory does not show the directory is mounted by the new entry.
UUID=4b729222-5444-4de1-9c78-e20f06227821 /srv/dairy ext4 defaults 0 2
The first field names the filesystem. The second is the mount target. The third should match the actual filesystem type. The option field controls behavior. In a conventional ext4 example, the final numeric fields can set dump and filesystem check order under the distribution's tooling. Do not reuse those option and check settings for an XFS or other layout without reviewing its appropriate procedure. Decide whether automatic boot should require the mount. An optional scratch mount may not need to hold up boot. Orders storage can be important enough to stop the app from starting while the mount is absent.
Systemd can add dependencies on configured mounts needed for an absolute path through a unit's RequiresMountsFor setting when suitable. That expresses service ordering, but the application's deployment should also verify it has the expected mounted source. A mountpoint populated by the wrong clone could satisfy a coarse is-mounted check. An application validating the mounted identity and data before accepting orders gives stronger evidence. If the directory only exists on root and the intended filesystem has not mounted, keep writes stopped according to the recovery plan. Automatically writing to a fallback directory can split the data across disks.
Handle a restored copy with the same filesystem identifier
Suppose an authorized recovery exercise makes a new volume from a snapshot of the orders disk. The new EBS resource has a different ID and serial. The snapshot includes the existing filesystem's metadata, and that copied filesystem can report the same UUID as the original. If the two volumes are visible together, a lookup by the filesystem UUID alone can become ambiguous. A partition identifier can also be copied with the partition table. A UUID is useful for referring to a known filesystem, but it cannot tell which EBS resource from a set of cloned copies you intended to operate on.
Decide what the new volume is for. If it is an isolated recovery check, plan its instance, disk identity and separate mount and app context before attaching. When a test and the original must coexist in the same Windows or Linux guest, follow that platform and filesystem's approved approach for handling duplicate identifiers. Filesystem tools differ, and some filesystems reject ordinary mounting of a clone when its UUID conflicts. Do not attempt to solve the issue by reformatting the restored copy. It contains the very data the exercise is supposed to verify. A host attached to multiple potential root volumes also needs an explicit documented boot configuration.
Before starting either copy of the app, identify which data source it would use. An old volume can have the same on-disk markers as the new volume, especially immediately after a snapshot restore. A known record must therefore be checked together with device and mount identity. If the app still points at live data, its success proves nothing about the recovery target. Avoid mounting a restored or original filesystem over a busy application path unless the approved transition has handled earlier writes and access. A clone copied for reading belongs in the isolated recovery plan until the owner accepts it.
In a real recovery report, save the source volume ID, snapshot or backup ID, restored volume ID and the plan for their disposition. The guest observations should show which resource backed the exact path used for the test and how duplicate UUIDs were prevented from choosing the wrong copy. If the target remains ambiguous, keep the current service and its recovery points intact and obtain the missing evidence. Deciding from “both are the same size and one says xfs” risks acting on the wrong drive.
Lab one. Follow a training volume across two different boot inventories
Use Python 3 and a new scratch folder. The exercise reads a small fictional JSON file with the shape of a selected device-tree export. It uses no real account, IDs, attached devices or host storage commands. You will compare two observations where the data volume's serial stays the same and its Linux path changes. The records show a root disk, a data volume and an instance store disk. Save the following as devices.json. The two phases are independent observations and the same logical application mount appears in both.
{
"first": [
{"name": "nvme0n1", "type": "disk", "model": "Amazon Elastic Block Store",
"serial": "vol0dea0000000000001", "children": [
{"name": "nvme0n1p1", "type": "part", "fstype": "xfs",
"uuid": "c570e94f-27e6-4c67-935d-9c23e0f2280c", "mountpoints": ["/"]}]},
{"name": "nvme1n1", "type": "disk", "model": "Amazon Elastic Block Store",
"serial": "vol0dea0000000000002", "children": [
{"name": "nvme1n1p1", "type": "part", "fstype": "ext4",
"uuid": "4b729222-5444-4de1-9c78-e20f06227821", "mountpoints": ["/srv/dairy"]}]},
{"name": "nvme2n1", "type": "disk", "model": "Amazon EC2 NVMe Instance Storage",
"serial": "AWS-example-instance-storage", "children": []}
],
"reordered": [
{"name": "nvme0n1", "type": "disk", "model": "Amazon Elastic Block Store",
"serial": "vol0dea0000000000001", "children": [
{"name": "nvme0n1p1", "type": "part", "fstype": "xfs",
"uuid": "c570e94f-27e6-4c67-935d-9c23e0f2280c", "mountpoints": ["/"]}]},
{"name": "nvme1n1", "type": "disk", "model": "Amazon EC2 NVMe Instance Storage",
"serial": "AWS-example-instance-storage", "children": []},
{"name": "nvme2n1", "type": "disk", "model": "Amazon Elastic Block Store",
"serial": "vol0dea0000000000002", "children": [
{"name": "nvme2n1p1", "type": "part", "fstype": "ext4",
"uuid": "4b729222-5444-4de1-9c78-e20f06227821", "mountpoints": ["/srv/dairy"]}]}
],
"clone": {"name": "nvme3n1", "type": "disk", "model": "Amazon Elastic Block Store",
"serial": "vol0dea0000000000003", "children": [
{"name": "nvme3n1p1", "type": "part", "fstype": "ext4",
"uuid": "4b729222-5444-4de1-9c78-e20f06227821", "mountpoints": [null]}]}
}
Before you run the program, predict which disk and partition names should match the source volume in each capture. In the first, the orders partition is the first partition of the namespace numbered one. In the reordered capture, it belongs to the namespace numbered two. The serial and filesystem UUID are unchanged. The NVMe device that now has number one is a different storage service in the exercise. Using the earlier row label would pick that wrong device.
Save this as map_devices.py. It loads only the designated local file. It validates the assumed pair of device identity and mountpoint and counts all visible filesystems with the same UUID. This is a deliberately simple parser for our fixture's one-level partitions and exact model value. Real support for LVM, RAID, encryption layers or OS-specific metadata needs appropriate tools and validation. Use this script's output to explain the evidence, not to make an automated live disk change.
from pathlib import Path
import json
import re
fixture = json.loads(Path("devices.json").read_text(encoding="utf-8"))
requested_id = "vol-0dea0000000000002"
mountpoint = "/srv/dairy"
ebs_model = "Amazon Elastic Block Store"
def normalize_ebs_id(value):
match = re.fullmatch(r"vol-?([0-9a-f]{8}|[0-9a-f]{17})", value.lower().strip())
if not match:
raise ValueError("Expected a synthetic EBS volume identity.")
return "vol-" + match.group(1)
def report(name, devices):
matches = [
disk for disk in devices
if disk["type"] == "disk" and disk["model"] == ebs_model
and normalize_ebs_id(disk["serial"]) == requested_id
]
if len(matches) != 1:
raise SystemExit(f"{name}: expected one EBS device for {requested_id}")
disk = matches[0]
candidates = [
part for part in disk["children"]
if part["type"] == "part" and mountpoint in part["mountpoints"]
]
if len(candidates) != 1:
raise SystemExit(f"{name}: expected mount missing or ambiguous on selected device")
selected = candidates[0]
uuid = selected["uuid"]
if not uuid:
raise SystemExit(f"{name}: selected filesystem UUID missing")
same_uuid = [
part["name"] for entry in devices for part in entry["children"]
if part.get("uuid") == uuid
]
print(f"{name}: {requested_id} → /dev/{disk['name']} → /dev/{selected['name']} → {mountpoint}")
if len(same_uuid) > 1:
print(f"{name}: UUID {uuid} occurs on {', '.join(same_uuid)}")
report("first", fixture["first"])
report("reordered", fixture["reordered"])
report("with-clone", fixture["reordered"] + [fixture["clone"]])
python3 map_devices.py
first: vol-0dea0000000000002 → /dev/nvme1n1 → /dev/nvme1n1p1 → /srv/dairy
reordered: vol-0dea0000000000002 → /dev/nvme2n1 → /dev/nvme2n1p1 → /srv/dairy
with-clone: vol-0dea0000000000002 → /dev/nvme2n1 → /dev/nvme2n1p1 → /srv/dairy
with-clone: UUID 4b729222-5444-4de1-9c78-e20f06227821 occurs on nvme2n1p1, nvme3n1p1
Compare the actual four lines with your prediction. You can identify the volume and its location in both captures. The clone introduces a distinct device with an identical filesystem UUID but no mount at the app path. The report still identifies the intended original by EBS identity and raises the UUID duplication. It is deliberately not designed to decide whether a particular live guest can mount both copies. If an expected mount cannot be confirmed, the exercise fails rather than silently selecting another device with the right size or similar name.
Lab two. Distinguish an absent filesystem from an unmounted filesystem
Use a copy of the simulated records to test a missing mount. In the reordered capture make the data partition's mountpoints list contain only null. Keep its filesystem UUID and type. Run the same parser using only the copied data in a second private folder. You should see the first observation match and the later observation report the expected mount is missing or ambiguous. The partition still advertises an ext4 filesystem. Its device and metadata haven't vanished. There is no basis for formatting merely because the filesystem is not mounted.
Try another local input change by replacing the data disk's serial in the reordered fixture with the clone's serial. The original requested ID no longer matches any candidate. The script returns the expected one-device error. The fact that the same filesystem UUID and the path look familiar gives no substitute for EBS identity. Restore both fictional data records to their original values when finished. Keep each test's result and cleanup limited to the exercise files you own. Do not perform these changes on real lsblk output or any attached volume.
Finally compare a live-interpretation worksheet. The guest view could show a known EBS disk and a partition with a verified filesystem yet no mount on that path. The matching AWS state could still be in use. An application using a plain directory on root might continue writing to the wrong destination. Use the actual filesystem source at the path and verify the cloud target ID before another step. The phrase “available storage” can mean a resource is ready for attachment or a filesystem has capacity. Write down the meaning each time you use it in a handover.
Turn the identity checks into a team procedure
The first operator has the requested AWS IDs. The second can inspect the guest. Give them one shared worksheet with the expected purpose, attachment and separate data path. The cloud column records instance ID, volume ID, AZ, attachment mapping and current state. The guest column records the actual model, serial, parent, partition or logical device, filesystem type, UUID and mount. Include any uncertainty. A discrepancy is a normal reason to ask for a second observation. It is a poor reason to substitute another device based on size.
If the next change is a capacity increase, record the existing partition and filesystem before growing either. For detachment, map all actual filesystem use and stop sanctioned writers. For a new data volume, distinguish a truly empty newly provisioned disk from a volume created from an existing snapshot. For a boot rescue, identify the expected boot device and make a recovery plan before presenting another root image with copied filesystem identities. These actions share the initial identity step but have different follow-through. An automated script should separate discovery from mutation and avoid acting when device identity or purpose cannot be demonstrated.
Use a hypothetical incident to see why this procedure matters. The dairy's monitoring shows a root filesystem filling after a service restart, but the orders mount reports plenty of capacity from a different namespace view. Compare the service and operator contexts. The app may have started before the intended mount, written into a root-side directory and then observed a later mounted view. It may instead be configured to write to a wholly different path. Check the actual process configuration and access in the assigned context. Preserve all data and audit evidence while the application owner determines which records are authoritative. A disk can be correctly attached while its application uses another write path.
Record what an after-check means. A matching volume serial after a reboot proves the expected EBS disk is visible. A stable filesystem source at the mount proves the OS selected the intended storage. Visible expected orders prove that the right part of the data can be read. Those conditions are a better completion test than matching a screenshot's old enumeration. Avoid whitewashing a wrong device by updating a worksheet after the fact. Reconcile the intended resource and changed path first.
Use the clues in the right order when several disks look alike
Imagine the original orders disk and its restored copy each show 40 GiB. Their filesystem types and UUIDs match. The console has ordinary project tags on both resources because the restoration policy deliberately copied tags. To choose the original, use the stable EBS volume ID from the operating plan and guest serial observation. To choose the restored copy, use the new EBS ID and the intended restore path. Then check the expected filesystem, volume size and any partition. Capacity, label and tags help validate the selection, but they are not substitutes for the volume identity in this scenario.
The opposite pattern can also matter. An app might currently write to a logical volume formed from multiple disk partitions. The device tree can repeat an individual block device in some topologies, and the mount source may be an OS-managed mapper device. Follow the relationship from the filesystems and mount back to the current underlying disks. Check the tool's documentation for choosing columns and representing the tree. Do not train an automation to treat repeated rows in a complex device inventory as unrelated resources. The exact EBS ID still belongs to the underlying EBS resource. The rest of the stack needs its own layout evidence.
In older EC2 environments, a different guest driver may display device names such as /dev/xvdf. Even there the mapping set in AWS and the name observed in the guest may differ by more than a simple assumption. Compare the actual platform and driver behavior according to the instance's supported naming rules. “My old deployment always saw /dev/xvdf” cannot tell you what the new Nitro instance sees. Mark the platform and collection time when documenting device paths. An architecture change is a good opportunity to test how the application verifies its storage before start.
If someone says an attachment request failed because the new disk never appeared as /dev/sdf, make two observations. First inspect the exact volume's attachment state under the approved instance identity. Then inspect the guest's visible devices and their serials. If the EBS volume appears as a different NVMe path, the request and guest discovery succeeded under different naming conventions. If the expected attachment is missing, address that at the AWS layer rather than modifying local fstab entries to guess at it. If attachment exists but guest evidence is unavailable, check the appropriate driver, discovery and host context.
| Statement in the ticket | Evidence to add | Action that would be premature |
|---|---|---|
| “Disk two is the new disk.” | Exact AWS ID and normalized instance serial | Creating a filesystem from the enumeration number |
| “UUID matches the backup.” | New resource ID and duplicate UUID check | Assuming the original and test copy can share a mount source |
| “The mount path exists.” | Exact mountpoint and actual filesystem source covering the path | Starting the writer with an unverified storage path |
| “The volume is attached.” | Device visibility, filesystem identity and representative read | Calling the application recovery complete |
Prepare a scoped handover from the AWS console to the guest
For an already assigned EBS volume, a short descriptive CLI call can select only that object and its current attachments. Populate the example variables with the approved Region and exact ID. Match the attached instance, requested device mapping and state. The volume metadata does not show an NVMe enumeration number. Query the guest in the assigned context separately. This practice file provides all required evidence to finish without cloud access or a new device.
aws ec2 describe-volumes --region "$LAB_REGION" \
--volume-ids "$LAB_VOLUME_ID" \
--query 'Volumes[].{Volume:VolumeId,Zone:AvailabilityZone,SizeGiB:Size,Attachments:Attachments[].{Instance:InstanceId,Mapping:Device,State:State}}' \
--output json
lsblk --json -o NAME,TYPE,MODEL,SERIAL,FSTYPE,UUID,PARTUUID,MOUNTPOINTS
If the selected device mapping is a list, choose the intended attachment based on the active plan rather than assuming array order. A Multi-Attach configuration can have more than one approved instance, and each guest sees its own local paths. Two hosts can assign different NVMe numbers to the same EBS volume. That does not show whether their filesystems or application coordination are appropriate for concurrent access. An ordinary lab assumes one target instance. Treat simultaneous access as a separate architecture decision and use supported cluster mechanisms where applicable.
Use the handover to protect the next operation. For an expansion, describe whether you plan to resize an outer EBS capacity, a guest partition or a filesystem, then record the observation that makes a scope change necessary. For a replacement, describe which current app read shows the original is still in use and how another trusted app will check the copy. For an isolated restore, record the unique target ID before attaching. Include both views in the change record. If any observed point does not match the plan, stop and review the scope before running even a familiar storage command.
When reporting a problem to the next learner, include the actual Linux tool output only after redacting identifiers that should not be shared in your environment. Describe the hostname or ns context, device model, volume selection and checked path. The correct resolution might be “the requested mapping is present under a different path and the mount is already correct,” which requires no change at all. That is as valid a conclusion as a storage fix. Avoid creating an extra volume just because a wiki page showed a naming pattern that no longer matches.
Review the root device without assuming it is the first disk
A junior operator is comparing a running configuration with an image taken from a prior release. Both images contained the same original filesystem identity. The current instance's AWS root device mapping is a configuration reference. It does not establish that any particular numeric NVMe node is root, and a guest with an unexpected startup configuration may mount a different copy. AWS documents this situation when more than one root-like attached volume contains copied identifiers. Compare the configured root mapping and EBS attachment against the filesystem currently mounted at the guest's root.
Use simple read-only evidence when the assigned host is already running. The guest's exact root mount source can be observed with findmnt. Follow its parent in the device inventory and check which disk model and EBS serial it maps to. If the root uses a logical device over other components, the source might be a mapper path and needs its actual parent relationship. In a disposable fixture like ours, root happens to stay on device zero. The procedure should still be correct if another valid boot enumerates differently. Do not use the sample's root name in commands that write data.
If the host does not boot into the expected filesystem, use the planned recovery access rather than experimenting on the only live copy. An authorized recovery procedure can use a separate instance and preserved snapshots or a supported rescue method. Compare instance and volume IDs, correct target configuration and the guest root identifiers. If the recovery involves changing duplicate IDs, follow the filesystem-specific documentation and preserve the original before a supported modification to the designated copy. A new root volume from a snapshot can require the correct boot and block device mapping beyond a successful mount on a spare host.
Check two independent completion criteria. First the operating system mounts the intended root volume and expected data directory. Second the site's code and database match the approved release and recovery point. A prior system disk may boot but leave missing components required by a later database layout. Record both matched identities and a known meaningful app result. If the aim was simply to inspect a restored disk, prevent it from becoming the active boot option in the first place. The safe plan states whether the clone is only for inspection, will later replace a disk, or is an image for a new host.
Consider one ordinary availability decision alongside the root case. If a spare report cache drive is absent, you may want the host to boot and regenerate temporary data later. If the order book drive is absent, you may want the host available for repair while the order writer does not start. Those are separate requirements. A blanket fstab option intended to skip boot delays does not tell the application whether it is allowed to write. Design and verify the startup condition for each service. Protect the app's data source even when the host's bootstrap is allowed to continue.
Apply the identity procedure to two competing observations
First, work on the simulated reordered inventory. Another learner offers the first capture's /dev/nvme1n1 as the correct orders disk. Write a short rejection using evidence active in the second capture. Include its actual current model, expected serial and the observed parent and partition for the orders filesystem. Your note should explain why the old device path can be correct historically and wrong now. Also write an application acceptance check that verifies an expected order after the intended data source is confirmed.
Next, an operator sees a restored volume of the same size with the same filesystem UUID. Prepare a rehearsal plan with no real attachment. Use the block-device path and EBS ID that identify the original versus the clone in the fictional records. Choose which isolated host or scope would be appropriate for the restore. Explain which steps verify the selected filesystem and what the recovery reader should see. Identify why changing fstab to the familiar UUID cannot by itself choose between those visible copies. Any future live operation needs platform-specific handling of duplicate identifiers and the approved data owner.
End with the missing mount test. Give one independent check for the cloud attachment, one for the guest match and one for the currently serviced path. The app should not create a fallback order database if the required mount is missing. Propose a startup condition or verified preflight that tests both mount and data identity. Record the desired behavior for an optional report-cache mount separately. It may have different availability requirements. Ask a teammate to predict what changes when a root disk or data disk is replaced by a clone.
Explain device identification in an interview
Why can the console and Linux display different device names?
The EC2 mapping is recorded as part of how the device was attached. On Nitro, the OS NVMe driver creates names according to the devices it discovers and their response order. That numbering can change independently of the EBS resource. Use the EBS ID in the device serial and current guest evidence to connect the views.
How do you prove an NVMe device is the intended EBS volume?
Start from the approved EBS ID and current attachment for the right instance. In the guest, check the namespace row and its EBS model and serial. Match the normalized serial to the AWS ID and confirm its observed partition or logical layout. The same name prefix can also identify instance store or a different volume.
Where do you find the UUID for an ext4 data partition?
Inspect the filesystem known to live on the correct device or partition with tools such as lsblk or an authorized blkid operation. A partition's own PARTUUID identifies a different layer. Verify the UUID remains unique among relevant visible devices before choosing it for a persistent filesystem reference.
Why can a restored disk's volume ID change while its filesystem UUID stays the same?
A restored volume is another AWS resource and therefore has a new ID. The restored blocks can include the filesystem metadata from the snapshot, including its earlier UUID. Inspect both identifiers and use supported recovery procedures to prevent ambiguous selection of cloned data or boot devices.
Does the existence of an application directory establish that its volume is mounted?
The directory can exist on its parent filesystem even when the planned data mount is absent. Check the exact mountpoint and filesystem covering the configured path. Then verify it points to the intended device and contains meaningful app data. That avoids silently writing database files onto root.
Identify the correct layer before choosing a command
Which identity stays the same in both fictional captures when the orders device renumbers?
Show answer
Its EBS volume ID and corresponding serial stay the same. The current Linux NVMe device and partition names change.
Can a Linux path starting with
/dev/nvmebelong to instance store?Show answer
Yes. Inspect the storage model and expected EBS serial and compare against the attachment record.
Two attached targets show the same filesystem UUID. Which value identifies a particular AWS resource?
Show answer
Its EBS volume ID, matched to the appropriate guest device serial. The duplicate filesystem identifiers alone cannot choose a resource.
The exact mount point query returns no data, but a directory check finds the root filesystem. What does that indicate?
Show answer
The directory can be reachable as part of root without the dedicated volume mounted there. Check storage and keep the app under its planned write scope.
An unmounted partition still reports ext4 and an expected UUID. Should the student create a new filesystem?
Show answer
The existing filesystem evidence calls for verifying its intended purpose and mount rather than overwriting it. The local exercise changes no storage.
Revision cards
- EC2 mapping
- The requested attachment name belongs to the AWS mapping. Device enumeration in the guest may assign another name.
- NVMe serial
- Compare the EBS ID with the serial of the NVMe disk and verify its model and attached instance.
- Namespace and partition
- Disk and partition names are related, such as the NVMe namespace and its locally numbered partition. Check the observed tree and actual filesystem.
- Filesystem UUID
- A stable filesystem identifier can be used for mounts when unique in the relevant environment. A snapshot clone can copy it.
- Exact mount versus directory
- An exact mounted source and a normal path within a filesystem are different observations. Check which filesystem supplies the app.
- Recovery proof
- Verify cloud identity, guest layout, mount and meaningful application data. Stop changes when evidence is absent or ambiguous.
Official references
- AWS NVMe EBS identification, EBS and NVMe and EC2 device name mappings
- prepare an existing EBS volume for use and AWS cloned boot-volume identification
- lsblk inventory, blkid filesystem identification and findmnt match behavior
- fstab identifiers and fields and systemd mount dependencies
- AWS CLI volume attachment fields and AWS Multi-Attach requirements