The best solution for hard disk partitioning under Linux

  

Before partitioning the hard disk, you should first understand the workload of the computer and the capacity of the hard disk, and also consider the following issues:

One (and most important), you need to know the version of LILO currently installed. Because LILO2.21 and earlier versions have restrictions on the size of the hard disk, if you install LILO to 8G outside the 1023 track, LILO will not start. However, some older BIOS machines still cannot break the 1024 track limit, so these BIOSes cannot recognize more than 1024 hard disk space. Also need to consider the issues: · Is it limited to the amount of disk space users can use? · What software do I need to install in my system? · How large is the swap partition? · Does the system have multiple hard drives? Below, we put forward some suggestions for the division of the partition according to the nature of the system work. · partitioning scheme for basic workstations: Assume that the system's hard disk size is 10G. /boot 20M Swap 128M /root 9.85G Create a 20M /boot partition to avoid placing system kernel files outside of 1024 tracks. If /boot is a subdirectory of the root partition, the kernel files will be installed on the root partition. Anywhere, because the size of the hard disk exceeds 8G, there may be problems at startup. It is recommended to set the size of the swap partition to twice the memory. Here we assume that the system's memory is 64M. Finally, we gave the entire space of the hard disk to the root partition. · Basic server hard disk partitioning scheme on Red Hat Linux 6.2 and earlier versions: Here we assume that only a few common services, such as WWW services and FTP services, are available, and the number of users logging in through Telnet is very small. . Assume that its hard disk size is 25G. /boot 20M Swap 128M /10G /home 13G /var 2G Create a 20M /boot partition at the top of the hard disk for the same reason. The size of the swap partition is also 128M because the size of the memory is 64M. /, that is, the root partition is set to 10G. This is because there is a /usr directory. This directory may take up a lot of hard disk space, especially when you install X-Server and run a graphical application. The /home partition is the largest partition on the hard disk, which seems to be somewhat inconsistent with the assumption that the number of system users is small. There are actually not a few user directories in the /home directory, but in Red Hat 6.2 and earlier, the Apache server and the wu-ftpd FTP server are placed in the /home/httpd and /home/ftp directories. . So this partition is so big for a reason. Finally, the /var directory occupies a single partition because all the logs for the system are written to the /var/log directory, which takes up a lot of hard disk space. If the system log is recorded in great detail, the entire directory will be filled up quickly, causing the system to work sluggishly. Of course, you can modify the log configuration through the syslog daemon syslogd to avoid this. · 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.0, the directory for HTTP services and FTP services in RedHat7.0 is now located at /var/www/and /var/ftp/, so the /var partition is 15G It is not difficult to understand. · Multi-user server partitioning scheme: In this kind of server system, multiple users simultaneously access the system remotely through Telnet, ssh, rlogin or other means. There are three 35G hard drives in the system, for a total of 105G of disk space. RAID 5 technology is used in the system for data redundancy. In this case, the administrator must allocate disk space for each user. For RedHat 6.2 and earlier, the partition is 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, the 20M /boot partition on Disk1 does not belong to any RAID array, otherwise if you put /boot into the RAID array, the system kernel will not be upgraded in the future. For ease of management, a 20M swap partition was created on the other two hard drives. This type of server is generally equipped with more than 1G of memory, so the size of the swap partition is not a problem. If you increase the swap partition, it will reduce the RAID partition space, so 20M is sufficient. The RAID partitions are grouped as follows: · 1-A, 2-A, and 3-A together form an 8G RAID 5 drive, which is opened as /root directory. · 1-B, 2-B, and 3-B form a 6GB RAID 5 drive as the /var directory. · 1-C, 2-C, and 3-C form a 55.96GB RAID 5 drive, as the /home. directory. This allocation scheme has a total of 55.96G of space allocated to all users and Apache and FTP services. In /var, 6G space is used for logging, mailing, and such a large space is sufficient. If you are installing Red Hat 7 or above, you should partition /var with more space because it also holds two directories for the Web and FTP services.

Copyright © Windows knowledge All Rights Reserved