The home directory space in the CentOS 7 development environment is full and requires additional space
- Perform "ls/sys/class/scsi_host" on the virtual machine, and then rescan the SCSI bus to add the device. As pictured on the right. Then execute "fdsik-l" to verify that the addition was successful.
- Use FDISK to partition the newly added hard disk. As shown on the right
Then because of the logical volume, so the disk file system needs to be Linux LVM, if the P option to see the ID is not 8e, enter T, and then prompt for hex code, enter 8e on the line. Then enter P to view, if correct, the direct input w save on the line.
- Once you have created a partition, you need to create a physical volume. Execute the command pvcreate/dev/sdb1 Create the physical volume on the partition/DEV/SDB1. Then execute the command PVs to view the current physical volume, and of course it can be viewed with the Pvdisplay command.
- Execute command LVS View the volume group name that the home/home directory belongs to, and then add the newly created physical volume/DEV/SDB1 to the volume group to execute the command vgextend centos/dev/sdb1. Then execute VGS to see if the size of the volume group changes, i.e. whether the physical volume was added successfully.
- Expand the logical volume where home/home resides, execute command lvextend--resize-l +60g/dev/centos/home Increase the logical volume/dev/centos/home by 60G. Then execute df-lh to see if the/home directory space is increasing.
Linux adds new disks, expands space online