Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Redhat Increasing disk partition in linux

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.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

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
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading