How to Use LVM to increase the size of the root Partition

Source: Internet
Author: User


How to Use LVM to increase the size of the root partition if linux is installed and the default value is selected when you select partition settings, lvm is used for management. After the system runs for a period of time, it finds that the disk capacity of the root partition is insufficient and needs to be expanded. What should we do? The lvm technology can be used to expand the root partition without damaging the partition table. Www.2cto.com 1: First Add a new disk to connect to the host. Start the instance and enter the system. Use root to log on, run fdisk, and add the new disk partition (omitted here ). Here we assume that all the disk capacity is divided into one partition and the partition is/dev/sdb1; 2: Create pv: pvcreate/dev/sdb1 3: Extended VG: vgextend/dev/VolGroup00/dev/sdb14: Run vgdisplay to view the expanded VG. If the displayed capacity increases, the VG is successfully expanded. 5: LV: lvextend-L + n (M, or G)/dev/VolGroup00/LogVol00/dev/VolGroup00 restart the machine, enter Resuce mode, and select skipp when loading the disk. Www.2cto.com 6: Activate VG: Run lvm vgchange-a y/dev/VolGgroup00 (activated by default) 7: Adjust the file system size: first run e2fsck to check the file system. E2fsck/dev/VolGroup00/LogVol008: resize2fs/dev/VolGroup00/LogVol00
 

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.