SYS 360 Lab 4 1 - JadenGil/Jaden-Tech-Journal GitHub Wiki
Creating a volume and connecting to the Lab:
To start this lab we will be going to the EC2 section of AWS like usual but this time there is a pre-made lab machine in the instances tab so we need to start by creating a new EBS Volume.
To do this select "Volumes" in the side menu then "Create Volume"
The volume settings should be the following:
Then we can select "create volume" and the volume will be made
Deliverable 1:
Then we want to attach this new volume which we can do by going to the "actions" menu and selecting "attach volume" then on the next page we will want to make sure the settings are the following:
Then select "attach volume"
Deliverable 2:
Now we can go back to the "instances" tab and connect to the Lab machine.
Select "Connect using EC2 Instance Connect"
Creating and Configuring a File System:
Once connected to the lab machine run df -h
and the output should look like this:
We won't see the volume that we have created yet because we haven't made a file system on it or mounted the drive yet.
To make an ext3 file system we will want to use the command in this screenshot:
With that done we now need to make a directory for mounting the new volume and we'll want to mount it which can be done by running the commands in this screenshot:
We also want to make sure that the Linux instance mounts this volume whenever the instance is started which is done by using the following echo command:
Deliverable 3:
Now when we run df -h
we will see our volume on the list:
Now we can add files to the new directory:
Creating EBS Snapshot:
Back in the EC2 menu we want to create a snapshot by following the steps in this snapshot:
Now on the snapshot page, we will want to add a tag with the following settings and create the snapshot:
You will now see the snapshot that was just made
Deliverable 5:
Now we will want to go ahead and delete the file we made previously:
Restoring with the Snapshot:
To restore things on our machine we will want to go back to our snapshots and do the following:
Then we want to make a tag with the settings you see in the screenshot:
Then we want to go to the volumes tab again and attach the volume:
In the attached volume page we want the following settings:
Now we can restore the file with the following commands
Deliverable 6: