In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail the example analysis of linux hard disk partition planning. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.
Before installing linux, make a good plan, mainly based on the following principles:
The capacity of the disk.
The size of the system.
The purpose of the system.
Expected backup method and backup space.
Mainly talk about the partition to be done according to the use of the system.
The first thing to do is to have a / boot partition, about 100m, at the front of the disk. This can prevent the motherboard from being unable to boot due to problems such as the old motherboard and the large hard drive.
Second, there should be a swap partition swap. The size is generally twice the size of physical memory.
The next step is to partition independently according to the purpose.
1) / home is mainly used to store personal data. If the server has a large number of users, this partition should be large.
2) / var if there is a mail service, there must be enough space for this.
Of course, there is other data in this directory, such as log files. The log file rotation mechanism (rotation) tries to keep all files within a reasonable size and automatically deletes expired log files. A stand-alone / var file system avoids the unexpected failure of the rotation mechanism when overgrown log files crowd out the disk space needed for the rest of the system.
3) / usr should be large enough to meet the needs of recompiling the kernel. The stand-alone / usr allows other workstations to share this file system through read-only NFS.
It is also the place to install the software, so also consider the number and size of the software you install.
4) / tmp this stores temporary files. Its capacity depends on the actual needs of the application, and in general, it should be sufficient to accommodate all temporary files generated when all users are active at the same time.
5) / root except above, the rest can be put here.
1 、 Ext3
The default file system for RedHat. Compared with Ext2, the log function is added, and PartitionMagic is compatible. It is recommended that beginners use this file system. The three modes of Ext3 can be converted with the mount command:
(1) data=journal: both file data and metadata are set to log mode, resulting in high performance overhead
(2) data=ordered (default): write sequentially, write file data first, and then write metadata
(3) data=writeback: provides the fastest access speed, but at the expense of data consistency. The metadata is still logged to the log, ensuring the integrity of the metadata. The file data will return to its original state after the system crash.
2 、 ReiserFS
The default file system for SUSE LINUX. However, Red Hat Enterprise Linux AS does not support ReiserFS. It is recommended for experts to use this file system. This file system has the following three advantages:
(1) make efficient use of disk space. Unlike other file systems, ResierFS does not depend on block size. It has the advantage of dealing with a large number of small file storage operations and produces very little disk fragmentation.
(2) improve the reliability and recovery speed.
(3) the balanced tree data structure can be used to store content data and security metadata at the same time, making it faster to access.
3. Directory function
/: the root partition contains / etc, / bin, / sbin, / lib, and / dev, otherwise you will not be able to boot the system.
/ boot: stores programs related to linux startup.
/ usr: contains all user programs (/ usr/bin), library files (/ usr/lib), documents (/ usr/share/doc), and so on. This is the most space-consuming part of the file system. You need to provide at least 500MB disk space. The total capacity increases depending on the number and type of packages you want to install. A loose workstation or server installation should require 4-6GB.
/ var: all variable data, such as newsgroup articles, e-mails, websites, databases, caching of software package systems, and so on, will be placed in this directory. The size of this directory depends on the purpose of your computer, but for most people, it will be used primarily as an administrative tool for software package systems.
/ tmp: most temporary data created by the program is stored in this directory. Usually 40 MB 100 should be sufficient. Some applications-including archive processors, CD/DVD authoring tools, and multimedia software-may use / tmp to temporarily save image files.
/ home: each user will place his private data in a subdirectory of this directory. Its size depends on how many users will use the system and what files are placed in their directory. Depending on the planned use, 100MB space should be prepared for each user, but it should be adjusted to your needs. If you plan to save a large number of multimedia files (pictures, MP3, movies) in the home directory, you should prepare more space.
/ opt: additional application package.
4. Zoning experience
(1) there must be at least two partitions, one is the / swap swap partition and the other is the / root partition.
(2) in recent years, the price of hard disk is getting cheaper and cheaper. You can buy a large hard disk for two to three hundred yuan. I will take the 25G partition as an example. The rest of the extra disk space can be divided with the partition management tool after logging in to the system after the system installation is completed, and it can be used for special data storage and backup space.
/ 1.5g, primary partition, Ext3 format
/ boot 0.5G, primary partition, Ext3 format
/ home 3G, logical partitioning, Ext3 format
/ tmp 1G, logical partitioning, Ext3 format
/ usr 6G, logical partitioning, Ext3 format
/ var 1G, logical partitioning, Ext3 format
/ opt 3G, logical partitioning, Ext3 format
/ data 3G, logical partitioning, Ext3 format
Swap 1G, primary partition, swap.
This is the end of this article on "sample Analysis of linux hard disk Partition Planning". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.