Welcome back to the second part of our EBS demo. In this lesson, you’ll learn how to transfer an EBS volume between servers—first within the same availability zone and then across different availability zones. Previously, we moved our EBS volume from Server One to Server Two seamlessly because both resided in the same availability zone. Since an EBS volume is zonal, it can be attached to any EC2 instance within its current zone. Now, we’ll move the EBS volume to Server Three, which is located in a different availability zone (us-east-1b).Documentation Index
Fetch the complete documentation index at: https://notes.kodekloud.com/llms.txt
Use this file to discover all available pages before exploring further.
Before moving volumes, always ensure that any active file systems are unmounted to avoid data corruption.
Unmounting the Volume
On the current server where the volume is in use, unmount it by executing:| NAME | MAJ:MIN | RM | SIZE | RO | TYPE | MOUNTPOINTS |
|---|---|---|---|---|---|---|
| xvda | 202:0 | 0 | 8G | 0 | disk | |
| ├─xvda1 | 202:1 | 0 | 8G | 0 | part | / |
| ├─xvda2 | 259:0 | 0 | 0 | 0 | part | |
| └─xvda128 | 259:1 | 0 | 10M | 0 | part | |
| xvdf | 202:80 | 0 | 10G | 0 | disk |
Detaching and Moving the Volume
With the volume unmounted, log into your AWS console and navigate to the EBS Volumes section. Select the volume, and ensure it is detached or in the process of detaching. Wait until its status changes to “available.” Refresh the page if necessary.

Creating a Snapshot to Overcome Availability Zone Limitations
Because you cannot directly attach an EBS volume to an instance in a different availability zone, the solution is to create a snapshot of your volume. Follow these steps:- Select the volume.
- Choose “Actions” > “Create snapshot.”
- (Optional) Add a description (e.g., “my snapshot”) and confirm.


Creating a New Volume in a Different Availability Zone
Once the snapshot is available, follow these steps to create a new volume in the target availability zone:- Select the snapshot.
- From the “Actions” dropdown, choose “Create volume from snapshot.”
- Change the availability zone to the target zone (e.g., US East 1B for Server Three). You can adjust volume type, size, and other settings as needed.
- (Optional) Add tags (for example, name the volume “EBS clone”).



Verifying on Server Three
Log into Server Three via your terminal and run the following commands to verify that the block device is attached and to confirm the file system:| NAME | MAJ:MIN | RM | SIZE | RO | TYPE | MOUNTPOINTS |
|---|---|---|---|---|---|---|
| xvda | 202:0 | 0 | 8G | 0 | disk | |
| ├─xvda1 | 202:1 | 0 | 8G | 0 | part | / |
| ├─xvda127 | 259:0 | 0 | 1M | 0 | part | |
| └─xvda128 | 259:1 | 0 | 10M | 0 | part | |
| xvdf | 202:80 | 0 | 10G | 0 | disk |
Moving Volumes Across Regions
If you need to migrate the volume to a completely different AWS region (for example, from Northern Virginia to Ohio), you cannot directly create a volume from a snapshot in another region. Instead, you must:- Copy the snapshot from the original region to the desired region.
- Create a volume from the copied snapshot in the target region.
- Select the snapshot.
- Click “Actions” and select “Copy snapshot.”
- Provide a description such as “copy of my snapshot.”
- Specify the destination region (e.g., US East 2 for Ohio).


