0% found this document useful (0 votes)
10 views

Lab Activity 4

Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

Lab Activity 4

Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

Renalyn A.

De Villar BSIT 4-2 December 08, 2024

Lab Activity Report: Working with Amazon EBS (50 points)


ITELEC 4103

I. Brief Rationale for the Activity Conducted:

The purpose of this lab activity is to demonstrate the creation, configuration, and management
of Amazon Elastic Block Store (EBS) volumes. By performing tasks such as attaching an EBS volume to an
Amazon EC2 instance, configuring it as a virtual disk, creating a snapshot, and restoring data from the
snapshot, students gain practical knowledge of managing scalable cloud storage solutions.

Understanding cloud networking and storage is essential for deploying secure and efficient web
infrastructure. EBS provides a flexible and high-performing storage solution for use cases ranging from
simple file storage to large-scale application deployment. Additionally, skills in managing snapshots and
backups enhance data availability and disaster recovery strategies. This lab activity underscores the
importance of scalable, reliable, and secure storage solutions in modern cloud computing environments,
preparing students for real-world applications in cloud infrastructure management.

II. Discussion (based on the tasks performed):

 Create an Amazon EBS Volume:

To create an Amazon EBS volume, open the


AWS Management Console, search for and
select EC2.

In the left navigation pane, go to Instances,


where an existing EC2 instance named "Lab"
is already launched. Note its Availability Zone
(e.g., us-east-1a). Next, navigate to Volumes
in the left pane. Here, you will see an existing
8 GiB volume attached to the instance.

To create a new volume, click Create Volume


and configure the following: set Volume Type
to General Purpose SSD (gp2), Size to 1 GiB,
and select the same Availability Zone as your
EC2 instance. Add a tag in the Tag Editor with
Key as "Name" and Value as "My Volume."
Finally, choose Create Volume. The new
volume will appear in the list and transition
from Creating to Available. Refresh if
necessary to view the updated status.
 Attaching the EBS Volume to the Instance:

To attach the new EBS volume to the


Amazon EC2 instance, select My
Volume from the list of volumes. In
the Actions menu, choose Attach
volume. In the Instance field, select
the Lab instance. The Device name
will default to /dev/sdf, though it
may appear as /dev/xvdf or similar
in Linux systems due to kernel
updates. Confirm by choosing Attach
volume, and the volume state will
change to In-use, indicating it is now

successfully attached to the EC2 instance.

 Configuring the instance to use the attached volume:


To connect to the EC2 instance using EC2 Instance Connect, open the AWS Management Console,
search for and select EC2, and navigate to Instances in the left pane. Select the Lab instance and
choose Connect. On the EC2 Instance Connect tab, click Connect again. A terminal session will open
in the browser, displaying a $ prompt, providing access to the instance.

To add the new EBS volume to the EC2


instance as an ext3 file system, first, view the
current storage by running the command df -
h. This will display the existing storage, but the
new 1GB EBS volume will not appear since it
hasn’t been formatted or mounted yet.

Next, create a file system on the volume by running


sudo mkfs -t ext3 /dev/sdf, which formats the new
volume with an ext3 file system, making it ready for
use.
After formatting, create a mount directory using the command sudo mkdir /mnt/data-store to provide a
location where the new volume will be accessible. Mount the volume by executing sudo mount
/dev/sdf /mnt/data-store, which makes it available for use at the specified directory. To ensure the
volume is mounted automatically whenever the instance restarts, update the /etc/fstab file by running
the command echo "/dev/sdf /mnt/data-store ext3 defaults,noatime 1 2" | sudo tee -a /etc/fstab.

You can verify the configuration by


viewing the file with cat /etc/fstab.

To confirm that the volume has been


successfully mounted, run the df -h
command again, and you should now
see the new volume (/dev/xvdf) listed
as mounted at /mnt/data-store.

Finally, test the mounted volume by


creating a file and adding text to it
using the command sudo sh -c "echo
some text has been written >
/mnt/data-store/file.txt". Verify that
the text has been written to the volume
by running cat /mnt/data-store/file.txt.
This completes the process of attaching,
formatting, mounting, and verifying the
new EBS volume on the EC2 instance.

 Creating an Amazon EBS snapshot:


To create a snapshot
of your EBS volume,
go to the EC2 Console,
select Volumes, and
choose My Volume.
From the Actions
menu, select Create
snapshot. Add a tag to the snapshot by setting the Key to
"Name" and the Value to "My Snapshot." Click Create snapshot
to initiate the process.

Navigate to Snapshots in the left pane to view your snapshot. Initially, its status will be Pending,
indicating that the snapshot is being created. Once completed, the status will change to Completed.

To test the snapshot, delete


the file created on your volume by running sudo rm /mnt/data-store/file.txt in your EC2 Instance
Connect terminal. Verify the deletion with ls /mnt/data-store/, which should confirm the file is no longer
present. This process demonstrates creating and managing EBS snapshots for backup and restoration.

 Restoring the snapshot:

To restore data from a snapshot, you can create a new


EBS volume using the snapshot. In the EC2 Console,
select My Snapshot from the Snapshots section. From
the Actions menu, choose Create volume from
snapshot. In the configuration panel, ensure the
Availability Zone matches the one used earlier for
your EC2 instance.

Add a tag for the new volume by setting the Key to


"Name" and the Value to "Restored Volume." Click
Create volume to finalize the process. When
restoring, you can also adjust settings like volume
type, size, or availability zone to meet specific
requirements. This process demonstrates how to retrieve data efficiently from an EBS snapshot by
creating a new volume.
To attach and mount the restored volume, navigate to Volumes
in the EC2 Console. Select Restored Volume, then choose Attach
volume from the Actions menu. In the Instance field, select the
Lab instance. The Device field will default to /dev/sdg, which
will serve as the identifier in later tasks. Click Attach volume,
and the volume state will update to In-use.

To mount the restored volume, first create a


directory using sudo mkdir /mnt/data-store2. Then,
mount the volume with the command sudo
mount /dev/sdg /mnt/data-store2. Verify the
contents of the restored volume by listing the
directory with ls /mnt/data-store2/, where you
should see file.txt.

III. Exploring Data Persistency:

EBS volumes provide persistent storage, ensuring data remains intact even if an associated EC2
instance is stopped or terminated. This independence makes EBS ideal for workloads requiring long-term
storage and high availability. Unlike ephemeral instance store volumes, EBS volumes can be detached
and re-attached to other instances, preserving critical data. For example, when an EC2 instance is
terminated, the attached EBS volume retains its data and can be reused with another instance.
Snapshots further enhance data protection, allowing point-in-time recovery or replication across regions,
ensuring reliability for applications like databases and backups.

IV. Exploring Data Backup and Recovery:

The snapshot functionality in EBS provides a reliable method for backing up data by creating
point-in-time copies of volumes. Snapshots are stored in Amazon S3, ensuring high durability and
availability. This feature allows users to quickly restore data in cases of accidental deletion, corruption, or
system failure. For instance, if a file is accidentally deleted from a volume, the volume can be recreated
from a snapshot, restoring the data to its previous state. Snapshots also enable efficient disaster
recovery, as they can be used to replicate data across regions or create new volumes with modified
configurations. This ensures minimal downtime and data loss, making snapshots a critical tool for
maintaining data integrity and operational continuity.

V. Scalability and Cost Management:

EBS offers scalable storage by allowing users to create, attach, and detach volumes as needed,
making it adaptable to varying workloads. For example, storage can be increased by attaching additional
volumes or replacing existing ones with larger capacities without interrupting operations. This flexibility
ensures that storage resources align with current demands, avoiding over-provisioning or
underutilization. Proper configuration optimizes costs while meeting performance requirements.
Selecting the right volume type, such as General Purpose SSD for balanced workloads or Provisioned
IOPS SSD for high-performance needs, ensures efficiency without unnecessary expenses. Additionally,
taking advantage of snapshots for backups reduces costs compared to maintaining duplicate volumes. By
monitoring and adjusting usage, organizations can achieve a cost-effective, scalable storage solution
tailored to their needs.

VI. Replicating Storage Across Instances

EBS snapshots simplify replicating storage across instances, enabling efficient deployment in
multi-instance setups. By creating a snapshot of an EBS volume, a point-in-time backup is stored in
Amazon S3. This snapshot can then be used to create new volumes in the same or different availability
zones, effectively duplicating the original volume’s data and configuration.

For example, a snapshot of a volume containing application data can be restored to multiple instances,
ensuring consistent environments for scaling or testing. This approach promotes efficiency by eliminating
the need to manually configure storage for each instance. It also supports faster deployment in multi-
instance architectures, enhancing operational flexibility and consistency across environments.

RUBRICS FOR THE ACTIVITY


3 pts 6 pts 10 pts 12.5 pts
Focus The discussion lacked Some topics were All relevant topics were Each topic was addressed
clarity and direction, addressed, but the addressed with a clear with thorough, detailed, and
with little to no discussion was not and organized focus, well-organized discussion,
connection to the comprehensive or though some areas may providing a deep focus on the
main topic or activity. lacked depth in several have lacked detail. key areas.
areas.
Clarity The answer or The answer or The answer or The answer or discussion was
discussion was discussion addressed discussion directly exceptionally clear, concise,
unclear and difficult the topic, but in a addressed the topic, and to the point, making the
to follow, lacking a roundabout or vague providing clarity and topic easy to understand.
direct connection to manner, making it coherence.
the topic. harder to understand.
Organization The answer or The answer or Details were presented Details were logically ordered
discussion had no discussion had some in a logical order, but and presented in engaging
clear structure, structure and painted a the structure could ways. The discussion flowed
leaving gaps for complete picture, but have been more smoothly, covering all main
readers to fill in. the organization was engaging. Some loose points clearly, and concluded
not orderly, making it ends remained, and the effectively.
less effective. flow of the discussion
was somewhat uneven.
Application The answer or The answer or The answer showed a The answer integrated and
discussion showed a discussion was able to clear understanding and applied concepts and
lack of understanding state a few concepts application of basic principles from the module
of basic concepts and and principles but did concepts and principles, materials effectively, showing
principles, with no not fully apply them. demonstrating a deep understanding and
clear connection to comprehension of the practical application of the
the material. material. ideas.

You might also like