Learn to partitions on Linux

xiaoxiao2021-03-06  41

The first point is also the most important point. To know that the version of Lilo is currently installed, because lilo2.21 and early versions are limited to hard drive size, if LILO to 1023

Other than 8G space outside the track, LILO cannot be activated. But some

BIOS is older, Linux still cannot break through the limit of 1024 track, so these BIOS cannot recognize the hard disk space greater than 1024.

1. The problems that need to be considered are:

2. Does the disk space size can be used for users?

3. Which software is needed in the system?

4. How big is the exchange partition?

5. Does the system have multiple hard drives?

Below, we have put forward some suggestions according to the different partitions of the working nature. Of course, according to the actual situation, under the premise of satisfying system work, the following partition size can also be flexible.

One. Basic

Partitioning program for workstation

Suppose the system's hard drive size is 10g.

/ boot 20m

SWAP 128M

/ root 9.85g

Building a 20M / boot partition is to avoid placing the system kernel file outside the 1024 track. If the / boot is used as a subdirectory of the root partition, the kernel file will be installed anywhere in the root partition, because the size of the hard disk exceeds 8g, so there is a problem in starting. It is recommended to set the size of the swap partition to

Twelf of memory, here we assume that the system's memory is 64m. Finally, we give all the remaining spaces of the hard drive to the root partition.

Second. RED HAT Linux 6.2 and its early versions

Server hard disk partitioning solution

The server here We assume that only several universal services, such as WWW services and

Several services such as FTP services, very few users logged in through Telnet. Assume that its hard drive is 25G.

/ boot 20m

SWAP 128M

/ 10g

/ home 1

3G

/ var 2G

Create a 20M size / boot partition at the top of the hard disk, the same. The size of the switching partition is also 128m because the size of the memory is 64m.

/, That is, the root partition is 10G is so big because there is one / usr directory, which may occupy a lot of hard disk space, especially when the X Server is installed, running the graphical interface.

The / Home partition is the largest partition in the hard drive, which seems to have some contradictions with us to assume that the number of system users. In fact, there is no several user directories in the / home directory, but in the Red Hat6.2 and earlier versions, the Apache server and the WU-FTPD FTP server are placed in the / home / httpd and / home / ftp directory. . So this partition is so much reasons.

Finally, the / var directory has occupied a partition, because all logs of the system are written to the / var / log directory, which will take a lot of hard disk space. If the system log is recorded very detailed, the entire directory will soon be filled, resulting in system working. Of course, you can modify the log configuration through the system log background daemon syslogd to avoid this.

Third. RED HAT 7 and above basic server partitioning scheme

This situation is the same as the case in the previous solution, and the LINUX version is RED HAT 7.0 and its above.

/ boot 20m

SWAP 128M

/ 10g

/ VAR 15G

Unlike RedHat6, the directory of the HTTP service and FTP services in Redhat7 is now located / var / www / and / var / ftp /, so the / var partition has 15G to be large.

Four. Multi-user server partitioning solutions

In this server system, there are multiple users through Telnet, SSH, RLOGIN or their way.

Remote access system. There are three 35G hard drives in the system, with a total of 105G disk space. Used in the system

RAID 5 technology 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, the 20m / boot partition on Disk1 does not belong to any RAID array, otherwise if you put the / boot into the RAID array, you can't upgrade the system in the system.

To facilitate management, 20M exchange partitions are established in other two hard disks. Such a server is generally equipped with more than 1G or more, so the size of the exchange partition is not problematic. If the exchange partition is increased, the RAID partition space will be reduced, so 20M is sufficient. The group of RAID partitions is as follows:

1-a, 2-a, and 3-a form a 8G RAID 5 drive, which is open as the / root directory.

1-b, 2-b, and 3-b composition 6GB RAID 5 driver, as / var directory.

1-c, 2-c, and 3-c composition 55.96GB RAID 5 drive, as an / home. Directory.

This distribution scheme has a total of 55.96g of space allocated to all users and Apache and FTP services, using 6G space to make logs, mail, such a large space in / var, such a large space is sufficient.

If you install Red Hat7 or above, you should give the / var partition a larger space because it also stores both directories of the Web and FTP services.

转载请注明原文地址:https://www.9cbs.com/read-54710.html

New Post(0)