Extending AWS EBS volumes

0

I have an EC2 instance running Ubuntu 18-04 LTS - Bionic-Ubuntu 18-04 2019, by default the instance was created with 8GB disk size. Now I need to increase the disk size with no downtime (without restarting the machine). As per the below information I need to increase the volume "/dev/nvme0n1p1"

Please guide me how this can be done without rebooting the machine.

Filesystem Size Used Avail Use% Mounted on
udev 7.8G 0 7.8G 0% /dev
tmpfs 1.6G 844K 1.6G 1% /run
/dev/nvme0n1p1 7.7G 6.2G 1.6G 81% /
tmpfs 7.8G 24K 7.8G 1% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 7.8G 0 7.8G 0% /sys/fs/cgroup
/dev/loop0 90M 90M 0 100% /snap/core/8268
/dev/loop1 18M 18M 0 100% /snap/amazon-ssm-agent/1480
/dev/loop2 90M 90M 0 100% /snap/core/8039
tmpfs 1.6G 0 1.6G 0% /run/user/1000

ses2
질문됨 4년 전308회 조회
3개 답변
0
ses2
답변함 4년 전
0

Hello

You need to do following to successfully increase volume size

  1. Increase volume size from AWS console

    https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-modify-volume.html

  2. SSH into the instance.

  3. Extend the partition

    $ sudo growpart /dev/nvme0n1 1

  4. Find out type of filesystem and extend it (use command appropriate to file system that you have)

    $ sudo file -s /dev/nvme0n1p1

Then please follow commands given in document https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/recognize-expanded-volume-linux.html (check section extending file system) to find the commands related to ext and xfs file systems.

AWS
답변함 4년 전
0

you can refer the below blog for the powershell script that will extend the EBS volume by providing the drive letter, size to increase and instance name as an input and it will extend the EBS volume from AWS end as well as from OS end

Extend Live EBS Volume

Mayank
답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠