vmware+centos7.3 for LVM expansion

Source: Internet
Author: User

    • Configuration environment: vmware+centos7.3.

      650) this.width=650; "Src=" https://s4.51cto.com/wyfs02/M01/9A/43/wKioL1lTcF7Qls1xAALfgiw3BFM691.png-wh_500x0-wm_ 3-wmp_4-s_1088178307.png "title=" LVM composition Diagram "alt=" Wkiol1ltcf7qls1xaalfgiw3bfm691.png-wh_50 "/>

    • The initial allocation disk size is not enough, need to increase space, LVM is a very practical solution, (from Amin) is the LVM composition diagram. Physical Volume>volume group>logical volume. This logical volume space is not enough, can rely on other surplus logical volume to expand. If there is no extra logical volume, you can re-partition from a new disk. Of course, the virtual machine can directly increase the disk space, this is not discussed. Here are the steps:

    1. Create a new LVM disk environment

650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M02/9A/44/wKioL1lTd2_goqUIAABL185bpH0079.png "title=" _ 20170628173109.png "alt=" Wkiol1ltd2_goquiaabl185bph0079.png "/>

2.fdisk partition, change the ID to 8e, divide this disk into 1 primary partitions and 1 logical partitions. (You can partition yourself according to the actual situation)

Fdisk/dev/sdb Start partition

N New Partition

P format as primary partition

+5g sector default, size 5G

T change ID to 8e

The rest of the partitioning operation is similar

650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M02/9A/44/wKiom1lTfBPRGaFUAAA6pf0g1JQ158.png "title=" _ 20170628175100.png "alt=" Wkiom1ltfbprgafuaaa6pf0g1jq158.png "/>

P View partition Status

650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M02/9A/44/wKiom1lTe8fSaqjgAAAVFJHhtwY896.png "title=" _ 20170628174928.png "alt=" Wkiom1lte8fsaqjgaaavfjhhtwy896.png "/>

W Save exit


3.PVCREATE/DEV/SDB1 and PVCREATE/DEV/SDB5 Create physical volume

650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M00/9A/45/wKioL1lTfNCQ_REBAAAcDSmY8tM215.png "title=" _ 20170628175235.png "alt=" Wkiol1ltfncq_rebaaacdsmy8tm215.png "/>

4. PVS Display Physical Volume details

650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M02/9A/44/wKiom1lTfRex7crvAAAMSLcyfAU219.png "title=" _ 20170628175528.png "alt=" Wkiom1ltfrex7crvaaamslcyfau219.png "/>

5.vgcreate VG1/DEV/SDB1/DEV/SDB5 SDB1+SDB5 Synthesis Volume group

650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M00/9A/44/wKiom1lTfa2zfR87AAAK_fVHcgE039.png "title=" _ 20170628175758.png "alt=" Wkiom1ltfa2zfr87aaak_fvhcge039.png "/>

6.vgs Display Volume Group details

650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M00/9A/45/wKioL1lTfdmBVZEnAAAKHozHNWQ397.png "title=" _ 20170628175841.png "alt=" Wkiol1ltfdmbvzenaaakhozhnwq397.png "/>

7.lvcreate-l 1000m-n lv1 VG1 Create a 1000M logical volume

650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M02/9A/45/wKioL1lTfpmTkLlNAAAI5zCDvVE537.png "title=" _ 20170628180155.png "alt=" Wkiol1ltfpmtkllnaaai5zcdvve537.png "/>

8.MKFS.EXT4/DEV/VG1/LV1 formats Lv1 as EXT4 or as XFS (centos7.3 default format), but XFS does not support scaling, suggesting or ext4

650) this.width=650; "src=" Https://s5.51cto.com/wyfs02/M02/9A/45/wKiom1lTfyGziKwgAABGgOWcKj8113.png "title=" _ 20170628180356.png "alt=" Wkiom1ltfygzikwgaabggowckj8113.png "/>

9.mount/dev/vg1/lv1/mnt mount the LV1 to/mnt (you can also mount to the partition you want)

Df-h Display Disk Mount

650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M02/9A/45/wKiom1lTf9PSSnNUAAArh4HWGOc345.png "title=" _ 20170628180706.png "alt=" Wkiom1ltf9pssnnuaaarh4hwgoc345.png "/>

10. If you add automatic mount in/etc/fstab may restart error, need to enter the root password (Chinese box is not displayed Chinese characters), Vi/etc/fstab, comment out the automatic mount parameters, restart can

650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M01/9A/45/wKioL1lThBCghKc7AAA8n0YU2aE656.png "title=" _ 20170628180854.png "alt=" Wkiol1lthbcghkc7aaa8n0yu2ae656.png "/>

650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M00/9A/46/wKioL1lThFfgg3l2AABUWX4hKK0181.png "title=" _ 20170628181219.png "alt=" Wkiol1lthffgg3l2aabuwx4hkk0181.png "/>

One. normal use time a long, lv1 space is not enough, need to expand, first unload Mount Unomnt/mnt

650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M01/9A/45/wKiom1lTh8PwY1jfAAAkBB4wtJk101.png "title=" _ 20170628184003.png "alt=" Wkiom1lth8pwy1jfaaakbb4wtjk101.png "/>

12.lvresize-l 4000m/dev/vg1/lv1 rewrite lv1 space is 4000M, because before VG1 altogether 10G, so expands to 4G no problem.

E2fsck-f/dev/vg1/lv1 Check for disk errors

RESIZE2FS/DEV/VG1/LV1 Updating Logical Volume Information

Re-mount using

650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M02/9A/45/wKiom1lTiQ6D5jX5AABPOu3OwT0713.png "title=" _ 20170628184630.png "alt=" Wkiom1ltiq6d5jx5aabpou3owt0713.png "/>

650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M00/9A/45/wKiom1lTiUfQd9utAAAqHCriZgo763.png "title=" _ 20170628184727.png "alt=" Wkiom1ltiufqd9utaaaqhcrizgo763.png "/>

LV1 has become 4G after mounting




vmware+centos7.3 for LVM expansion

Related Article

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.