0% found this document useful (0 votes)
24 views1 page

Resizing The EBS Volume

The document discusses two scenarios for modifying EBS volumes on EC2 instances. The first involves resizing an EBS volume from 8GB to 32GB and updating the instance using growpart and resize2fs commands. The second discusses attaching an instance store volume, which requires launching the instance with the volume, checking the volume type, mounting it, and designating a mount point.

Uploaded by

Shrinidhi Bhat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views1 page

Resizing The EBS Volume

The document discusses two scenarios for modifying EBS volumes on EC2 instances. The first involves resizing an EBS volume from 8GB to 32GB and updating the instance using growpart and resize2fs commands. The second discusses attaching an instance store volume, which requires launching the instance with the volume, checking the volume type, mounting it, and designating a mount point.

Uploaded by

Shrinidhi Bhat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

Resizing the EBS volume,

Scenario1 : we have modified the EBS volume of our ec2 instance from 8Gb to 32Gb
what all action we need to takeup so that it should get reflected in the instance

After the modifiaction is completed in the AWS console, login to the particular
ubuntu instance
now we should see the updated storage in nvme0n1 1

sudo growpart /dev/nvme0n1 1

this attempts to resize a partition on an NVMe storage device in a Linux system

after the above command is executed run the below command, this command resizes the
ext2, ext3, or ext4 file system located on the first partition of the NVMe storage
device /dev/nvme0n1

sudo resize2fs /dev/nvme0n1p1

===================================================================================
=====================
Scenario2: how to attach instance store volume to our ec2 instance
important: Instance family should support instance store volume

we have two types of volume built on the Nitro System, which exposes EBS volumes as
NVMe block devices.

which has two partitions named nvme0n1p1 and nvme0n1p128. The attached volume is
/dev/nvme1n1, which has no partitions and is not yet mounted.

While launching the instance we need to attach instance store volume

first use the command :lsblk

file -s command to get information about a specific device, such as its file system
type.
then use sudo file -s /dev/nvme1n1

Use the lsblk -f command to get information about all of the devices attached to
the instance.
sudo lsblk -f

use the mkfs -t command to create a file system on the volume.


sudo mkfs -t ext4 /dev/nvme1n1

Use the mkdir command to create a mount point directory for the volume. The mount
point is where the volume is located in the file system tree and where you read and
write files to after you mount the volume.
sudo mkdir /opt/xlparts

Mount the volume or partition at the mount point directory you created in the
previous step.
sudo mount /dev/nvme1n1 /opt/xlparts

You might also like