- View CENTOS7 System mount point information
- Extend VMWARE-CENTOS7 hard disk space
- Partition and format the newly added hard drive
- Add new LVM to existing LVM groups for capacity expansion
1.View CENTOS7 System mount point information
Df-h Viewing mount point information
2. Expand VMWARE-CENTOS7 Hard Disk space
Turn off VMware's CENTOS7 system to set the size of the disk that needs to be increased in the VMware menu
If this option is grayed out, this virtual machine has a snapshot, delete all the snapshots and try again!
3. Partition and format the newly added hard drive
We have added space to the hard drive is/DEV/SDA
Partition:
[[Email protected]]# FDISK/DEV/SDA
P View the number of partitions (I see two/dev/sda1/dev/sda2)
n Add a new partition
P Partition Type we select Primary partition
Area code Input 3 (because it has already been used, SDA1 is partition 1,sda2 is partition 2,SDA3 partition 3)
Enter default (Start sector)
Enter default (end sector)
T modify the partition type
Select Partition 3
8e modified to LVM (8e is LVM)
W Write partition Table
Q Complete, exit the FDISK command
Use the Partprobe command or restart the machine
To format the Partition 3 command:
Mkfs.ext3/dev/sda3
4. Add new LVM to existing LVM group for capacity expansion
LVM into LVM Management
LVM>pvcreate/dev/sda3 This is the partition that was initialized just now 3
LVM>vgextend Centos/dev/sda3 Add the initialized partition to the virtual volume group CentOS (volume and volume group commands can be Vgdisplay)
LVM>vgdisplay- v or vgdisplay view free pe/site
LVM>lvextend -l +6143/dev/mapper/centos-root expands the capacity of an existing volume (6143 is to view free PE by Vgdisplay The size of the site)
lvm>pvdisplay view volume capacity, you will see a large volume
LVM>quit Exit
The above is just the volume expansion, the following is the real expansion of the file system, enter the following command:
CentOS7 the following due to the use of the XFS command:
/dev/mapper/centos-root is df-h to see the mount point of the root directory
Xfs_growfs/dev/mapper/centos-root
CentOS6 using the command:
Resize2fs/dev/mapper/centos-root
To view the new disk space:
Df-h
- Learning is a process of plagiarism, imitation, practice and innovation.
- Although, the garden already has oneself cannot surpass the same topic blog post, why still want to write.
- For yourself, the blog is just a summary. Identify problems in the process of summarizing and solve problems.
- For others, it would be nice if you could help others with this process.
- Due to the limited ability of Bo master, the text may exist in the description is not correct, welcome to correct, add!
- Thank you for reading. If the article is useful to you, please give it a little encouragement.
Sungeek Blog
An OPS little rookie.
http://www.cnblogs.com/Sungeek/
CentOS 7 Hard disk space expansion in VMware virtual machines