Learn how to resize an EBS volume and update the operating system of the attached instance to recognize the change in capacity.
- [Instructor] In this video, we'll expand the size of the EBS volume that we just created and then update the operating system to make that space usable. We're here at the EC2 Console. Let's scroll down to the volume display on the Description tab of the instance. Down here you see the block devices. Recall that sdb is our additional, non-root volume. If we click on it, we see some details, including the volume ID, which is a hyperlink. If we click into that, we'll be transported to another section of this Console.
We see over here on the left that we're now in the Volumes section under Elastic Block Store. So now we are looking at the actual definition of the volume that's attached to our EC2 instance. You can see that it has the name EBSDemo1 that is associated with the instance to which it is attached. It gets that name automatically because it was created as part of the instance creation process. But as you know, we can detach and reattach EBS volumes to other instances, so it might make sense for you to give it a name that doesn't match the instance. For now, we'll leave it.
What we want to do is go up to Actions and Modify Volume. I'd like to increase the size of this volume. All I have to do is type in a new number. We're going to go up to 10 gigabytes and click Modify. It's asking us to confirm what we want to do, and it's also telling us that we may need to extend the OS file system on the volume to take advantage of the new space. Click Yes to confirm that we understand. The modify volume request has succeeded. Now let's head back to the Console and log in to our instance.
Okay, we use the disk free -h command again. You can see our xvdb volume, but it's still just 5.5 gigabytes, no bigger than it started. Well, what do we have to do here? Let's take a look at ls block to see what's really going on at the block level. There's xvdb, and, ah, there's the 10 gigabyte size we were expecting. It still shows the mount point is ebs-encrypted, but until we take one more step, this system will not be able to use the additional four gigabytes that we've allocated. We need to use a command called resize2fs.
We'll do it with sudo resize2fs and then just give the name of the volume, xvdb. That's it, Linux will figure out what the size ought to be. Okay, it's done. Let's look at df -h again. There we go, now we have more available space. We've just resized the volume on demand and updated the OS to use the space.
Join AWS architect Brandon Rich and learn how to configure object storage solutions and lifecycle management in Simple Storage Service (S3), a web service offered by AWS, and migrate, back up, and replicate relational data in RDS. Find out how to leverage flexible network storage with Elastic File System (EFS), and use the new AWS Glue service to move and transform data. Plus, learn how Snowball can help you transfer truckloads of data in and out of the cloud.
- What is data management?
- AWS S3 basics
- S3 bucket creation
- S3 upload and logging
- S3 event notifications
- S3 data lifecycle configuration
- Working with Amazon Elastic Block Store volumes
- Creating and mounting an EFS
- Creating an AWS RDS instance
- RDS backup and recovery
- Moving data with AWS Database Migration Service
- Moving data with Data Pipeline and Glue
Skill Level Intermediate
Amazon Web Services: Monitoring and Metricswith Sharif Nijim2h 4m Intermediate
Amazon Web Services: Data Serviceswith Lynn Langit4h 30m Intermediate
Amazon Web Services: High Availabilitywith Sharif Nijim2h 17m Intermediate
Amazon Web Services for Data Sciencewith Lynn Langit3h 56m Intermediate
2. Object Storage
3. File Systems
4. Database Services
5. Getting Data to AWS
6. Moving Data in AWS
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.