0

I'm using Centos public images in https://wiki.centos.org/Cloud/AWS to launch EC2 instance, more detail I'm using T3.micro. After I modified volume size in AWS console, I can see a new size has been show in lsblk output command:

[root@ip-10-135-3-109 centos]# lsblk

    NAME        MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
    nvme0n1     259:0    0  12G  0 disk
    ├─nvme0n1p1 259:1    0   1M  0 part
    └─nvme0n1p2 259:2    0  10G  0 part /

[root@ip-10-135-3-109 centos]# df -h
Filesystem      Size  Used Avail Use% Mounted on
devtmpfs        367M     0  367M   0% /dev
tmpfs           396M     0  396M   0% /dev/shm
tmpfs           396M   11M  386M   3% /run
tmpfs           396M     0  396M   0% /sys/fs/cgroup
/dev/nvme0n1p2   10G  2.4G  7.7G  24% /
tmpfs            80M     0   80M   0% /run/user/1000

However, I could not extend the partition on the root volume

[root@ip-10-135-3-109 centos]# growpart /dev/nvme0n1 1
NOCHANGE: partition 1 is size 2048. it cannot be grown

If I reboot EC2, the instance can automatically extend the partition, but I don't want any downtime when expand EBS like this way. Any idea or what might causing this issue?

TylerH
  • 20,799
  • 66
  • 75
  • 101
Tien Dung Tran
  • 1,127
  • 4
  • 16
  • 32

1 Answers1

0

Changing command to "growpart /dev/nvme0n1 2" is fixed it.

Tien Dung Tran
  • 1,127
  • 4
  • 16
  • 32