Shrink the root partition under redhat6 LVM

Source: Internet
Author: User

Note:

Not all root partitions are resized and reduced online.

Root partitions can be resized online, but cannot be scaled out online.


1. the Linux system enters the rescue mode.


650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/37/8C/wKiom1OtI0axoW9PAAKdVjT0LeU899.jpg "Title =" qq20140627154837.png "alt =" wkiom1oti0axow9paakdvjt0clear899.jpg "/>


Select in sequence:

Welcome Page ---------- rescue installed system

Chose a language ------------- English

Keyboard type --------- us

Rescue method ------------------ Local CD/DVD

Setup networking ---------------- No

Rescue ------------------- SKIP (this is whether to mount the current partition to be skipped)

---------------- Shell start Shell

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/37/8B/wKioL1OtI4eTwolCAACwTkxhDsM001.jpg "Title =" qq201406271520.9.png "alt =" wkiol1oti4etwolcaacwtkxhdsm001.jpg "/>


Run

pvscan、vgscan、lvscan


650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/37/8C/wKiom1OtJGPR5B_OAAFFOKqLoCY336.jpg "Title =" qq20140627155227.png "alt =" wkiom1otjupl5b_oaaffokqlocy336.jpg "/>

Activate VG Partition

# lvchange -ay  /dev/vg-root/LogVol01



Force repair

e2fsck -f /dev/vg-root/LogVol01


650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/37/8C/wKioL1OtJXvxI8bGAAFMUYS5MpQ491.jpg "Title =" qq20140627155847.png "alt =" wkiol1otjxvxi8bgaafmuys5mpq491.jpg "/>


Shrink File System

resize2fs /dev/vg-root/LogVol01



650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/37/8E/wKiom1OtJnnC2W-_AACoFdGc_9w733.jpg "Title =" qq20140627160237.png "alt =" wKiom1OtJnnC2W-_AACoFdGc_9w733.jpg "/>


Reduce LVM LV


lvreduce -L 10G /dev/vg-root/LogVol01fsck /dev/vg-root/LogVol0


650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/37/8E/wKioL1OtJwGzQx58AAGtEOAuYRM362.jpg "Title =" qq20140627160547.png "alt =" wkiol1ot1_gzqx58aagteoauyrm362.jpg "/>


Restart the system


650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/37/8E/wKioL1OtKC6SVaNSAAExD2GWeAs782.jpg "Title =" qq20140627161116.png "alt =" wkiol1otkc6svansaaexd2gweas782.jpg "/>


This article is from the "Conny" blog, please be sure to keep this source http://conny.blog.51cto.com/3367680/1431670

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.