Using the latest rockylinux-x86_64 9-lvm image from the Azure marketplace spun up a vm with the OS disk size at 8.9 GB. It seems most of the space is residing on another disk though the Azure vm only has one 128 GB disk. How can I extend the /dev/rocky/root logical volume to use this space in the root mountpoint?
Here’s what I’m looking at:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 128G 0 disk
├─sda1 8:1 0 99M 0 part /boot/efi
├─sda2 8:2 0 1000M 0 part /boot
├─sda3 8:3 0 4M 0 part
├─sda4 8:4 0 1M 0 part
└─sda5 8:5 0 8.9G 0 part
└─rocky-root 253:0 0 8.9G 0 lvm /
sdb 8:16 0 75G 0 disk
└─sdb1 8:17 0 75G 0 part /mnt
Filesystem Type Size Used Avail Use% Mounted on
devtmpfs devtmpfs 4.0M 0 4.0M 0% /dev
tmpfs tmpfs 3.8G 41M 3.8G 2% /dev/shm
tmpfs tmpfs 1.6G 17M 1.5G 2% /run
/dev/mapper/rocky-root xfs 8.9G 5.8G 3.1G 66% /
/dev/sda2 xfs 936M 462M 475M 50% /boot
/dev/sda1 vfat 99M 7.1M 92M 8% /boot/efi
/dev/sdb1 ext4 74G 28K 70G 1% /mnt
tmpfs tmpfs 769M 0 769M 0% /run/user/1000
--- Physical volume ---
PV Name /dev/sda5
VG Name rocky
PV Size <8.92 GiB / not usable 0
Allocatable yes (but full)
PE Size 4.00 MiB
Total PE 2283
Free PE 0
Allocated PE 2283
PV UUID VtYqiy-LKfB-HUNG-1JMw-z1J2-erkv-J1DxAs
--- Volume group ---
VG Name rocky
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 2
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 1
Open LV 1
Max PV 0
Cur PV 1
Act PV 1
VG Size <8.92 GiB
PE Size 4.00 MiB
Total PE 2283
Alloc PE / Size 2283 / <8.92 GiB
Free PE / Size 0 / 0
VG UUID aP15yq-8nxi-GVlJ-6dey-pCNW-lc9p-NArYOl
--- Logical volume ---
LV Path /dev/rocky/root
LV Name root
VG Name rocky
LV UUID O25bnO-xTrM-0g4D-oBew-3Ces-360G-LXKJV1
LV Write Access read/write
LV Creation host, time localhost.localdomain, 2023-11-13 15:54:37 +0000
LV Status available
# open 1
LV Size <8.92 GiB
Current LE 2283
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:0
Also when running fdisk -l I get this error (including the full output)
GPT PMBR size mismatch (20971519 != 268435455) will be corrected by write.
The backup GPT table is not on the end of the device.
Disk /dev/sda: 128 GiB, 137438953472 bytes, 268435456 sectors
Disk model: Virtual Disk
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 941C4570-5254-4F0D-AF19-315A371D1B7B
Device Start End Sectors Size Type
/dev/sda1 2048 204799 202752 99M EFI System
/dev/sda2 204800 2252799 2048000 1000M Linux filesystem
/dev/sda3 2252800 2260991 8192 4M PowerPC PReP boot
/dev/sda4 2260992 2263039 2048 1M BIOS boot
/dev/sda5 2265088 20969471 18704384 8.9G Linux LVM
Disk /dev/sdb: 75 GiB, 80530636800 bytes, 157286400 sectors
Disk model: Virtual Disk
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0xba9c16a6
Device Boot Start End Sectors Size Id Type
/dev/sdb1 2048 157284351 157282304 75G 7 HPFS/NTFS/exFAT
Disk /dev/mapper/rocky-root: 8.92 GiB, 9575596032 bytes, 18702336 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
I’m a little rusty on my Linux skills so I’d appreciate any help I can get.