Learn how to – Resolve no tools available to resize disk with ‘gpt’.
Ever encountered an error message no tools available to resize disk with ‘gpt’ while trying to extend a GPT partition in a Linux system?. I got this error message today while attempting to extend a Cinder Volume in OpenStack environment. The operating system I’m running is CentOS 7. The Cinder volume was extended using our previous article How To resize/extend Cinder Volume in OpenStack.
I extended the disk to 50GB but the capacity usable is still 20GB.
# lsblk /dev/vdc
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
vdc 253:32 0 50G 0 disk
└─vdc1 253:33 0 20G 0 part /data
To resolve no tools available to resize disk with ‘gpt’ we need to install gdisk package. This package is required for gpt partition management.
Install gdisk package with the commands below,
### CentOS / RHEL / Fedora ###
sudo yum -y install cloud-utils-growpart gdisk
### Ubuntu / Debian ###
sudo apt update
sudo apt install cloud-guest-utils gdisk
After the installation of the gdisk tool, you should now be able to extend the size of the disk using growpart.
$ sudo growpart /dev/vdc 1
CHANGED: partition=1 start=2048 old: size=41938944 end=41940992 new: size=104855518 end=104857566
Confirm size growth:
$ sudo lsblk /dev/vdc
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
vdc 253:32 0 50G 0 disk
└─vdc1 253:33 0 50G 0 part /data
I can then grow the filesystem to use entire available space.
$ sudo xfs_growfs /data
meta-data=/dev/vdc1 isize=512 agcount=4, agsize=1310592 blks
= sectsz=512 attr=2, projid32bit=1
= crc=1 finobt=0 spinodes=0
data = bsize=4096 blocks=5242368, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0 ftype=1
log =internal bsize=4096 blocks=2560, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
data blocks changed from 5242368 to 13106939
Validate updated configurations.
$ df -hT /data
Filesystem Type Size Used Avail Use% Mounted on
/dev/vdc1 xfs 50G 17G 34G 33% /data
We have successfully solved no tools available to resize disk with ‘gpt’ error message encountered when trying to extend a Linux partition with growpart.
Leave a Reply
You must be logged in to post a comment.