Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to optimize File system and disk check in Linux system

2025-04-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article focuses on "how to optimize the file system and disk checking in Linux system". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how the Linux system optimizes the file system and disk checking.

The data block in Linux is the basic data unit for storing data. In linux, the block size of 3 can be set to 1024 (1kB), 2048 (2KB) and 4096 (4KB) respectively. Block size determines the amount of disk occupied by files. For example, if you set the block size to 1024, no matter how big your file is, it will at least take up 1KB space, so you can set the block size reasonably according to the size of the file.

Set up blocks:

Mkfs.ext3-b 2046 / dev/hda5, formatted and set the data block to 2KB. In addition, linux has reserved blocks in each partition, which are reserved for root users and their groups. Other users cannot use them, usually 5% of the total data blocks, but if your disk is large, it will be wasted.

Mkfs.ext3-b 2046-m 2 / dev/hda5. Format and set the data block to 2KB and set the reserved block to 2%. Or use tune2fs-m 2 / dev/hda4 this method can be set without formatting. Tune2fs-l / dev/hda5, which can view the details of the file system, tune2fs-j / dev/hda4, can convert ext2 to ext3 without corrupting the data.

File system check tool: fsck e2fsck

E2fsck is dangerous to use and can not identify the file system very well, especially when mixed with ext2,ext3. The usage of fsck is fsck-t ext3 / dev/hda5 or fsck.ext3 / dev/hda5.

At this point, I believe that everyone on the "Linux system how to optimize the file system and disk checking" have a deeper understanding, might as well to the actual operation of it! Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report