The problem-solving method of Debian Read-only file system

Source: Internet
Author: User
Tags touch

1. See how many partitions and their formats
Cat/etc/fstab
/dev/volgroup00/logvol03/opt ext3 Defaults 1 2

2. Test whether or not to write under each partition
Cd/opt
Touch x
Touch:cannot Touch ' x ': Read-only file system

3. Manually Repair/OPT partitions
The fsck front partition should be uninstalled first
Umount/opt (must be umount first to ensure partition is free)
can use Fuser when encountering system busy
Fuser-mk/opt

Repair in ext3 format
Fsck-t ext3/opt

And then mount the partition again to write
Mount/opt

Ps:
Do not repair directly mount partitions in read-write mode
Mount-o rw,remount/opt

The fsck operation is performed automatically when the system reboots

Problem Analysis Report

Problem reason: The system does not shut down properly, causing a file system error on the virtual disk.

Workaround: Manually repair with fsck by using the following actions:

After restarting the system, use root to enter Single-user mode and run

Fsck.ext3-y/dev/vda3

Description: The Ext3 file system uses the Fsck.ext3,ext4 file system to use FSCK.ETX4. /dev/vda3 is a system/root partition. After the operation is complete, the reboot reboot system will return to normal. More than 20 sets of problems are fixed in this way, no failure cases. FSCK.EXT3 began to scan, modified file system, this process is sometimes very fast, sometimes longer, the middle of a number of pauses in the process, just wait, you must not think that the crash and restart the server. After the file system has been fixed, you will need reboot to reboot the system without prompting you to reboot the system.

Extending Knowledge: fsck Introduction

Fsck can not only scan the file system, but also fix some problems with the file system. Note that when FSCK scans the filesystem, it must be done in Single-user mode, repair mode, or after the device is umount. It is recommended that you run in Single-user mode. If you scan a functioning system, you can cause system files to become corrupted.

File system scanning tools include fsck, FSCK.EXT2, Fsck.ext3, FSCK.EXT4, Fsck.msdos, Fsck.cramfs, Fsck.ext4dev, Fsck.vfat. It is best to invoke different scanning tools based on different file systems, such as the Ext3 file system using the Fsck.ext3,ext4 file system to use FSCK.EXT4.

/dev/vda3 is the ext3 file system, which describes the FSCK.EXT3 parameters:

Fsck.ext3

Syntax
fsck.ext3[necessary parameters [selection parameters] [equipment Code]

function
FSCK.EXT3 command: Detect repair for Ext3 file system

[Execute Permissions]
Root

Parameters

Necessary parameters

-A non-cross mode, automatic repair
-c check for damaged blocks.
-C FSCK.EXT3 command will be all the implementation process, all to its reverse narrative, easy to monitor the program
-d verbose display command execution procedure
-F Force for inspection
-F Clean the data in the storage block area before checking the file system
-L Add the damaged blocks listed in the file to the tag
-l Clear all corrupted flags, re mark
-N non-interactive mode, set the file system to be checked for read-only
-P Sets How many inode sizes the FSCK.EXT2 command can handle
-R Interactive Mode
-R ignores directories
-S sequential check
-S effect is similar to the specified "-S" parameter
-T displays timing information for the FSCK.EXT2 command.
-V Display detailed process
-Y Close Interactive mode

Select parameters

-b Specifies the starting address of the first field of the partition/super block
-B Sets the size of each chunk of the partition
-I set the number of blocks in the inode buffer for the file system to check
-V Display version information

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.