Xen virtual machine can be used for server application integration, software development testing, etc., and the application is more and more widely used, but in the process of using, there will be insufficient space of Xen virtual hard disk space. How to solve it? The following small series will introduce you to how to expand the space of Xen virtual hard disk, let's learn together.
The method herein is applicable to the case of image file ext2 and ext3 file system:
Close Virtual Machine:
code is as follows:
# /usr/sbin/xm shutdown vm01
Append 4GB to the virtual machine image file (.img):
The code is as follows:
# dd if=/dev/Zero bs=1024k count=4096 》》 /vm/vm01.img
Scan check image file:
The code is as follows:
# /sbin/e2fsck -f /vm /vm01.img
This time just increased the size of the image file (hard disk). This image file is not a normal file. It contains a loop file system that can be mounted/umount, so you need to adjust the file system size. Otherwise, If you enter the virtual machine, df will find that the hard disk size has not changed:
The code is as follows:
# /sbin/resize2fs /vm/vm01.img
Restart the Xen virtual machine :
The code is as follows:
# /usr/sbin/xm create vm01
After entering the virtual machine, check the hard disk size:
Code is as follows:
# /usr/sbin/xm console vm01
# df -h
Here is the mount/umount, say a little off topic, from technology In view, the current VPS is actually not safe, because the VPS service provider can mount/umount your virtual machine files, partitions, and even write content at any time. If the root password of the server where your virtual machine is located is If the bad guys get it, then there is no security at all, and the bad guys can do whatever they want on your virtual machine. So security is a big problem in cloud computing, especially those that are built on virtual technologies. This may also be the reason why companies are reluctant to use public clouds. Some Startups just put unimportant data. On cloud storage like Amazon S3, it's better to keep confidential data for yourself. Therefore, VPSee believes that private clouds will have more room for development.
The above is a way to expand the Xen virtual hard disk space by Linux. Modifying the size of the Xen virtual hard disk is equivalent to modifying the size of the Xen image file, which can add 4 GB of space.
Using Ruby On Rails under Linux can make the maintenance and development of web applications more co
Using the xargs command on a Linux system can solve a lot of problems, especially t
Linux watch is a monitoring command, used to monitor the execution of the command,
Linux disk management is mainly implemented by commands. Today, Xiaobian will sort out the commands
How to manage modules in the Linux kernel?
How to boot a Linux ISO image file from the hard disk
Ubuntu system installation FFmpeg step
How Linux lists directories larger than the specified size
Linux system prompts can not get the lock /var/lib/dpkg/lock how to do?
How to upgrade Docker in Ubuntu system
Installing Linux mint graphic tutorial with U disk under Windows
Linux cancels the cp command to overwrite the file prompt method
How to mount iPhone under Arch Linux system
How to set Linux commands as keyboard shortcuts
Ask the big guys who know the computer!, Is the configuration genuine? How much is a total of
How to adjust the Win8 screen display ratio
How does Win7 quickly add the current time in Notepad without having to manually enter or copy
Win10 closes the image auto-compression function of the wallpaper
Vista can log in to QQ but IE can't open the solution
How to burn a disc in win8 system? Win8 burn disc detailed graphic steps