Partitioning disk for FreeBSD server

In this article I wish discuss some ideas about partitioning hard drive, when preparing PC for being FreeBSD server. For server install it’s necessary to make it as tight as possible.

When installing system, which main purpose will be running a few services - say, SMTP server or http proxy server, I prefer to use following partitioning:


swap - 2xRAM size, but not more than 1-2Gb
/tmp - 1-2Gb
/ - 6-8 Gb
/var -
/home- 1-2Gb
/data-

Why do I put partitions in this order? It makes overall system performance better — the closer to the center of HDD spindle — the less is sector seek time, so partitions which need faster access — swap and /tmp should go closer to the center of the disk.

The next partition is a root partition — I prefer to put there a lot of space to hold /usr directory with /usr/src and /usr/ports unpacked, also leaving space for port compilation.

/var — you should reserve there enough space for logs and mail queue and mailboxes. If you have system which should do intensive logging — put there at least 8-10Gb.

/home — if you will have some administrative users which should only monitor system, you can have /home partition pretty small - 1-2Gb, not more.

/data — spare partition where you can move working directories of services. Or you can directly mount this partition under /usr/local — especially if you run squid or apache, which by default use /usr/local/squid and /usr/local/www respectively.

This kind of partitioning allows you mount / in sync mode (you should put in fstab something like this

/dev/ad0s1a / ufs rw,sync 1 1

or even mount root filesystem in ro mode


/dev/ad0s1a / ufs ro 1 1

Mounting root filesystem in read-only mode will prevent corruption and allow system to boot under any circumstances.

Negative sides is that users won’t be able to change their passwords on their own and that you should remount it in r/w mode each time when you change system confguration.

Interesting article on disk seek times and etc — http://www.logicsmith.com/seektime.html

Что еще почитать:

  • FreeBSD:Быстрые советы Подкаст 1 - Установка FreeBSD системы Коротко об истории создании unix систем Преимущества юникс систем - изолированность процессов, конвеерная...
  • FreeBSD для тех кто спешит Тренинг по Безопасности! Хочешь повысить свои знания по FreeBSD? Коробочная версия курса! Если нет времени — тогда вполне может...
  • Бесплатные материалы по FreeBSDПомоги нашему проекту - поставь у себя кнопку! <a href="http://gasparchilingarov.com/business/freebsd/besplatnye-materialy-po-freebsd/" > <img src="http://gasparchilingarov.com/wp-content/uploads/2008/04/button.gif" border="0"> </a> Вы можете скачать здесь бесплатные...
  • FreeBSD: Обучающие курсы с нуляТренинг по Безопасности - запишись ! На этой страницы представлены обучающие курсы, которые можно купить в виде коробочной версии для...
  • FreeBSD - курс по безопасности - началоКомрады, все, кто зарегистрировался. Я обязательно вечером отпишусь, сейчас к сожалению вышла страшная запарка, надеюсь что до вечера успею записать...
  • Установка и настройка веб сервера на FreeBSDГотова книга по быстрой установке FreeBSD и веб сервера apache. В книжке описывается пошаговый процесс установки apache+php+mysql на систему FreeBSD....

Related posts brought to you by Yet Another Related Posts Plugin.

0 Responses to “Partitioning disk for FreeBSD server”


  1. No Comments

Leave a Reply

You must login to post a comment.




Анонс книги: Использование Shell с нуля и до профи!