GNU/Linux发行版推荐分区方案

生来就可爱ヽ(ⅴ<●) 提交于 2020-03-14 18:15:21

Debian

stable官方指南

挂载点 说明 大小
/    
/var    
/tmp 通常情况下,将 /tmp 放在它自己独立的分区 20-50MB
/home    
/usr/local 如果您计划安装 Debian 发布版以外的程序  
/var/mail 如果机器是一个邮件服务器  

Fedora

f31官方指南

挂载点 大小 说明
/boot 500MB 每一个内核大约需要20MB
/(root) 10GB  
/home >10GB  
SWAP   根据情况RAM和是否需要休眠来定大小    
BIOS Boot 1MB 使用BIOS固件,或者UEFI的BIOS兼容模式
EFI System 200MB 使用UEFI固件
/var/lib/mysql   如果你运行一个MySQL数据库
/var >3GB 内容经常变化,最好使用HDD
/usr >10GB  

如果/var和/usr和根目录不在同一分区,启动过程会变得复杂。

If /usr or /var is partitioned separately from the rest of the root volume, the boot process becomes much more complex because these directories contain boot-critical components. In some situations, such as when these directories are placed on an iSCSI drive or an FCoE location, the system may either be unable to boot, or it may hang with a Device is busy error when powering off or rebooting.

推荐的SWAP方案

RAM大小 推荐 swap space 使能休眠

< 2 GB

2 x RAM

3 x RAM

2 GB - 8 GB

= RAM

2 x RAM

8 GB - 64 GB

0.5 x RAM

1.5 x RAM

> 64 GB

根据负荷决定

不推荐休眠

例如,你的笔记本有16GB内存,swap空间需要8GB。使能休眠的话,swap空间需要24GB。各个发行版默认去能休眠 (hibernation)。

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!