Linux Virtual Machine file system suddenly becomes read-only

Source: Internet
Author: User

In the svn checkout code process of virtual machine Linux, the "/" file system suddenly becomes read-only. dmsg can see that the kernel has an I/O error. Restarting the VM indicates that the disk is incorrect. Run "fsck/-y" to fix the disk error. This situation occurs several times. Sometimes the disk can be started after it is fixed, and then it cannot be started.

Re-install the VM and check the code. The host system runs many tasks and the system is slow. Once an svn checkout Error occurs, I used iotop in the host system (Ubuntu) to check the process I/O status, and found that the write speed of updatedb. mlocate is very high, reaching 10 Mb/s or more.

This page resolves the cause: High I/O causing filesystem upload uption

When the host system and Virtual Machine IO are busy, the virtual machine's IO request is not responded in a timely manner. Virtual Machine Linux does not know that it is running in the virtual machine, it will be considered as a disk IO error, in order to protect disk data, the remount partition will be read-only.

The solution can be found at the above link, but it is relatively advanced (using direct IO, modifying kernel parameters, and using LVM partitions ).

Simple solution:

1) do not run high I/O tasks simultaneously on the host system and Virtual Machine (do not think your i7 computer is amazing );

2) back up the Virtual Machine (copy the vmdk file or use the VirtualBox snapshot), and easily recover even if an error occurs.

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.