Handbook:Parts/Blocks/DesigningPartitionScheme/zh-cn

== 设计一个分区方案 ==

How many partitions and how big?
The number of partitions is highly dependent on the environment. For instance, if there are lots of users, then it is advised to have separate as it increases security and makes backups easier. If Gentoo is being installed to perform as a mail server, then should be separate as all mails are stored inside. A good choice of filesystem will then maximize the performance. Game servers will have a separate as most gaming servers are installed there. The reason is similar for : security and backups. In most situations, is to be kept big: not only will it contain the majority of applications, the Gentoo repository alone takes around 500 MB excluding the various sources that are stored in it.

It very much depends on what the administrator wants to achieve. Separate partitions or volumes have the following advantages:


 * 为每个分区或者卷选择性能最好的文件系统.
 * 当一个失控的工具持续向一个分区或卷写文件时，也不至于让整个系统由于无可用空间而无法运行.
 * 如果有必要，可以简化文件系统检查，多个检查可以并行的完成（其实在这一点上，有多个磁盘比多个分区更有优势）.
 * 可以通过在挂载一些分区或卷时使用只读、 （忽略setuid属性）、 （忽略可执行属性）等来增加安全性.

不过，多个分区同样也有劣势. 如果不能合理的配置，系统可能会在一个分区上有很多空闲空间，而其他分区却没有空间. 另外一个麻烦是独立的分区——尤其是像或这样的重要挂载点——经常需要管理员在引导时通过一个initramfs来在其他引导脚本启动前挂载这些分区. 在不同的情况下，结果也可能不同.

另外对于SCSI和SATA还有一个最多15分区的限制，除非使用GPT标签.

那么swap空间呢？
对于swap空间，没有一个完美值. swap空间的目的是当内存（RAM）有压力时为内核提供磁盘存储. 一个swap空间允许内核将看过来稍后不会被访问的内存页面移动到磁盘（swap或者page-out）、施放内存. 当然，如果那块内存突然要使用到，需要花一些时间（相比较内存，硬盘是非常慢的）将这些页面需要放回到内存中（page-in）.

When the system is not going to run memory intensive applications or the system has lots of memory available, then it probably does not need much swap space. However, swap space is also used to store the entire memory in case of hibernation. If the system is going to need hibernation, then a bigger swap space is necessary, often at least the amount of memory installed in the system.