2

I am working on EC2 instance on AWS.

OS is CentOS 6.5 and paravirtualized.

When I started instance, I enter SSD storage as 32GB.

But in instance, only 8GB is mounted.

So I expand block on /dev/xvda (which was mounted on `/@) from 8GB to 32GB.

And I tried to run command resize2fs /dev/xdva1 but got error like below:

Filesystem at /dev/xvda1 is mounted on /; on-line resizing required
old desc_blocks = 1, new_desc_blocks = 2
Performing an on-line resize of /dev/xvda1 to 8388352 (4k) blocks.
resize2fs: Operation not permitted While trying to add group #81

And System Error on AWS management console:

EXT4-fs warning (device xvda1): ext4_group_add:1605: No reserved GDT blocks, can't resize
EXT4-fs warning (device xvda1): ext4_group_add:1605: No reserved GDT blocks, can't resize
EXT4-fs warning (device xvda1): ext4_group_add:1605: No reserved GDT blocks, can't resize
EXT4-fs warning (device xvda1): ext4_group_add:1605: No reserved GDT blocks, can't resize
EXT4-fs warning (device xvda1): ext4_group_add:1605: No reserved GDT blocks, can't resize

Here are current status

  • df -h

    df -h

  • lsblk

    lsblk

I want /dev/xvda1 to increase to 32GB or newly make /dev/xvda2 as remain disk.

How can I make it?

2 Answers 2

3

The reason for this is that when you create a new file system - certain file system structures are reserved for a possible file system expansion later on (inodes, block bitmaps).
Those structures are stored in so called GDT - Group Descriptor Table.
So what happened - when your original file system was created amount of reserved structures was not enough for extending this file system to 32GB.
Try to expand it to a smaller size - let's say 16GB (so you would have to resize your partition once again to a smaller size.
If you must have 32GB - you can't expand it online. You would have to backup your data and resize offline.
What type of root disk is your instance running?

  1. Is it instance-store or
  2. EBS

Cause depending on which one it is - your file system expansion strategy will be different.

Take a look at these docs:

1

In AWS management console, I stopped ec2 instance and detached volume.

I attached other instance not as boot device, and run fsck, resize2fs.

It worked because I run these command in off-line and not mounted.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .