CentOS 7 Space Expansion notes

Source: Internet
Author: User

A CentOS 7 machine root partition in a VMware virtual machine does not have enough space to expand.

    1. Modify the size of the hard disk by editing the virtual machine settings first

    2. Df-h Viewing partition space

      650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/7F/AE/wKioL1cpW6nD4mw1AABPqnQxFw8451.png "title=" 1.png " alt= "Wkiol1cpw6nd4mw1aabpqnqxfw8451.png"/>

    3. Fdisk-l viewing the number of partitions

650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/ Images/localimage.png ") no-repeat center;border:1px solid #ddd;" alt= "Spacer.gif"/>650 "this.width=650;" src= "http ://s4.51cto.com/wyfs02/m01/7f/ae/wkiol1cpw-wyvo3vaaclavvecwa673.png "title=" 2.png "alt=" Wkiol1cpw-wyvo3vaaclavvecwa673.png "/>

4.650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" border:1px solid rgb (221,221,221); background-position:50% 50%;background-repeat:no-repeat; "alt=" Spacer.gif "/> Partition the new hard drive

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 3 because it's already been used.
Enter default start sector
Enter default end sector
t Modify the partition type
Select partition 3
8e modified to lvm8e is LVM
W write partition Table

Reboot restart

5.fdisk-l Viewing partitions

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/7F/AE/wKioL1cpXSzAikzdAABWrCIgkew640.png "title=" 3.png " alt= "Wkiol1cpxszaikzdaabwrcigkew640.png"/>

6. Capacity expansion

LVM into LVM management LVM>Pvcreate/dev/sda3 This is the LVM that is required to initialize the partition that was just>vgextend Centos/dev/sda3 Add the initialized partition to the virtual volume group CentOS (volume and volume group commands can be vgdisplay) LVM>Vgdisplay- vLVM>Lvextend- L+2559/dev/mapper/centos-rootextend the capacity of an existing volume2559is the size LVM for PE free viewed through Vgdisplay>lvsView LV Capacity then you'll see that Root gets bigger. LVM>Quit quitting

7. True expansion of file systems

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M00/7F/B1/wKiom1cpZbzSjLkNAABskJH56JY224.png "title=" 4.png " alt= "Wkiom1cpzbzsjlknaabskjh56jy224.png"/>

CentOS 6 will be used under Resize2fs/dev/mapper/centos-root

8. View

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/7F/AF/wKioL1cpZuTg0MW5AABWoDnnkAU112.png "title=" 5.png " alt= "Wkiol1cpzutg0mw5aabwodnnkau112.png"/>

This article is from "Freshwater crab" blog, please be sure to keep this source http://adamcrab.blog.51cto.com/842470/1769943

CentOS 7 Space Expansion notes

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.