0

There was 3TB EBS volume attached to an ec2 instance. I have increased the volume to 4TB.

I am trying to extending the partition size.

#lsblk
NAME        MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
nvme0n1     259:0    0   8G  0 disk
`-nvme0n1p1 259:1    0   8G  0 part /
nvme1n1     259:2    0   4T  0 disk
`-nvme1n1p1 259:3    0   3T  0 part

I tried -

 growpart /dev/nvme1n1 1

output

NOCHANGE: partition 1 could only be grown by -2147483615 [fudge=2048]

No change in partition size

#lsblk
NAME        MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
nvme0n1     259:0    0   8G  0 disk
`-nvme0n1p1 259:1    0   8G  0 part /
nvme1n1     259:2    0   4T  0 disk
`-nvme1n1p1 259:4    0   3T  0 part

I tried with xfs_growfs also. How I can extend the partition. It is XFS formatted.

Thanks in Advance.

lucy
  • 103

1 Answers1

2

You may have hit this issue or something similar.

First, make backups and ensure they are restorable.

Then you can use this method to resize the partition. In short, gdisk will happily work on mounted partitions, so you can delete this partition, create a larger one and partprobe to notify the kernel of changes while the partition is live. As long as beginning of the partition is at the same offset, the filesystem shouldn't be affected.

Then you can grow the FS.

If you can unmount the partition, I would prefer to do it with partition unmounted... I'd be less nervous and less likely to fat-finger something bad ;)

gronostaj
  • 58,482