How should I partition my disk?
There are a number of reasons to partition your disk:
Security: You can mark some filesystems as 'nosuid', 'nodev', 'noexec', 'readonly', etc. This is done for you by the install process if you use the recommended partitions.
Stability: A user, or a misbehaved program, can fill a filesystem with garbage if they have write permissions for it. Your critical programs, which hopefully run on a different filesystem, do not get interrupted.
Speed: A filesystem which gets written to frequently may get somewhat fragmented. (Luckily, the ffs filesystem that OpenBSD uses is not prone to heavy fragmentation.)
Integrity: If one filesystem is corrupted for some reason then your other filesystems are most likely still OK.
Size: Many machines have limits on the area of a disk where the boot ROM can load the kernel from. In some cases, this limit may be very small (504MB for an older 486), in other cases, a much larger limit (for example, 2GB, 8GB, or 128GB on i386 systems). As the kernel can end up anywhere within the root partition, the entire root partition should be within this area. For more details, see this section. A good guideline might be to keep your / partition completely below 2GB, unless you know your platform (and particular machine) can handle more (or less) than that.
译文:
我的磁盘如何分区
不推荐大家使用一个文件系统,将不同目录划分在不同文件系统上。
安全:你可以设置文件系统为 'nosuid', 'nodev', 'noexec', 'readonly', etc。如果你使用了官方推荐的这种方式,再安装过程中就会自动帮你设置好。
稳定性:一个用户或者一个恶意的程序如果他们对系统有写权限他有可能网系统上放大量的垃圾。拥有多个文件系统可以将你的关键性应用在一个文件系统上。
加速:如果一个文件系统不间断地写,就会造成大量的碎片化。(OpenBSD 使用的ffs文件系统不易产生此片碎片)
完整:所有的文件都放在根分区,如果跟分区崩盘了,所有的资料都没了。
大小:boot会影响识别磁盘大小,如果把内核放到boot无法寻址的空间系统就无法启动了。