RHEL6 root directory expansion

Source: Internet
Author: User

1. Target: root directory expansion. Df-h First, view the file system information.
2. Add a hard drive; Fdisk-l View the newly added hard drive:/dev/sdb
3. Format the disk, create a partition Fdisk/dev/sdb--View fdisk-l-->/DEV/SDB1
4. Fidsk/dev/sdb1-->t marked partition as LVM partition
5. Create an additional hard drive as a PV physical volume PVCREATE/DEV/SDB1-View PVs (Pvdisplay/pvscan)--PV:/DEV/SDB1; Vg:vg_rhel62; etc..
6. Add PV to the VG volume group that you want to expand Vgextend vg_rhel62/dev/sdb1--View VGS----Vsize has been expanded, (at this point the VG has been enlarged, but the file system needs to be expanded To see the LV path corresponding to the LV size or the original size)
7. LV Logical Volume Expansion: Lvextend-l + to expand the size of LVPATH/DEV/SDB1 (here is a trick, sometimes need to expand the new space in all, but because the system can not determine the number of expansion, for example, the new 20G space, but in the system may appear as 19.99G. At this point you can use a larger number in the command to expand, such as 50G, and then the system will prompt the need for XXXX extents, only yyyy extents available. This yyyy number is the total space that can be expanded, at this time in the command lvextend-l +yyyy LVPATH/DEV/SDB1 can be all capacity expansion)
8. Lvdisplay can see LV path corresponding to the LV size has been enlarged
9. Use Df-h to view the root directory size, and still need to extend the file system: Reszie2fs/dev/mapper/vg_rhel62-lv_root

Df-h view, the root directory has been enlarged.



Summary: (I do not know this is unclear ...) )

1. Concept:

/DEV/SDB: Open space;

Zoning: land for buildings;

LVM tag: Dormitory building;

PV: Dormitory building entity;

VG: Student dormitories;

LV: Student dormitory for freshman;

RESIZE2FS: Sticker;
2. Target: 10 dormitories for a university freshman are not enough, to add 100 student dormitories, and to divide 110 rooms into a freshman<--> target: root directory expansion
3. Apply for an empty space <--> add a hard drive; Fdisk-l View the newly added hard drive:/dev/sdb
4. Draw a piece in the open space to build the building (this section of the building, and other such as lane zoning, green belt zoning, etc., is not a building, can not be used for "dormitory") <--> format disk, create a partition Fdisk/dev/sdb--View fdisk-l--& Gt;/dev/sdb1
5. This building is used when the student dormitory uses the <--> fidsk/dev/sdb1-->t marked partition for LVM partitioning
6. Built-in building <--> build the added hard drive as a PV physical volume PVCREATE/DEV/SDB1-View PVs (Pvdisplay/pvscan)-PV:/dev/sdb1; Vg:vg_rhel62; etc..
7. After the floor is good, the school plans 100 rooms into "student dormitory" (there are other such as toilets, library and so on does not belong to the "student dormitory" this group), at this time the student dormitory already has 110, but the freshman student's dormitory still has only 10 rooms, Because the management office has not yet assigned the new 100 quarters to the freshman student to live. <--> PV added to the VG volume group to be expanded Vgextend VG_RHEL62/DEV/SDB1 to see VGS--and Vsize has been scaled up; Isplay can see LV path corresponding to the LV size or the original size)
8. The school assigns 100 rooms to the student management and tells them that this is for freshman dormitory <--> LV Logical Volume Expansion: lvextend-l + size to expand LVPATH/DEV/SDB1 (here is a trick, sometimes need to add all the space to expand in, However, because the system is not able to determine the number of expansion, for example, the new 20G space, but in the system may be displayed as 19.99G. At this point can be in the command with a larger number to expand, such as 50G, and then the system will be prompted to need xxxx extents, only yyyy extents available. This yyyy number is the total space that can be expanded, at this time in the command lvextend-l +yyyy LVPATH/DEV/SDB1 can be all capacity expansion)
9. Lvdisplay can see LV path corresponding to the LV size has been enlarged
10. Student management to the 100 rooms affixed with the number: Freshman dormitory. After that, the new freshman had a place to live <--> use df-h to view the root directory size, and still need to extend the file system: Reszie2fs/dev/mapper/vg_rhel62-lv_root
Df-h view, the root directory has been enlarged.

This article is from the "11176375" blog, please be sure to keep this source http://11186375.blog.51cto.com/11176375/1852693

RHEL6 root directory expansion

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.