Resize a LVM partition on linux disk of Azure
I have created a Vm in Azure with Oracle Linux 9. I have selected a 128G disk but when I see the size of the partitions I see that it was not fully used.
[root@oraclelinux ~]$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 128G 0 disk
├─sda1 8:1 0 800M 0 part /boot
├─sda2 8:2 0 28.7G 0 part
│ ├─rootvg-rootlv 252:0 0 18.7G 0 lvm /
│ └─rootvg-crashlv 252:1 0 10G 0 lvm /var/crash
├─sda14 8:14 0 4M 0 part
└─sda15 8:15 0 495M 0 part /boot/efi
sdb 8:16 0 32G 0 disk
└─sdb1 8:17 0 32G 0 part /mnt
I need to add all extra space available to the rootvg-rootlv partition. I haven’t found in the Azure documentation a way. How is it possible to add more space to the partition with mount point / ?
[root@oraclelinux ~]$ parted /dev/sda print
Warning: Not all of the space available to /dev/sda appears to be used, you can fix the GPT to use
all of the space (an extra 205520896 blocks) or continue with the current setting?
Fix/Ignore? ignore
Model: Msft Virtual Disk (scsi)
Disk /dev/sda: 137GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
14 1049kB 5243kB 4194kB bios_grub
15 5243kB 524MB 519MB fat16 EFI System Partition boot, esp
1 525MB 1364MB 839MB xfs
2 1364MB 32.2GB 30.8GB lvm
Read more here: Source link
