KVM Resize Disk size

Source: Internet
Author: User

Goal:

Expansion of the KVM VM root disk from 80G to 400G


Operation:

1. View Current Disk information

[Email protected] centos-yum]# qemu-img info centos-yum.qcow2image:centos-yum.qcow2file format:qcow2virtual size:80g (85899345920 bytes) disk size:2.1gcluster_size:65536


2. View partition and File system Information

[Email protected] centos-yum]# virt-list-partitions centos-yum.qcow2/dev/sda1/dev/sda2[[email protected] Centos-yum ]# Virt-list-filesystems Centos-yum.qcow2/dev/sda1/dev/vg_centos65templ/lv_root


3. Create a new Qcow2 disk file with a size of 400G

Qemu-img create-f qcow2 Centos-yumroot.qcow2 400G

4. Expand the disk size

[[email protected] Centos-yum] #virt-resize--expand/dev/sda2--lv-expand/dev/vg_centos65templ/lv_root Centos-yum.qcow2 centos-yumroot.qcow2 .... Expanding/dev/sda2 using the ' pvresize ' method ... Expanding/dev/vg_centos65templ/lv_root using the ' resize2fs ' method ...  Resize operation completed with no errors. Before deleting the old disk, carefully check the resized disk boots and works correctly.



KVM Resize Disk size

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.