This procedure works on Fedora based Linux distributions e.g. Fedora, CentOS, Rocky, Red Hat Enterprise Linux.
Login to vCenter UI, find the virtual machine you need to increase the disk space of and change the hard disk size and units to your desired size.

Command Line: Check the current physical disk layout.
lsblkBashResult: There is only 1 physical disk labelled SDA with a size of 900GB.
NAMEMAJ:MINRMSIZEROTYPEMOUNTPOINTS
sda8:00900G0disk
├─sda18:10600M0part/boot/efi
├─sda28:201G0part/boot
└─sda38:30898.4G0part
├─rl-root253:00896.4G0lvm/
└─rl-swap253:102G0lvm [SWAP]
sr011:011024M0romBashCommand Line: Scan the physical disk labelled SDA for any changes.
echo1>/sys/block/sda/device/rescanBashResult: This command does not have any output.
# NO OUTPUTBashCommand Line: Check the current physical disk layout.
lsblkBashResult: Notice that SDA now shows as been a physical disk with a size of 1.2TB.
NAMEMAJ:MINRMSIZEROTYPEMOUNTPOINTS
sda8:001.2T0disk
├─sda18:10600M0part/boot/efi
├─sda28:201G0part/boot
└─sda38:30898.4G0part
├─rl-root253:00896.4G0lvm/
└─rl-swap253:102G0lvm [SWAP]
sr011:011024M0romBashCommand Line: Use Dandified YUM to install the package.
dnfinstallcloud-utils-growpartBashResult: Dandified YUM has installed the package.
Lastmetadataexpirationcheck:2:17:26agoonTueMar308:25:222026.
Dependenciesresolved.
=======================================================================================================================================================================================
PackageArchitectureVersionRepositorySize
=======================================================================================================================================================================================
Installing:
cloud-utils-growpartx86_640.33-1.el9appstream34k
TransactionSummary
=======================================================================================================================================================================================
Install1Package
Totaldownloadsize:34k
Installedsize:75k
Isthisok [y/N]: y
DownloadingPackages:
cloud-utils-growpart-0.33-1.el9.x86_64.rpm286kB/s|34kB00:00
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total115kB/s|34kB00:00
Runningtransactioncheck
Transactionchecksucceeded.
Runningtransactiontest
Transactiontestsucceeded.
Runningtransaction
Preparing:1/1
Installing:cloud-utils-growpart-0.33-1.el9.x86_641/1
Runningscriptlet:cloud-utils-growpart-0.33-1.el9.x86_641/1
Verifying:cloud-utils-growpart-0.33-1.el9.x86_641/1
Installedproductsupdated.
Installed:
cloud-utils-growpart-0.33-1.el9.x86_64
Complete!BashCommand Line: Use the growpart utility to run a dry run of the process to extend partition number 3 of the physical disk labelled SDA.
growpart/dev/sda3--dry-runBashResult: The growpart utility dry run process reports the actions it will take when it is not used in dry run mode.
CHANGE:partition=3start=3328000old:size=1884108767end=1887436766new:size=2513254367end=2516582366
# === old sfdisk -d ===
label:gpt
label-id:ED0A7588-2032-4DE4-8360-6B569C854D64
device:/dev/sda
unit:sectors
first-lba:34
sector-size:512
/dev/sda1:start=2048,size=1228800,type=C12A7328-F81F-11D2-BA4B-00A0C93EC93B,uuid=02E74B9C-1704-4FEE-8F16-32FAB02CB10A,name="EFI System Partition"
/dev/sda2:start=1230848,size=2097152,type=0FC63DAF-8483-4772-8E79-3D69D8477DE4,uuid=64C2B81A-9613-4DD6-8D87-C3D75CD4D81D
/dev/sda3:start=3328000,size=1884108767,type=E6D6D379-F507-44C2-A23C-238F2A3DF928,uuid=80C9D957-0D30-42C0-A603-D9078982485D
# === new sfdisk -d ===
label:gpt
label-id:ED0A7588-2032-4DE4-8360-6B569C854D64
device:/dev/sda
unit:sectors
first-lba:34
sector-size:512
/dev/sda1:start=2048,size=1228800,type=C12A7328-F81F-11D2-BA4B-00A0C93EC93B,uuid=02E74B9C-1704-4FEE-8F16-32FAB02CB10A,name="EFI System Partition"
/dev/sda2:start=1230848,size=2097152,type=0FC63DAF-8483-4772-8E79-3D69D8477DE4,uuid=64C2B81A-9613-4DD6-8D87-C3D75CD4D81D
/dev/sda3:start=3328000,size=2513254367,type=E6D6D379-F507-44C2-A23C-238F2A3DF928,uuid=80C9D957-0D30-42C0-A603-D9078982485DBashCommand Line: Use the growpart utility to run the process to extend partition number 3 of the physical disk labelled SDA.
growpart/dev/sda3BashResult: The growpart utility process reports the actions has taken.
CHANGED:partition=3start=3328000old:size=1884108767end=1887436766new:size=2513254367end=2516582366BashCommand Line: Check the current physical disk layout.
lsblkBashResult: Notice that SDA partition 3 now shows as being a size of 1.2TB.
NAMEMAJ:MINRMSIZEROTYPEMOUNTPOINTS
sda8:001.2T0disk
├─sda18:10600M0part/boot/efi
├─sda28:201G0part/boot
└─sda38:301.2T0part
├─rl-root253:00896.4G0lvm/
└─rl-swap253:102G0lvm [SWAP]
sr011:011024M0romBashCommand Line: Run the Logical Volume Manager (LVM) physical volume display command.
pvdisplayBashResult: The Logical Volume Manager (LVM) displays the physical volumes.
---Physicalvolume---
PVName/dev/sda3
VGNamerl
PVSize1.17TiB/notusable1.98MiB
Allocatableyes
PESize4.00MiB
TotalPE306793
FreePE76800
AllocatedPE229993
PVUUIDsbrOJO-Ctwi-z7PT-Fta9-T8V8-Ubxi-Oob3G4BashCommand Line: Run the Logical Volume Manager (LVM) logical volume display command.
lvdisplayBashResult: The Logical Volume Manager (LVM) displays the logical volumes.
---Logicalvolume---
LVPath/dev/rl/swap
LVNameswap
VGNamerl
LVUUIDItRBdl-lcWU-SGQ1-sgBm-aOsH-dfVL-1Lud3B
LVWriteAccessread/write
LVCreationhost,timerocky-9.cloudbuildtools.com,2023-03-2612:17:46+0100
LVStatusavailable
# open 2
LVSize2.00GiB
CurrentLE512
Segments1
Allocationinherit
Readaheadsectorsauto
-currentlysetto256
Blockdevice253:1
---Logicalvolume---
LVPath/dev/rl/root
LVNameroot
VGNamerl
LVUUIDkGDYqY-Pwvw-8dR0-JIna-BZNC-eSNh-euFOPk
LVWriteAccessread/write
LVCreationhost,timerocky-9.cloudbuildtools.com,2023-03-2612:17:46+0100
LVStatusavailable
# open 1
LVSize896.41GiB
CurrentLE229481
Segments1
Allocationinherit
Readaheadsectorsauto
-currentlysetto256
Blockdevice253:0BashCommand Line: Run the Disk Free command with some additional parameters.
df--print-type--total--human-readableBashResult: The Disk Free command reports the current state of the filesystem.
FilesystemTypeSizeUsedAvailUse%Mountedon
devtmpfsdevtmpfs4.0M04.0M0%/dev
tmpfstmpfs1.8G01.8G0%/dev/shm
tmpfstmpfs731M8.8M723M2%/run
efivarfsefivarfs256K43K209K17%/sys/firmware/efi/efivars
/dev/mapper/rl-rootxfs897G606G291G68%/
/dev/sda2xfs1014M423M592M42%/boot
/dev/sda1vfat599M7.1M592M2%/boot/efi
tmpfstmpfs366M0366M0%/run/user/0
total-900G609G593G51%-BashCommand Line: Run the Logical Volume Manager (LVM) logical volume extend command.
lvextend--resizefs--extents+100%FREE/dev/rl/rootBashResult: The Logical Volume Manager (LVM) logical volume extend command completes the partition extension and also resizes the filesystem.
Filesystemxfsfoundonrl/rootmountedat/.
Sizeoflogicalvolumerl/rootchangedfrom896.41GiB (229481extents) to<1.17 TiB(306281extents).
Extendingfilesystemxfsto<1.17TiB (1284635623424bytes) on rl/root...
xfs_growfs/dev/rl/root
meta-data=/dev/mapper/rl-rootisize=512agcount=219,agsize=1075456blks
=sectsz=512attr=2,projid32bit=1
=crc=1finobt=1,sparse=1,rmapbt=0
=reflink=1bigtime=1inobtcount=1nrext64=0
data=bsize=4096blocks=234988544,imaxpct=25
=sunit=0swidth=0blks
naming=version2bsize=4096ascii-ci=0,ftype=1
log=internallogbsize=4096blocks=2560,version=2
=sectsz=512sunit=0blks,lazy-count=1
realtime=noneextsz=4096blocks=0,rtextents=0
datablockschangedfrom234988544to313631744
xfs_growfsdone
Extendedfilesystemxfsonrl/root.
Logicalvolumerl/rootsuccessfullyresized.BashCommand Line: Run the Logical Volume Manager (LVM) logical volume display command.
lvdisplayBashResult: The Logical Volume Manager (LVM) displays the logical volumes.
---Logicalvolume---
LVPath/dev/rl/swap
LVNameswap
VGNamerl
LVUUIDItRBdl-lcWU-SGQ1-sgBm-aOsH-dfVL-1Lud3B
LVWriteAccessread/write
LVCreationhost,timerocky-9.cloudbuildtools.com,2023-03-2612:17:46+0100
LVStatusavailable
# open 2
LVSize2.00GiB
CurrentLE512
Segments1
Allocationinherit
Readaheadsectorsauto
-currentlysetto256
Blockdevice253:1
---Logicalvolume---
LVPath/dev/rl/root
LVNameroot
VGNamerl
LVUUIDkGDYqY-Pwvw-8dR0-JIna-BZNC-eSNh-euFOPk
LVWriteAccessread/write
LVCreationhost,timerocky-9.cloudbuildtools.com,2023-03-2612:17:46+0100
LVStatusavailable
# open 1
LVSize<1.17TiB
CurrentLE306281
Segments1
Allocationinherit
Readaheadsectorsauto
-currentlysetto256
Blockdevice253:0BashCommand Line: Run the Disk Free command with some additional parameters.
df--print-type--total--human-readableBashResult: The Disk Free command reports the current state of the filesystem.
FilesystemTypeSizeUsedAvailUse%Mountedon
devtmpfsdevtmpfs4.0M04.0M0%/dev
tmpfstmpfs1.8G01.8G0%/dev/shm
tmpfstmpfs731M8.8M723M2%/run
efivarfsefivarfs256K43K209K17%/sys/firmware/efi/efivars
/dev/mapper/rl-rootxfs1.2T608G589G51%/
/dev/sda2xfs1014M423M592M42%/boot
/dev/sda1vfat599M7.1M592M2%/boot/efi
tmpfstmpfs366M0366M0%/run/user/0
total-1.2T609G593G51%-BashDiscover more from Cloud Build Tools
Subscribe to get the latest posts sent to your email.
