Linux disk partitioning scheme

Meaning each partition of the hard disk partition 

Although it is possible according to the partition principle we have already mentioned, Linux packed in a single large partition, but a better idea is to separate it. Combines the simplicity and flexibility of multi-partition a single partition, we recommend the following configuration. Note: If you want to install all packages of Linux, then you must use larger partition size indicated here. In fact, you may increase the recommended size, to allow future upgrades without having to re-partition. 

1, a switch (the swap) partition. Swap partition used to support virtual memory. If your computer memory is less than 16MB, you must create a swap partition. Even if you have more memory, a swap partition is still recommended. Swap the minimum size is the size of your memory, 16MB (whichever is greater). Swap partition can be up to 127 MB, so create a larger swap partition is a waste of space. Note that you can create and use more than one swap partition (although this is usually mounted on a large server). 

2, a root (root) partition. Root partition is "/" (the root directory) location (note not / root). It only needs to start the system shall file and system configuration files. For most systems, the root partition 50MB to 100MB can work very well. 

3, a / usr partition. / Usr is where many software Linux system located. Depending on the number of packages you install swap, this partition should be between 300MB to 700MB. If possible, the maximum space for the / usr partition. Anything you later want to install an RPM-based package will use more than any other partitions / usr space. 

4, a / home partition. It is the user's home directory location; its size depends on your Linux system, how much data the number of users, and these users will be stored. If the system will be used for E-mail service, then set aside space of about 5MB for every user, if you will provide storage space for personal home page, then you should at least 20MB of space reserved for each user. For website builder also important to note that the content of your Web services and anonymous Ftp / home / ftp) server is here!

In addition, your environment may require you to create a partition and more of the following:

5, a / usr / local partition. Usually / user / local Linux system used to store the remainder of different software packages such as the software is not RPM. Its size depends on the amount you are going to store these software. 

6, a / usr / src partition. In a Linux system, / usr / src is usually stored two things: First, the Linux kernel source code. All kernel source code are placed here, the new kernel is also created here. Currently, the kernel source code about 30MB. Remember, you may need more space to create the kernel, or save a few different versions of the kernel. Second, the source RPM package. If the source package is installed, the file will be stored here. Note that unless otherwise specified, will also be used to create a package here 'Create directory'. Similarly, the partition size also depends on the amount you will be here to install the software. 

7, a / tmp partition. Like its name, / tmp partition is used to store temporary files. For a large, multi-user system or network server, specifically created a / tmp partition is a good idea. For a single-user workstation, you do not have to create a separate / tmp partition. 

8, a the / var partition. Your Linux system will write logs in / var / log. Print queue files are usually written in / var / spool. These are just two examples written in / var's. Unless specially configured, / var will be part of the root file system, usually do not take up a lot of space. If your system has a lot of print, mail, or log, consider creating a specialized / var partition. In general, the only multi-user or server only requires specialized / var partition. 

9, a / boot partition. Most of the district is mentioned here for large systems, this partition the space of a few small system useful. LILO boot when all required documents are in the / boot directory. So the best way is specifically divided into a root zone file, size up to 64MB, the best first points in this area, then divide / usr, and so on.

Scene: Linux system disk space 500G

Linux partition required to achieve the following: / var partition must be big (regardless of postfix mail, or LAMP WEB server, etc.). Preferably more than 400G. Specific / boot 100M long enough. 

Linux server partition scheme:

Copy the code
The actual size of the partition type 
/ 1G-2G (at least to 150-250MB is) 
/ Boot 32M-100M (boot partition, as long as up to about 100M) 
/ opt-100M. 1G (Additional applications) 
/ tmp 4OM-1000M (maximum may be provided about 1G, if you load the ISO image file is set to be about 4G it, generally do not have as much) 
/ Home 2G-10G (about each user 100M, specific custom user directory.) 
/ usr 3G-10G minimum of about 500M , assigned to the server generally loose 4-6g) 
/ usr / local. 15G-3G (self-install this program installed) 
/ var> 2G - all the remaining hard disk space (at least 300M-500M, 2-3G general, servers do then the rest of the space is given to the above it)
Copy the code

Desktop Linux partition scheme:

Copy the code
The actual size of the partition type 
/. 1G 
/ Boot 32M 
/ 100M opt 
/ tmp 50M 
/ Home-1OG. 1G 
/ usr. 6G 3G- 
/ usr / local-3G. 5G 
/ var than 500M
Copy the code

The most savings partitioning scheme (server not recommended)

Copy the code
Usually after the installation file directory minimum size (centos5.2) 
/ 150M-250M 500M-2G (378m) 
/ Boot-100M 32M 64M (13M) 
/ opt-100M 30M 50M (19M) 
/ tmp 40 to 100 m 50M (37M) 
/ 100M. 1G. 5G-Home (483M) 
/ usr> 500M 4-6g 2.5G (2.0G) 
/ usr / local500M 2-5g 2G (1.2G) 
/ var 300-500m 2-3G 500M (296M)
Copy the code

 

reference:

https://www.cnblogs.com/EasonJim/p/7202221.html

 

Guess you like

Origin www.cnblogs.com/hanrp/p/12551695.html
Recommended