Before partitioning a hard disk, you should first figure out the work undertaken by the computer and the size of the hard disk, but also consider the following issues:
The first and most important point is to know the current version of LILO, because LILO2.21 and earlier versions have restrictions on the hard disk size, LILO cannot be started if the installation of LILO is out of 8 GB space other than 1023 channels. However, for older BIOS machines, LINUX still cannot exceed the 1024 track limit, so these BIOS cannot recognize hard disk space larger than 1024.
You also need to consider the following issues:
· Is the disk space available to users Limited?
· What software should be installed in the system?
· What is the size of swap partition?
· Does the system have multiple hard disks?
Next, we provide some suggestions for Partitioning Based on the nature of the system's work. Of course, based on the actual situation, the partition size can be changed flexibly under the premise of meeting the system's work requirements.
The partition scheme of the basic workstation assumes that the system's hard disk size is 10 Gb.
/Boot 20 M
Swap 128 M
/Root 9.85 GB
A 20 m/boot partition is created to avoid putting the system kernel file out of the 1024 track. If/boot is used as a sub-directory of the root partition, the kernel file will be installed anywhere in the root partition. Because the hard disk size exceeds 8 GB, problems may occur during startup. We recommend that you set the swap partition size to double the memory size. Here we assume that the system memory is 64 MB. Finally, we allocated all the remaining space on the hard disk to the root partition. Red Hat Linux 6.2 and earlier versions of the basic server hard disk partitioning Solution
The server here is assumed to provide only a few common services, such as WWW and FTP services. There are very few users logging on via telnet. Assume that the disk size is 25 GB.
/Boot 20 M
Swap 128 M
/10G
/Home 13G
/Var 2G
Create a 20 m/boot partition at the beginning of the hard disk for the same reason. The swap partition size is also 128 MB because the memory size is 64 MB.
/, That is, the root partition is set to 10 Gb because there is a/usr Directory, which may occupy a lot of hard disk space, especially when the X Server is installed, when running the graphic interface application.
The/home partition is the largest partition in the hard disk, which seems to be in conflict with the assumption that the number of users in the system is small. In fact, there are not several user directories in the/home directory, but in Red Hat6.2 and earlier versions, the Apache server and the wu-ftpd FTP server are stored in the/home/httpd and/home/ftp directories. So there is a reason for this partition being so large.
Finally, the/var directory occupies a partition, because all the system logs are written to the/var/log directory, which occupies a lot of hard disk space. If the system log records are very detailed, the entire directory will soon be fully written, resulting in system downtime. Of course, you can modify the log configuration through the System Log backend daemon syslogd to avoid this situation.
The basic server Partition Scheme of Red Hat 7 and later versions is the same as that of the previous scheme. The difference is that the LINUX version is Red Hat 7.0 and later.
/Boot 20 M
Swap 128 M
/10G
/Var 15G is different from RedHat6. In RedHat7, the HTTP service and FTP service directory are now in/var/www/AND/var/ftp /, therefore, it is not difficult to understand the size of the/var partition with 15 GB.
In this server system, multiple users remotely access the system through telnet, ssh, rlogin, or other methods. The system has three 35 GB hard drive, with a total disk space of 10 Gb. RAID 5 is used in the system for data redundancy. In this case, the Administrator must allocate disk space to each user. For RedHat 6.2 and earlier versions, the partition is as follows:
Disk 1:/boot 20 M
/4G
/Var 3 GB
/Home 27.98G Disk 2: swap 20 MB
/4 GB
/Var 3 GB
/Home 27.98 GB Disk 3: swap 20 MB
/4 GB
/Var 3 GB
/Home 27.98 GB: first, the 20 M/boot partition on Disk1 does not belong to any RAID array. Otherwise, if you put/boot to the RAID array, the system kernel cannot be upgraded later.
To facilitate management, 20 m swap partition is created in the other two hard disks. This type of server is generally equipped with memory larger than 1 GB, so the swap partition size is not a problem. If the swap partition is increased, the RAID partition space is reduced, so 20 mb is sufficient. The RAID partition groups are as follows: · 1-A, 2-A, and 3-A form an 8g RAID 5 drive together and open it as the/root directory.
· 1-B, 2-B, and 3-B constitute a 6 gb raid 5 drive as the/var directory.
· 1-C, 2-C, and 3-C constitute a 55.96 gb raid 5 drive, which is used as the/home. directory.
In this allocation scheme, a total of GB space is allocated to all users, as well as Apache and FTP services. in/var, 6 GB space is used to record logs and emails. This large space is sufficient.
If Red Hat7 or a later version is installed, a larger space should be allocated to/var, because it also stores two directories of the WEB and FTP services.