How to join a virtual disk without restarting the VMware Virtual machine (top)

Source: Internet
Author: User

Recently, because the business need to do not restart the system under the premise of the system expansion, if the system has done LVM. However, there is not enough physical volume (hard disk), so it leads to the change of text. This paper is divided into two parts. This is the first part. Folder
    • Join disk
    • Do LVM
Join the hard drive

In order to implement the virtual machine to join the disk without restarting the virtual machine today, we have done the experiment.
First edit the virtual machine parameters in the Vsphere management interface, for example, as seen in.

Use command: Echo "---" >/sys/class/scsi_host/host0/scan
Can not restart the system to identify the newly added virtual disk, because just joined the 10G hard disk. For example, as seen in:
Do LVM

You can then use the Cfdisk command to format and mount the disk:
(1) Format the hard drive operation: Cfdisk->new->primary->type->8e (The reason is to do LVM)->write->quit
Use the Fdisk-l command to see the newly added disk partition:

(2) Add to LVM:
a. pvcreate /dev/sdb1
b. vgextend VolGroup /dev/sdb1
c. lvextend -L +10G /dev/VolGroup/lv_root
d. resize2fs /dev/VolGroup/lv_root

The original root folder is only 36G, and now look at df-h again. Can see that the growth of nearly 10G space.


How to join a virtual disk without restarting the VMware Virtual machine (top)

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.