Expand the disk space of the xen Virtual System

Source: Internet
Author: User
Expand the disk space of the xen Virtual System-Linux general technology-Linux technology and application information. The following is a detailed description. A few days ago, I suddenly found that the xen virtual system went down and did not have any functions. When I arrived at the terminal, I saw that the hard disk was full.

I finally got it. The original disk space can still be expanded (as long as there is space on the physical disk)

1. Create a temporary file of the size you want to add (1 GB here)

Dd if =/dev/zero of =/tmp/temp_expand bs = 1024 k count = 10002. Disable the Virtual System

Xm shutdown yuki3. Add the temporary file you just created to the image of the xen virtual disk.

Cat/tmp/temp_expand>/xen-images/yuki. img4. redefine the disk image size.

Resize2fs-f/xen-images/yuki. img5. start the VM

Xm create-c/etc/xen/vm_yuki.config.sxp6. check whether it is successful.

Df-h: My results are very successful. I created the/tmp directory while creating temporary files, but I didn't find that/partition is not much bigger, after the temporary file is created, it is not as big as expected (not found at this time ). After completing the operation, I found that only 4 GB space was added. It would have been 10 Gb. In addition, the result of df-h viewing is also odd:

Size: 937 M
Used:-3.5G
Avail: 4.2G

Unsolved ing... The disk is being expanded for the second time. This is 40 GB.

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.