I am trying to extend the disk space on an AlmaLinux server (running on a VM).The goal is to add unallocated 10.00 GiB to the root partition (dev/sda2).What is the best way to do this without losing any data?
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTsda 8:0 0 310G 0 disk├─sda1 8:1 0 512M 0 part /boot├─sda2 8:2 0 4G 0 part /├─sda3 8:3 0 1G 0 part /tmp├─sda4 8:4 0 1K 0 part└─sda5 8:5 0 294.5G 0 part /var/lib/mysqlsdb 8:16 0 127G 0 disksr0 11:0 1 1024M 0 fromModel: Msft Virtual Disk (scsi)Disk /dev/sda: 333GBSector size (logical/physical): 512B/512BPartition Table: msdosDisk Flags:Number Start End Size Type File system Flags 1 1049kB 538MB 537MB primary ext4 boot 2 538MB 4833MB 4295MB primary xfs 3 4833MB 5907MB 1074MB primary xfs 4 5907MB 322GB 316GB extended 5 5908MB 322GB 316GB logical xfs
Number Start End Size Type File system Flags32.3kB 1049kB 1016kB Free Space1 1049kB 538MB 537MB primary ext4 boot2 538MB 4833MB 4295MB primary xfs3 4833MB 5907MB 1074MB primary xfs4 5907MB 322GB 316GB extended5 5908MB 322GB 316GB logical xfs322GB 333GB 10.7GB Free Space