How do I extend an EBS volume with LVM partitions?
Skills:
Tool Use & Function Calling70%
For more details on this topic, visit the AWS Knowledge Center
on AWS re:Post and read the full article associated with this video: https://repost.aws/knowledge-center/ebs-extend-volume-lvm-partitions
The AWS Knowledge Center contains trusted, expert-reviewed answers
to frequently asked questions across AWS services —
including EC2, S3, IAM, Lambda, Bedrock, and more.
Benito shows you how to extend an EBS volume with LVM partitions.
0:00 Introduction
0:21 Best practice is to create a snapshot
1:35 Session manager
5:41 Volume must be created in the same availability zone
11:00 Closing
Subscribe:
More AWS videos: https://go.aws/3m5yEMW
More AWS events videos: https://go.aws/3ZHq4BK
Do you have technical AWS questions?
Ask the community of experts on AWS re:Post: https://go.aws/3lPaoPb
ABOUT AWS
Amazon Web Services (AWS) is the world’s most comprehensive and broadly adopted cloud platform, offering over 200 fully featured services from data centers globally. Millions of customers — including the fastest-growing startups, largest enterprises, and leading government agencies — are using AWS to lower costs, become more agile, and innovate faster.
#AWS #AmazonWebServices #CloudComputing #awsknowledgecentervideos #AWSCloud #AmazonAWS #KnowledgeCenterVideos #AWSrePost
What You'll Learn
This video demonstrates how to extend an Amazon Elastic Block Store (EBS) volume with Logical Volume Manager (LVM) partitions using the AWS Management Console and command line interface.
Full Transcript
[Applause] [Music] Hello, I'm Bonito, a cloud engineer here at the AWS office in Cape Town. Today I'm going to show you how to extend an Amazon Elastic Block Store volume that has logical volume manager partitions. Let's get started. First, we must increase the size of the EBS volume. I'll use the AWS management console for visual representation, but you can also use the AWS command line interface. Let's add additional EBS volume to the volume group and extend the volume group and logical volume. It's a best practice to create a snapshot of the volume so that you have a consistent backup of the file system before you proceed. Let's go through option one first. After you log into the AWS management console, navigate to the Amazon Elastic Compute Cloud Console. Then under Elastic Block Store, select volumes. Now select the EBS volume that you want to increase the size of. Choose actions and then choose modify volume. Enter the new size for the volume and choose modify. The volume is available for use as soon as the volume enters the optimizing state. Now use session manager or an SSH client such as party to connect to your EC2 instance. To extend the partitions, we'll use the grow part utility. If you didn't already install this utility, then install it from the cloud utility grow part package. If you are using a Debian or Buntu base instance, then you can install this utility from the cloud guest utility package. Run the df- HD command to view the current space utilization of the file system and type. Use the lsbk command to check the current size of the volume. We can see that there is one rue device of 8 gig and the secondary device that shows an updated size of 30 gig. On nitro instances such as T3, M5, C5 devices are identified as NVME. We can see that the partition NVME 1N1 P1 holds all my logical volumes. If the device has a partition, then you must first extend the partitions before you extend the logical volumes. Let's extend the partition. Note the partition number is the number after the P. Run LPLK to confirm the extended partition size. Partition size successfully increase from 20 to 30 gig. Now let's identify the physical volume details. To do this, run either the PVS or the PV display command. We have one volume group named volume group one of total size 20 gig and 5 gig of unallocated physical extent. Also, the output shows my partition name is def SDB1. This is the actual device name used by the EC2 instance EBS volume on the EC2 console. Depending on the block device driver of your kernel, the device name might be different from what is referenced by the operating system. We are ready to resize the physical volume that holds all of the logical volumes. If we run the previous command, we can see that the number of physical extents on the volume group is updated from 20 to 30 gig and the new unallocated physical extend size is 15 gig. We are now ready to increase the logical volume size. To identify the logical volume details, use either the LVS or the LV display command. The volume group has three logical volumes named logical volume 1, logical volume 2, and logical volume 3. Each logical volume is assigned 5 gig. To extend the logical volume one size from five to 7 gig, use the hyphen L argument. If we run PVS again, we can confirm that the amount of unallocated physical extents is reduced from 15 to 13 gig. Now let's extend the logical volume 2 with 10% of the free space in the volume group. Before we extend the file system on the logical volumes, let's verify the path to the device and file system type. We can see that logical volume 2 is an ext4 file system. But both logical volume 1 and three are XFS file systems. For ext 3 and four file systems, we will run the resize 2FS command to extend the file system. For XFS file systems, we use the XFS grow FS command. Confirm the logical volumes reflects the new space. Both logical volume one and logical volume 2 size increase. That's for option one where we increase the EBS volume size and extend the file system. Now let's look at option two for adding a new volume. Create a new 10 gig EBS volume and then attach it to the instance as a data volume. Run the elsbk command and confirm the new volume device name. The volume is identified on the operating system as NVME21. Now let's create a partition on the new device. For this exercise, we'll use the if disk utility, but we can also do this with a gisk. F disk is used to manage partitions up to 2 TBTE and G disk is used for partitions that exceed 2 TB. The key difference between F disk and G disk lies in the partition table they manage. FISK works with the old MBR format while GD disk is designed for the newer GPT format which is required for disk larger than 2 TB. Enter M to show the help menu. Enter the option N to add a new partition. Select P for primary. For the rest of this demonstration, we'll use the default values. Press the enter button to select the partition number and the default sectors. We can enter P to show the created partition. A new partition NVME 2N1 P1 is created and the partition type is set to 83 which is Linux. Because we will create logical volumes on this partition, we must change the partition number from 83 to 8E for Linux LVM. Type capital L to list all. For Linux elvm partition type, the code is 8E. We will write out the partition changes. Let's run LSPLK to confirm the partition exist. Now let's create a physical volume from the newly created partition. Check the volume group and confirm that the current size is 30 gig. Let's extend the volume group to include the new physical volume. The VGS command shows that the total volume group size increased and that there are now two physical volumes in the volume group. To identify the logical volume details, run the elvs command. Now we can allocate space to the logical volumes. Let's set the updated size of logical volume 3 to 15 gig. Finally, extend the file system. Let's confirm if the logical volume 3 size increased. You can see that the logical volume 3 is extended by 15 gig. If you have a stripe logical volume, you must air devices in multiples and meets the stripe count to extend it. For example, let's say you have a stripe logical volume with a stripe count of two, meaning that it's using two physical volumes. If you want to extend this type logical volume, you must make sure that the physical volume has sufficient space to maintain the striping pattern. To identify the number of physical volumes that the logical volume stripes to the data cross, you can run the following command. The layout column shows whether the logical volume is linear or striped. The devices column shows the number of devices that the logical volume is striped across. We can confirm that my striped logical volume is strapped across two physical devices. Let's check the physical volume details. Check the VGS output. Although the volume group three space is 10 gig, if we try to increase the stripe logical volume to 5 gig, we will get an error message. This error happens when you extend the stripe logical volume without adding sufficient number of physical devices to stripe the data. To maintain the striping pattern, you can create one additional EBS volume of size 10 gig and attach it to the instance. Run lbk to confirm the partition device name. Assign the device to the volume group. Let's extend the volume group. The volume group size is extended. Now let's set the new size for our Stripe logical volume. Let's resize the file system. Let's check the updated size of the Stripe volume. That's it. The Stripe logical volume is extended. And now you know how to extend an Amazon elastic block store volume that has logical volume manager partitions. Thanks for watching and happy cloud computing from all of us here at AWS. [Applause] [Music]
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from Amazon Web Services · Amazon Web Services · 9 of 60
1
2
3
4
5
6
7
8
▶
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Agentic AI Design Patterns Introduction and walkthrough | Amazon Web Services
Amazon Web Services
Galileo on modernizing on banking infrastructure | Amazon Web Services
Amazon Web Services
Alliander Speeds Innovation and Energy Transition Using AWS | Amazon Web Services
Amazon Web Services
AWS and Scuderia Ferrari HP streamline F1 power unit assembly | Amazon Web Services
Amazon Web Services
How AWS machine learning supports Scuderia Ferrari HP pit stops | Amazon Web Services
Amazon Web Services
Nasdaq Builds Market Infrastructure of the Future with AWS | Amazon Web Services
Amazon Web Services
AWS Security Hub Exposure Findings | Amazon Web Services
Amazon Web Services
How do I use Session Manager port forwarding to connect to my EC2 instance through RDP?
Amazon Web Services
How do I extend an EBS volume with LVM partitions?
Amazon Web Services
AWS Graviton makes it easy to optimize performance, cost, and sustainability | Amazon Web Services
Amazon Web Services
Run Cloud Adoption Framework workshops with Miro | Amazon Web Services
Amazon Web Services
Getting Started with AWS Cost Optimization Hub | Amazon Web Services
Amazon Web Services
Why did my Amazon SQS messages get sent to a dead-letter queue?
Amazon Web Services
Declarative Policies for EC2 | Amazon Web Services
Amazon Web Services
How do I troubleshoot IAM permission issues for the Billing and Cost Management console?
Amazon Web Services
Integrity at Scale: Inside the Flo Health Mission | Amazon Web Services
Amazon Web Services
Fueling Success: Small shifts, powerful performance | Amazon Web Services
Amazon Web Services
WEX enhances customer experience with AI-powered chatbot | Amazon Web Services
Amazon Web Services
Accelerate troubleshooting with Amazon CloudWatch investigations | Amazon Web Services
Amazon Web Services
Why is my Windows WorkSpace stuck in the starting, rebooting, or stopping status?
Amazon Web Services
Telemetry Pipelines for AI | Amazon Web Services
Amazon Web Services
Getting Control over Security and Observability Data | Amazon Web Services
Amazon Web Services
The Problem with Telemetry Data Volume | Amazon Web Services
Amazon Web Services
Telemetry Pipelines on AWS | Amazon Web Services
Amazon Web Services
What are Telemetry Pipelines? | Amazon Web Services
Amazon Web Services
Using AI for RegEx on Telemetry Pipelines | Amazon Web Services
Amazon Web Services
Multi-Session Support in the AWS Console | Amazon Web Services
Amazon Web Services
How CloudHedge delivers assessment with AWS ISV Tooling Program at no cost?
Amazon Web Services
How customers speed up migration and modernization to AWS with CloudHedge | Amazon Web Services
Amazon Web Services
Chaos Experiment with Amazon ElastiCache | Amazon Web Services
Amazon Web Services
Amazon S3 Access Points: Easily manage access for shared datasets on S3 | Amazon Web Services
Amazon Web Services
ElastiCache Valkey 8.0 - Savings and Efficiency | Amazon Web Services
Amazon Web Services
Pennymac scales document processing with AWS | Amazon Web Services
Amazon Web Services
AWS | Next Level Innovation | Amazon Web Services
Amazon Web Services
Driving Cloud Innovation: Mindtickle's Partnership with AWS Enterprise Support | Amazon Web Services
Amazon Web Services
A Leader's Edge from Executive Insights | Amazon Web Services
Amazon Web Services
How do I create a custom Amazon WorkSpaces image?
Amazon Web Services
Charles Leclerc tests his AI-generated race track | Amazon Web Services
Amazon Web Services
Redington Scales India’s Cloud Access with AWS Partnership | Amazon Web Services
Amazon Web Services
How do I prevent the resources in my CloudFormation stack from getting deleted or updated?
Amazon Web Services
How do I troubleshoot authentication errors when I use RDP to connect to an EC2 Windows instance?
Amazon Web Services
Exploring the Possibilities of Digital Twin & AI at the Edge | Amazon Web Services
Amazon Web Services
Exploring the Possibilities of Digital Twin & AI at the Edge | Amazon Web Services
Amazon Web Services
AWS at the FORMULA 1 AWS GRAN PREMIO DELL'EMILIA-ROMAGNA 2025 | Amazon Web Services
Amazon Web Services
What's new in RCPs | Amazon Web Services
Amazon Web Services
API Caching using Amazon ElastiCache | Amazon Web Services
Amazon Web Services
Pendula: Amazon Nova Customer Testimonial | Amazon Web Services
Amazon Web Services
InDebted : Amazon Nova Customer Testimonial | Amazon Web Services
Amazon Web Services
Amazon DynamoDB global tables with multi-Region strong consistency | Amazon Web Services
Amazon Web Services
Siemens Mobility uses AWS to operate securely, efficiently on a global scale | Amazon Web Services
Amazon Web Services
How do I reuse a knowledge base session in Amazon Bedrock?
Amazon Web Services
EP5: MBZUAI, CMU : Causal AI, Answering The “Why“ and “What if“ Questions | AWS for AI Podcast
Amazon Web Services
Hema scales time to market developing a data mesh on AWS (Technical) - Cloud Adventures
Amazon Web Services
Hema scales time to market developing a data mesh on AWS (Business) - Cloud Adventures
Amazon Web Services
How Langfuse Scaled Their AI Platform with AWS: From Open-Source to Enterprise | Amazon Web Services
Amazon Web Services
SLMs and LLMs: What’s the Difference? | Amazon Web Services
Amazon Web Services
SLMs and LLMs: When to use them? | Amazon Web Services
Amazon Web Services
SLMs on CPU | Amazon Web Services
Amazon Web Services
Intelligent Model Routing | Amazon Web Services
Amazon Web Services
SLMs, LLMs, and Model Routing in Agents | Amazon Web Services
Amazon Web Services
More on: Tool Use & Function Calling
View skill →Related AI Lessons
⚡
⚡
⚡
⚡
What a Symantec Ghost Build Taught Me About Infrastructure Engineering
Medium · DevOps
Large Files Don't Belong in Your Workflow State
Medium · Python
I Stopped Using Docker for Local Dev. Nobody on My Team Noticed.
Medium · ChatGPT
hermes-memory-installer: System Metrics, Auto-Archive, Token Rotation, Dead-Letter Replay, and Prof
Dev.to AI
Chapters (5)
Introduction
0:21
Best practice is to create a snapshot
1:35
Session manager
5:41
Volume must be created in the same availability zone
11:00
Closing
🎓
Tutor Explanation
DeepCamp AI