Home > Software design >  Redhat Increasing disk partition in linux
Redhat Increasing disk partition in linux

Time:09-28

I have a disk in azure redhat. I increased the size from 128GB to 256 GB. I restarted it and mounted it again. It is gpt partion.For lsblk /dev/sdc1 is showing it already has 256 GB but df -h is showing 128GB.

lsblk /dev/sdc1
NAME MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sdc1   8:33   0  256G  0 part /datapoint

df -h
/dev/sdc1                  128G   41G   88G  32% /datapoint.

lsblk
sdc                 8:32   0  256G  0 disk 
└─sdc1              8:33   0  256G  0 part /datapoint

I tried to increase the partition with growpart growpart /dev/sdc 1. And I am having unable to extend partition with growpart - partition 1 could only be grown by 2046 error. Is there any way to increase the partition. Thanks. This is xfs file system.

CodePudding user response:

You need to grow the filesystem according to the new partition size. growpart does not do this.

For XFS you use xfs_growfs to do the job on a mounted filesystem:

xfs_growfs -d /datapoint
  • Related