Linux File System maintenance tools

Source: Internet
Author: User
Article Title: Linux File System maintenance tools. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

Format hard disk

Mkfs. ext3? B 4096/dev/sda2 (1024 2048 4096)

Mkfs. ext3? B 4096? Is I 8192/dev/sda2? I indicates how many data blocks each index represents

View File System attributes

Tune2fs? L/dev/sdb1 | more (Inode count Block count ...)

Tune2fs? L/dev/sdb1 | grep Inode

Reserved Block

Disk management space reserved by the Administrator. The default value is 5% of the data block.

Mkfs. ext3? B 4096? I 8192? M 2/dev/sda2 (set the percentage of the number of reserved blocks to 2%)

Adjust the ext2/ext3 file system features in Tune2fs

O? LView File System Information

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

Tune2fs? C-1/dev/sda1 (never self-check)

O? I Set the interval for force self-check

Tune2fs? I-1/dev/sda1 (never self-check)

O? M Percentage of reserved Blocks

O? J. Convert the ext2 File System to the ext3 format

Msfs. ext2/dev/sda1

Mount/dev/sda4/mnt/d4

Df? T

Tune2fs? J/dev/sda4

Umount/mnt/d4

Mount/dev/sda4/mnt/d4

Df? T

This process is irreversible, but ext3 can be forcibly mounted to ext2

Mount? T ext2/dev/sda2/mnt/d2

File System check tools

Fsck tool for checking data integrity of the file system

Usage 1: fsck? T ext2/dev/sda1

Usage 2: fsck. ext2/dev/sda1

Fsck. ext3? Y/dev/sda1 Automatic Repair

E2fsck checks ext2/ext3 File System Tools (dangerous)

Disk Quota

The disk quota is used to limit the disk space used by ordinary users, so as not to affect everyone's use because of the waste of individual users.

Kernel support required

Only ext2/ext3 file systems are currently supported

User Program quota package required

Disk Quota configuration process

Mount a partition using the usrquota and kgquota options to activate Kernel support.

Mount? O usrquota, maid/dev/sdb1/mnt/d1 OR

Mount? O remount, usrquota, kgquota/

Init 1 (entering the single-user environment)

Quotacheck? Database file for cvuga checking and creating disk quotas

-C create database? V: What is the message creation Information? U user? G group-a all partitions that activate disk configuration

The created database is stored in the directory of each partition, and the computer needs to be restarted.

Edquota? U Allocate disk space and number of nodes to a specified user

The Quota command can be used to view User Quota usage.

View All users' Disk Quota repquota? A

Modify the expiration time of edquota? T (only for later Users)

Disable Disk Quota quotaoff/mnt/sd1

Enable Disk Quota quotaon/mnt/sd1

View More man quota

Manually modify vi/etc/fstab

Related Article

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.