Add hard drive capacity to the CentOS virtual machine on the EXSi5.5

Source: Internet
Author: User
Tags hex code

Homestay Host Adjustment

1. Turn off the virtual machine,

2. Check if there is an existing snapshot, if any, you need to delete, otherwise you cannot adjust the disk capacity

3. Edit the configuration on the virtual machine, and then save the disk capacity

Virtual machine Adjustment

Refer to this article very detailed: Click to view

To extend the logical Volume:

Note: These steps only apply to EXT3 file systems. Caution: VMware recommends has a complete backup of the virtual machine prior making these changes.
  1. Power off the virtual machine.
  2. Edit the virtual machine settings and extend the virtual disk size. For more information, see increasing the size of a virtual disk (1004047).
  3. Power on the virtual machine.
  4. Identify the device name, which is by default /DEV/SDA, and confirm the new size by running the command:

    # fdisk-l

  5. Create A new primary partition:
    1. Run the command:

      # FDISK/DEV/SDA (depending the results of the Step 4)
    2. Press p to print the partition table to identify the number of partitions. By default there is 2:sda1 and sda2.
    3. Press N to create a new primary partition.
    4. Press p for primary.
    5. Press 3 for the partition number, depending the output of the partition table print.
    6. Press Enter The Times.
    7. Press T to change the system ' s partition ID
    8. Press 3 to select the newly creation partition
    9. Type 8e to change the Hex Code of the partition for Linux LVM
    10. Press W to write the changes to the partition table.

  6. Restart the virtual machine.
  7. Run This command to verify so the changes were saved to the partition table and that the new partition have an c2>8e Type:

    # fdisk-l

  8. Run This command to convert the new partition to a physical volume:

    Note: The number for the SDA can change depending on system setup. Use the SDA number is created in step 5.

    # Pvcreate/dev/sda3

  9. Run This command to extend the physical volume:

    # Vgextend Volgroup00/dev/sda3

    Note:to determine which volume group to extend, use the command vgdisplay.

  10. Run This command to verify how many physical extents is available to the Volume Group:

    # Vgdisplay VolGroup00 | grep "Free"

  11. Run the following command to extend the Logical Volume:

    # lvextend-l+ #G/dev/volgroup00/logvol00

    Where # is the number of the free space in GB available as per the previous command. Use the full number to output from Step including any decimals.

    Note:to determine which logical volume to extend, use the command lvdisplay.

  12. Run the following command to expand the ext3 filesystem online, inside of the Logical Volume:

    # ext2online/dev/volgroup00/logvol00

    Note: Use resize2fs instead of ext2online if it isn't a Red Hat virtual machine.

  13. Run the following command to verify this the/filesystem has the new space available:

    # Df-h/

Add hard drive capacity to the CentOS virtual machine on the EXSi5.5

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.