Partitioning an OpenBSD disk
Special partitions
- a: must be created on the root disk and used for the root filesystem (/).
- b: must be created on the root disk and used as swap space.
- c: represents the entire disk and must not be altered. (Just ignore it.)
Minimum sizes for a full installation
(root) 60MB /usr 420MB (no X) or 550MB (with X) /var 25MB /tmp 50MB swap 32MB
Considerations
- It's a good idea to put user-writeable directories such as
/homeand/var/wwwin a separate partition. This helps if you want to set quotas and prevents problems with a user fills a partition. - More space in
/varfor internet facing machines. (Remember logs are kept in/var/log.) - Keep enough space in
/usr/srcif you expect to build lots of source code (eg. when rebuilding the system). /tmpis used for building some software
Sizes that work for me
Below are sizes that worked fine for a machine with at least 115GB hard drive space. This should leave more than enough room to handle most tasks for the kind of servers I need. Space is left unallocated to leave room for expansion.
Partition Filesystem Size a (root) 200MB g /usr 10GB e /var 10GB d /tmp 1GB b swap 512MB h /home 50G
Resources
- OpenBSD FAQ 4.5.2 - Setting up the disks
- OpenBSD FAQ 4.7 - 4.7 - How much space do I need for an OpenBSD installation?
