Solve that there is no tool available to adjust the disk size via “gpt”
To
You can download this article in PDF format via the link below to support us.
Download the guide in PDF format
turn off
To
To
To
Have encountered an error message There is no tool to resize the disk with “gpt” Trying to expand GPT partition in Linux system? I received this error message today when trying to expand a Cinder volume in an OpenStack environment. The operating system I am running is CentOS7. Extend the Cinder volume using our previous article “How to resize/extend Cinder volume in OpenStack”.
I expanded the disk to 50GB But the available capacity 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
Resolve There is no tool to resize the disk with “gpt” We need to install the gdisk package. This package is required for gpt partition management.
Install Disk Pack the following commands,
--- CentOS / RHEL / Fedora ---
$ sudo yum -y install cloud-utils-growpart gdisk
--- Ubuntu / Debian ---
$ sudo apt install cloud-guest-utils gdisk
After installing the gdisk tool, you should now be able to use growpart to expand the size of the disk.
$ 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
Then, I can expand the file system to use the 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
Verify the updated configuration.
$ df -hT /data
Filesystem Type Size Used Avail Use% Mounted on
/dev/vdc1 xfs 50G 17G 34G 33% /data
We have successfully resolved There is no tool to resize the disk with “gpt” I encountered an error message when trying to use growpart to expand a Linux partition.
Linux learning courses:
Learn Linux in 5 days and improve your career
★★★★☆
(24467)
$20.18
$189.89
In stock
Udemy.com
Linux Administration Bootcamp: from entry to advanced
★★★★☆
(14107)
$ 15.43
$154.29
In stock
Udemy.com
Linux Proficiency: Master the Linux command line in 11.5 hours
★★★★★
(9631)
$ 15.43
$154.29
In stock
Udemy.com
To
To
To
You can download this article in PDF format via the link below to support us.
Download the guide in PDF format
turn off
To
To
To