In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
Next, please follow the editor to study!
Before partitioning the hard disk, you should first find out the work of the computer and how large the capacity of the hard disk is, and consider the following issues.
The first and most important point is to know which version of LILO is currently installed, because LILO2.21 and earlier versions limit the size of the hard drive, and if you install LILO beyond track 1023, that is, 8 gigabytes of space, LILO will not start. But for some older BIOS machines, the LINUX still can't break the 1024-track limit, so these BIOS don't recognize hard disk space greater than 1024.
Other issues to consider are:
Do you want to limit the amount of disk space that users can use?
What software needs to be installed in the system?
How big is the swap partition?
Does the system have multiple hard drives?
Next, we put forward some suggestions on the partition according to the different nature of the system. Of course, according to the actual situation, under the premise of meeting the working requirements of the system, the following partition size can also be changed flexibly.
Partition scheme of basic workstation
Suppose the hard disk size of the system is 10G.
/ boot 20M
Swap 128M
/ root 9.85G
A 20m / boot partition is created to avoid putting the system kernel files beyond track 1024. If / boot is used as a subdirectory of the root partition, the kernel files will be installed anywhere in the root partition, because the size of the hard disk is more than 8G, so problems may occur at startup. It is recommended that the size of the swap partition be set to twice the memory, here we assume that the memory of the system is 64m. Finally, we allocated all the remaining space of the hard disk to the root partition.
Basic server hard disk partitioning scheme on Red Hat Linux 6.2and earlier versions
We assume that the server here provides only a few general services, such as WWW service and FTP service, and the number of users logging in through telnet is very small. Assume that the hard disk size is 25G.
/ boot 20M
Swap 128M
/ 10G
/ home 13G
/ var 2G
Create a 20m / boot partition on the front of the hard drive for the same reason. The size of the swap partition is also 128m because the memory size is 64m.
/, that is, the root partition is set to 10G because there is a / usr directory, which may take up a lot of hard disk space, especially if X Server is installed to run graphical applications.
The / home partition is the largest partition on the hard disk, which seems to contradict our assumption that the system has a small number of users. There are actually very few user directories under the / home directory, but in Red Hat6.2 and earlier versions, the Apache server and the wu-ftpd FTP server were placed in the / home/httpd and / home/ftp directories. So there is a reason why this partition is so large.
Finally, the / var directory occupies a separate partition because all the system logs are written to the / var/log directory, which takes up a lot of hard disk space. If the system log is very detailed, the entire directory will soon be full, causing the system to work sluggishly. Of course, this can be avoided by modifying the log configuration through the Syslog background daemon syslogd.
Basic server partitioning scheme for Red Hat 7 and above
This situation is the same as in the previous scenario, except that the LINUX version is Red Hat 7.0 and above.
/ boot 20M
Swap 128M
/ 10G
/ var 15G
Unlike RedHat6, the directories of HTTP services and FTP services in RedHat7 are now located in / var/www/ and / var/ftp/, so it is not difficult to understand that the / var partition is 15G large.
Multi-user server partition scheme
In this kind of server system, multiple users are accessing the system remotely through telnet, ssh, rlogin or so. There are three 35G hard drives in the system, with a total of 105g of disk space. RAID 5 technology is used in the system to do data redundancy. In this case, the administrator must allocate disk space for each user. For RedHat 6.2 and earlier, the partitions are as follows:
Disk 1:
/ boot 20M
/ 4G
/ var 3GB
/ home 27.98G
Disk 2:
Swap 20MB
/ 4GB
/ var 3GB
/ home 27.98GB
Disk 3:
Swap 20MB
/ 4GB
/ var 3GB
/ home 27.98GB
The reason for this partition: first of all, the 20m / boot partition on Disk1 does not belong to any RAID array, otherwise if you put / boot into the RAID array, you will not be able to upgrade the system kernel later.
In order to facilitate management, a 20m swap partition is established in the other two hard drives. Such servers are generally equipped with more than 1 gigabyte of memory, so the size of the swap partition is not a problem. If you increase the swap partition, you will reduce the RAID partition space, so 20m is sufficient. The RAID partition is grouped as follows:
1mura, 2mera, and 3mura together form an 8G RAID 5 drive, which is opened as / root directory.
1murb, 2merb and and 3murb constitute the RAID 5 driver of 6GB, which is used as the / var directory.
1mi C, 2mi C, and 3m C constitute 55.96GB RAID 5 driver, as / home. Catalogue.
In this allocation scheme, a total of 55.96G of space is allocated to all users and Apache and FTP services. 6G of space is used to record logs and emails under / var. Such a large space is sufficient.
If you install Red Hat7 or above, the / var partition should be given more space because it also holds two directories of WEB and FTP services.
At this point, the study of "how to partition the hard disk under the Linux system" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
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.