Linux practice engineer study Note 3: File System Maintenance

Source: Internet
Author: User
Linux practice engineer study Note 3: file system maintenance-general Linux technology-Linux technology and application information. The following is a detailed description. Original Author: junger

Ext2/ext3 store files through data blocks

Format a file system:

Mkfs. ext3? B 4096? I 8192? M 5/dev/sdb4

-B data block size

-I inode node indicates the number of bytes (or the size of the data block)

-M 5: 5% disk management space reserved by the Administrator

Ls? Lh/mnt/u

Du? Sh/mnt/u

Df? Lh

# Tune2fs? L/dev/sdb1 print file system attributes

# Df

Tune2fs tool for adjusting ext2/ext3 file system features

-L View File System Information

-M reserved block percentage

-C Set the number of mounting times for force self-check

-I Set the interval for force self-check

-J ext2 to ext3



Tune2fs? C-1/dev/sdb1 does not perform self-check no matter how many times it is attached.

Tune2fs? C-1? I 0/dev/sdb1 makes the partition never self-check

# Format mkfs. ext2/dev/sdb4 to ext2

# Tune2fs? J/dev/sdb4 to ext3

# Df? T view partition information

Determine whether ext2 or ext3 is used:

Tune2fs? L/dev/sdb1 | grep features

View Filesystem features: has_journal

Whether has_journal ext3 File System ext3



Grep? I "name" is case insensitive

Df? T partition type

Fsck tool for checking data integrity of the file system

Usage 1. fsck? T ext2/dev/sdb1

Ii. fsck. ext3/dev/sdb1

# More/etc/fstab

If one or two mounting options are found, self-check should be performed.

# Fsck. ext3? Y/dev/sdb1 Automatic repair error

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.