No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

How to Resolve File System Damages of the Linux-based VM

Publication Date:  2015-01-26 Views:  29 Downloads:  0
Issue Description
The file system of the Linux-based VM is damaged and therefore cannot be started. A user logs in to the VM through VNC and then can view the following three symptoms:
1. Symptom 1: During the startup of the Linux-based VM, a message is displayed indicating a file system error and the recovery mode is automatically entered.
Figure 1 Entering the recovery mode automatically


2. Symptom 2: During the startup of the Linux-based VM, a message is displayed indicating a file system error but the recovery mode is not automatically entered.
Figure 2 Not entering the recovery mode automatically


3. Symptom 3: After the Linux-based VM is started, artifacts occur directly and network ping tests fail.
Figure 3 Artifacts
Alarm Information
none.
Handling Process
1. If important data exists in the VM, back up the VM data before fixing the system.
2. Enter the repair filesystem or rescue mode.

Before fixing the file system, you need to enter the repair filesystem or rescue mode first. The following describes how to enter the repair filesystem or rescue mode separately when three symptoms occur:
  • Symptom 1
The system automatically enters the repair filesystem mode. After you enter the password for the root user, you can proceed to step 3.
  • Symptom 2
Enter the rescue mode by mounting the ISO of the VM system and then proceed to step 3.
Use SUSE10 SP3 (32-bit) as an example. Perform the following operations:
a) Mount the SUSE10 SP3 (32-bit) system installation DVD-ROM to the VM, boot the system from the DVD-ROM, and enter rescue to enter the rescue mode.
Figure 4 rescue mode 1


b) Enter root to enter the CLI in rescue mode.
Figure 5 rescue mode 2

  • Symptom 3
Enter any user name and password in the VNC window. If the system can be logged in to, a character window is displayed. Refer to the operations in symptoms 1 and 2 to enter the repair filesystem or rescue mode.
3. Fix the file system.
The fsck command is used to fix the file system. For specific functions of the command, see the man manual. This document only describes some commonly used functions.
a) To fix general file system damages, you only need to run the following command according to the error message displayed during system startup:
fsck -y /dev/*
Replace /dev/* with the specific device.
For example, during the system startup, a message is displayed indicating that the file system in the /dev/xvda2 partition malfunctions.
Figure 6 File system exception 1

(a) Run the following command in repair filesystem or rescue mode:
fsck -y /dev/xvda2
(b) If a message is displayed indicating that the partition has been mounted, as shown in Figure 7, do as follows:
Figure 7 Mounted partition

Enter n to stop fixing the system.
Run the following command to remount the partition in read-only mode:
mount -o remount,ro /dev/xvda2
Run the following command to fix the system again:
fsck -y /dev/xvda2
Figure 8 Mounting the partition in read-only mode


b) In some conditions, after you run the fsck -y /dev/* command to fix the reiserfs file system damage, a message is displayed indicating the system fails to be fixed.
Figure 9 Unsuccessful system fixing


At this time, run the following command according to the message to fix the system.
fsck.reiserfs --rebuild-tree /dev/xvda2
Figure 10 Fixing command


c) Restart the system.
Root Cause
The Linux file system is damaged.
Suggestions
If the system is forcibly shut down or restarted during its usage, the fsck operation will be performed for the disk in use, which may result in file system damages. In addition, some file system damages are difficult to fix.
Suggestions:
  •  If important data exists in the VM, back up the VM data before fixing the system. File system fixing operations may lead to loss of some system files.
  •  In some conditions, the file system may still malfunction after the fixing operations are complete. In this case, try the fixing operations again. If the file system cannot be fixed, apply a new VM to the customer and mount the system and data disks of the faulty VM as a data disk to the new VM, preventing customer data from being lost.

END