Here’s a step-by-step guide on extending a disk in AlmaLinux, typically done using Logical Volume Manager (LVM):
Check Current Disk Status:
First check the current disk status and directory using the following command:
df -khT
The device must be added for the additional disk added with this command.
We select the empty disk and click New.
We select the Type section, (8e Linux should be selected as LVM.)
We select the Write section and exit.
Update the kernel’s information about the current state of the disk partitions and ask it to re-read the partition table.
partprobeExtend Physical Volume (PV): Add the new disk space to the LVM as a physical volume:
pvcreate /dev/sda3Now that our physical space is created, we put our sda3 disk in the same group as other disks. In our structure, the group was determined as almalinux. To see this more clearly
pvdisplayWe add it to the group using this command.
vgextend almalinux /dev/sda3Extend Logical Volume (LV): Extend the Logical Volume (for example, “/dev/VG_NAME/LV_NAME”):
lvextend -l +100%FREE /dev/mapper/almalinux-rootFile System Extension: Update the file system size:
If you are using the XFS file system:
xfs_growfs /dev/mapper/almalinux-rootIf you are using the Ext4 file system:
resize2fs /dev/mapper/almalinux-root



