Extended logical partitions and extended logical volume groups under Linux

Source: Internet
Author: User

At first I have a small misunderstanding, a moment not figured out now, hope will not be repeated.

Before practicing, I first added a piece of 10G hard disk and then partitioned the disk: the following

Fdisk/dev/sdb N P 4 t 8e W

Pvcreate/dev/sdb4

Pvdisplay

Vgcreate VG01/DEV/SDB4

Vgdisplay

Lvcreate-l 100m-n lvdata1 VG01

Mkfs-t ext3/dev/vg01/lvdata1

Note The key is here the 100M, originally 10G hard disk, I opened only divided the 100M logical partition, the result 100M logical partition ran out, I in Add space, puzzled.

Lvextentd-l +100m/dev/vg01/lvdata1 Note that the space added here, and so on, when added to 10G, the disk has run out of space. You can only expand a volume group by adding a disk.

Resize2fs/dev/vg01/lvdata1


What if the logical partition space in all logical volume groups is exhausted? Increase the logical volume group. Add a piece of hard disk 10G.

FDISK/DEV/SDC N P 1 t 8e W

Pvcreate/dev/sdc1

PVs

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/4C/F1/wKioL1RH_rGzldeRAABfuRa4DPQ217.jpg "title=" 9.jpg " alt= "Wkiol1rh_rgzlderaabfura4dpq217.jpg"/>

At this point the/DEV/SDC1 has not been VG01, so the logical volume group VG01 is extended.

Vgextend VG01/DEV/SDC1

PVs

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/4C/F0/wKiom1RH_xKAMO8FAABupEPKcTk060.jpg "title=" 10.jpg "alt=" Wkiom1rh_xkamo8faabupepkctk060.jpg "/>

At this point in the extended logical partition, there is space to allocate.

Summarize:

To extend a logical volume command:

Lvdisplay

Lvextend-l 100m/dev/vg01/lvdata1 ( This value is what the above command shows you see )

Resize2fs/dev/vg01/lvdata1

Extending Logical Volume Groups

Vgextend VG01/DEV/SDC1

PVs

To delete a logical volume:

Umount/lvm

Modify/etc/fstab

Lvremove

Vgremove/dev/vg01

Pvremove/dev/sdb4/dev/sdc1

This article is from the "Common Documents" blog, so be sure to keep this source http://yujianglei.blog.51cto.com/7215578/1566983

Extended logical partitions and extended logical volume groups under Linux

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.