LVM Online Expansion disk (Ubuntu 14.04 server)

Source: Internet
Author: User

Mware Workstation 8 or VMware vsphere Client 6.0 (exsi 6.0)

(Premise: Your server needs to have a volume group that already exists before you can add new physical volumes to the volume group, and then scale the logical volumes)

Take VMware Workstation 8 as an example:

1, first add a virtual disk to the server with the client. (usually default)

After the final addition is done, a new disk is added.

2.

After I restarted the server, I recognized the new disk, SDB

3, FDISK/DEV/SDB, n new, p main partition, size their own adjustment (can default), remember to use the T conversion format of 8e (LVM partition code), the last W save!

Best Partprobe/dev/sdb re-read partition table

3. Create a new physical volume

Pvcreate/dev/sdb1

4, display the current physical volume information, a new physical volume has been added/DEV/SDB1

Pvdisplay

5. Display the existing volume group

Vgdisplay

There is a volume group called Vg-ubuntu, Volume group size 12.95g,free assignable space is 0, (that is, the volume group space has been allocated, there is no surplus, so we want to add a new physical volume to the volume group)

6, expand the volume group Vg-ubuntu, add the physical volume/DEV/SDB1 to the volume group Vg-ubuntu

Vgextend VG-UBUNTU/DEV/SDB1

After adding the success, then see free, add 10G of available space (now can be extended to the existing logical volume up)

7. Displays the case of the logical volume and expands the specified logical volume size.

Lvextend-l 22g/dev/vg-ubuntu/lv-data

Extension/dev/vg-ubuntu/lv-data This logical volume is final size 22G (note that the 22G here is the final size after expansion, not the increased capacity size)

8, although the logical volume size has been expanded, but the file system has not yet been recognized, it is necessary to recalculate the size of the logical volume/dev/vg-ubuntu/lv-data.

Resize2fs/dev/vg-ubuntu/lv-data

At this point, the LVM expansion is done!

LVM Online Expansion disk (Ubuntu 14.04 server)

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.