CentOs virtual machine hard disk expansion

1. Enter the command "df -h" to view the disk capacity

insert image description here

2. Close the virtual machine, open the virtual machine settings -> hard disk -> extension

insert image description here

3. Turn on the virtual machine and enter the command "fdisk -l" to view the size of /dev/sda3

insert image description here

4. Enter the command "fdisk /dev/sda" to modify its size

insert image description here

5. Enter the command "xfs_growfs /dev/sda3"

insert image description here

6. Check the disk capacity again "df -h"

insert image description here

Guess you like

Origin blog.csdn.net/weixin_43074760/article/details/130862420