Growpart not working to expand a volume

0

I have an m4-large instance with an attached volume configured for 10GB but which originally was created for 4GB.
I am trying to expand the space, but get the following error:
sudo growpart /dev/xvdf 1
WARN: unknown label
failed [sfd_dump:1] sfdisk --unit=S --dump /dev/xvdf
/dev/xvdf: device contains a valid 'ext4' signature; it is strongly recommended to wipe the device with wipefs(8) if this is unexpected, in order to avoid possible collisions
sfdisk: failed to dump partition table: Success
FAILED: failed to dump sfdisk info for /dev/xvdf

df -h
Filesystem Size Used Avail Use% Mounted on
udev 3.9G 0 3.9G 0% /dev
tmpfs 799M 9.0M 790M 2% /run
/dev/xvda1 20G 18G 2.0G 91% /
tmpfs 3.9G 96K 3.9G 1% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
/dev/xvdf 3.9G 8.0M 3.6G 1% /alfresco
tmpfs 799M 20K 799M 1% /run/user/112
tmpfs 799M 0 799M 0% /run/user/1000

lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
xvda 202:0 0 20G 0 disk
ââxvda1 202:1 0 20G 0 part /
xvdf 202:80 0 10G 0 disk /alfresco

질문됨 6년 전10071회 조회
2개 답변
0

OK.
I instead used the command:
sudo resize2fs /dev/xvdf1

And that worked. I don't know why growpart did not work, but I am past that now.

답변함 6년 전
0

I'm not an expert but in my experience, I would say that;
growpart works w/ a volume that has partitions as you must put a partition number.
On the other hand, resize2fs works w/ all the types of volumes.
Note that if you are expanding the size of a root volume you would need to use both of the commands after you modify the instance size on form EBS volumes screen.

Steps are:

Modify the volume size from AWS management console.
Connect to your instance via SSH.
Expand the size on the volume partition eg.

sudo growpart /dev/xvda 1

Resize the volume partition sudo resize2fs /dev/xvda1

ankou
답변함 5년 전

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

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

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

관련 콘텐츠