Resize/partition LVM

Source: Internet
Author: User
# Lvscan  (view LV partition)



ACTIVE '/dev/volgroup/lv_root ' [2.5 GiB] Inherit
ACTIVE '/dev/volgroup/lv_swap ' [2 Gib] Inherit

# Lvdisplay (show LV details)

# Lvreduce-l -1000m/dev/volgroup/lv_swap (reduce the Lv_swap partition size by 1000M.) Swap partition 1G enough)

# Lvextend-l +920m/dev/volgroup/lv_root (Expand the Lv_root partition 992M, here to explain, I originally released 1000M space, but check the rest of the space found only 992M, So I added this number, for specific reasons.

It's just changed the size of the Lv_root partition, but the root file system is still 2.5G with df-h, and then you need to resize the file system. You need to uninstall the partition you want to adjust first. Because I am the root directory cannot uninstall. I started the system with the ISO CD and entered the following command on the live system:

# Resize2fs/dev/volgroup/lv_root (make the increased logical volume take effect immediately)

# Lvscan (show adjusted LV situation)

ACTIVE '/dev/volgroup/lv_root ' [3.53 GiB] Inherit
ACTIVE '/dev/volgroup/lv_swap ' [992.00 MiB] Inherit

# Df-h (Display the adjusted file system)

FileSystem Size Used Avail use% mounted on

/dev/mapper/volgroup-lv_root 3.5G 2.4G 1.1G 70%/

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.