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
回答済み 1年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ