3

I have an EC2 instance where I'm attempting to resize the disk on the fly. I've followed the instructions in this SO post but when I run sudo growpart /dev/nvme0n1p1 1, I get the following error:

FAILED: failed to get start and end for /dev/nvme0n1p11 in /dev/nvme0n1p1

What does this mean and how can I resolve it?


More info:

Output from lsblk:

NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
nvme0n1     259:0    0   300G  0 disk
└─nvme0n1p1 259:1    0   300G  0 part /

I can see that EBS volume is in the in-use (optimizing) state.

Thanks in advance!

jdixon04
  • 1,435
  • 16
  • 28
  • What size does it show in the AWS console? – jordanm Aug 13 '20 at 17:05
  • @jordanm 600 GiB – jdixon04 Aug 13 '20 at 17:55
  • 3
    `/dev/nvme0n1` must be used in the argument of `growpart`, not `/dev/nvme0n1p1`. The second argument `1` is the partition number. The number indicates the index you want to expand. – Gre-san Aug 13 '20 at 20:37
  • @Gre-san thanks! That's a key part I was missing. It didn't work at first but I waited a few hours and eventually it did. Not sure if that was related to the optimization process or what. Thanks again – jdixon04 Aug 14 '20 at 20:58
  • Feel free to add it as the answer and I'll mark it as accepted – jdixon04 Aug 14 '20 at 20:58
  • @Gre-san Can you make your comment an answer? The AWS docs clearly say what to do, still i managed to ignore it. The problem became clear after i saw your comment. – Dirk Lachowski Jan 18 '22 at 21:24

2 Answers2

0

But for me the solution didn’t work

 NAME     MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT

xvda 202:0 0 8G 0 disk └─xvda1 202:1 0 8G 0 part / xvdf 202:80 0 280G 0 disk ├─xvdf1 202:81 0 4G 0 part [SWAP] ├─xvdf2 202:82 0 10G 0 part /data1 ├─xvdf3 202:83 0 10G 0 part /data2 ├─xvdf4 202:84 0 1K 0 part ├─xvdf5 202:85 0 10G 0 part /applications1 ├─xvdf6 202:86 0 4G 0 part /applications2 ├─xvdf7 202:87 0 8G 0 part /logsOld ├─xvdf8 202:88 0 50G 0 part /extra ├─xvdf9 202:89 0 20G 0 part /logs └─xvdf10 202:90 0 64G 0 part /extra/tmp

growpart /dev/xvdf 10

FAILED: failed to get start and end for /dev/xvdf10 in /dev/xvdf

enter image description here

preetam singh
  • 2,200
  • 2
  • 6
  • 8
0

I think the name of the command growpart is a bit misleading, because following the aws instructions you should grow the disk:

sudo growpart /dev/nvme0n1 1

not the partition /dev/nvme0n1p1

Christina A
  • 390
  • 1
  • 10