Linux system resizing LVM partitions

Source: Internet
Author: User
1. create a new partition: fdisk/dev/hdanl # select a logical partition. if not, create an extended partition first, then add the logical partition 1 # partition number (starting from 5),/dev/hda1 (select the number of the first partition) t8e # The partition type 8e indicates the LVM partition w # write to the partition table partprobe # Re-read the partition table mkfs? Te

1. create a new partition:

Fdisk/dev/hda

N

L # select a logical partition. If no, create an extended partition first, and then add a logical partition.

1 # partition number (starting from 5),/dev/hda1 (select the number of the first partition)

T 8e # partition type 8e indicates LVM partition

W # write to partition table

Partprobe # reread a partition table

Mkfs? T ext3/dev/hda6 # Format

Partx/dev/hda # view the partition table and usage of the current hard disk

II. create PV, resize VG, and LV

Pvcreate/dev/hda6

Vgdisplay # view the existing VG information. take the VG: VolGroup00 as an example.

Vgextend VolGroup00/dev/hda6 # Extended VolGroup00

Lvdisplay # view the existing LV information. the following uses the LV: LogVol01 as an example.

Lvextend? L 1G/dev/VolGroup00/LogVol01 # LV extension (size of space)

Resize2fs/dev/VolGroup00/LogVol01 # execute this reset size, which is effective for the currently used LogVol01

Df? H # Check the mounting status. the instance has been resized.

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.