Centos partition resizing

Source: Internet
Author: User
When a system partition resizing problem occurs, the user's mysql Directory has no space, and the/home directory still has 40 GB space. So I want to transfer the 40 GB space to the mysql directory. The peer partition distribution is shown in the figure below: Fortunately, both partitions are LVM partitions and are in the same VG. In order to test the feasibility, we made a special expansion test. As follows:

When a system partition resizing problem occurs, the user's mysql Directory has no space, and the/home directory still has 40 GB space. So I want to transfer the 40 GB space to the mysql directory. The peer partition distribution is shown as follows:

Fortunately, both partitions are LVM partitions and under the same VG.

 

In order to test the feasibility, we made a special expansion test. As follows:

This is my current partition. my idea is to release 8 GB space to the root/in/home /.

Step 1: uninstall/home

Step 2: resize2fs-p/dev/mapper/VolGroup-LogVo101 1G

 

 

Step 3: lvreduce-L 1G/dev/mapper/VolGroup-LogVo101

 

 

Step 4: lvextend-L + 8G/dev/mapper/VolGroup-Log100

 

 

Step 5: resize2fs-p/dev/mapper/VolGroup-Log100

 

Step 6: Check if df-TH is successful

 

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.