003. LVM resizing

Source: Internet
Author: User
1. LVM resizing steps
  1. Create a partition
  2. Create PV
  3. Resize VG
  4. Resize LV
  5. Load size
Ii. Create a partition

Use a partitioning tool (such as fdisk) to create LVM partitions, but identify the partitions as 8E of the LVM partition type.

  1 [[email protected] ~]# fdisk -l  2 ……  3    Device Boot      Start         End      Blocks   Id  System  4 /dev/sdb7         4202496     6299647     1048576   8e  Linux LVM  5 /dev/sdb8         6301696     8398847     1048576   8e  Linux LVM

Note: We recommend that you execute partprobe once.

3. Create a PV
1 [[email protected] ~] # Pvcreate/dev/sdb7 # convert the required partition to PV partition 2 physical volume "/dev/sdb7" successfully created 3 [email protected] ~] # Pvcreate/dev/sdb8 # convert the required partition to PV partition 4 physical volume "/dev/sdb8" successfully created

Iv. Resizing VG
1 [[email protected] ~] # Vgextend vg01/dev/sdb8/dev/sdb9 # Add the newly created PV to the existing VG 2 volume group "vg01" successfully extended

5. lv resizing

Note:

1. The premise for LV resizing is that there is sufficient capacity in VG.

2. lv and filesystem can be resized online, but cannot be scaled online.

1 [[email protected] ~] # Lvextend-L 2G-N/dev/vg01/lv01 2 # resize lv01 from vg01 to 2G instead of 2G.

Six Heavy Loads
1 [[email protected] ~] # Xfs_growfs/dev/vg01/lv01 # This is the heavy load size of XFS partition Format 2 [email protected] ~] # Resize2fs/dev/vg01/lv02 # This is the heavy load size of ext partition format

Note: The XFS file system can only be resized and cannot be resized.

003. LVM resizing

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.