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

gefragt vor 6 Jahren10071 Aufrufe
2 Antworten
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.

beantwortet vor 6 Jahren
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
beantwortet vor 5 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen