Establishment and division of Linux logical volumes

Source: Internet
Author: User


Requirements Description

1. Add three disks with a size of 20GB SDC SDD SDE

2. convert three hard drives to physical volumes and establish SDC SDD two pv as

SIMPLE_VG The volume group and extends the SDE into the volume group

3. Create a logical volume named Simple_lv, size 30G, and set the logic

volume to establish the Ext4 file system. Mount to /simpletest directory

4. Extend the simple_lv to 50GB

5. Delete established logical volumes, volume groups, and physical volumes (in strict order of attention)

The steps are as follows:

    • Fdisk–l View Current disk condition, we will see BCDE Four disk, size is 20G

650) this.width=650; "width=" 499 "height=" 536 "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 "/>

    • View the physical volume that is currently present

650) this.width=650; "Width=" 530 "height=" "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 "/>

    • Create Physical volume (PV)

650) this.width=650, "width=" 416 "height=", "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, "width=" 416 "height=", "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 "/>

    • Create a volume group (VG) named SIMPLE_VG

650) this.width=650, "width=" 554 "height=", "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 "/>

    • Viewing volume groups

650) this.width=650; "Width=" 554 "height=" 434 "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 "/>

    • Extend the SDE into the volume group

650) this.width=650; "Width=" 465 "height=" 104 "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 "/>

    • you can see that the capacity of the volume group has increased to 80G

650) this.width=650; "Width=" 554 "height=" 374 "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 "/>

    • Establish a logical volume named SIMPLE_LV with a size of 30G (-N for the logical volume name and-L for the size of the logical volume to be established )

650) this.width=650; "Width=" 553 "height=" 422 "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 "/>

    • format the established logical volumesin EXT4 format

650) this.width=650; "width=" 445 "height=" "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ( "/e/u261/themes/default/images/word.gif") no-repeat center;border:1px solid #ddd; "alt=" Spacer.gif "/>

    • Mount a logical volume to view mount status

650) this.width=650; "Width=" 554 "height=" 283 "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 "/>

    • expanding the logical volume to 50G ( the size of the capacity extended to-L)

650) this.width=650, "width=" 531 "height=", "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 "/>

    • viewing logical Volume Information

650) this.width=650; "Width=" 554 "height=" 257 "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 "/>

    • At this point we look at the actual partition occupancy and find that the file system partition for the logical volume has not changed

650) this.width=650; "Width=" 554 "height=" of "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 "/>

    • We need to expand the file system at this point

650) this.width=650; "Width=" 554 "height=" 222 "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 "/>

    • Finally, the established logical volume / volume Group / physical volume is deleted

Cancel mount, delete logical volume first

650) this.width=650; "Width=" 553 "height=" 317 "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; "Width=" 554 "height=" "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 "/>

    • Delete a volume group

650) this.width=650; "Width=" 490 "height=" "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 "/>

    • Delete a physical volume

650) this.width=650; "Width=" 554 "height=" 133 "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 "/>

At this point, the experiment is complete.

Environment:VMware 11

System:CentOS 6.5


This article is from the "Cellen" blog, make sure to keep this source http://cellen.blog.51cto.com/1401366/1882041

Establishment and division of Linux logical volumes

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.