# Default disk layout differences between 8 and 9



## Anonymous (Jan 30, 2012)

The default disk layout changed between FreeBSD 8 and FreeBSD 9 - http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/bsdinstall-partitioning.html

By default, FreeBSD 9 divides the disk in three partitions, freebsd-boot, freebsd-swap, and only one big freebsd-ufs partition for everything, namely for /, /tmp, /usr, /var , while according to the default disk layout on FreeBSD 8, these directories were put on separate partitions (GPT) or slices (MBR).

I do not have any problems with this, and I do not question this at all. However, out of pure curiosity, I would like to learn more about the reasons for the switch. A brief Google search did not reveal any relevant background information, only something about the fact itself.

I would be glad, if someone could point me to some background reading, or give me some more informations on the reasons for said changes.

Many thanks in advance and best regards

Rolf


----------



## wblock@ (Jan 30, 2012)

After a half hour of searching, I finally found where this was mentioned in #3 here: http://lists.freebsd.org/pipermail/freebsd-current/2011-August/026719.html.


----------



## overmind (Feb 3, 2012)

The think is old way (from UNIX) was to use multiple partitions so in case of failure / could be still booted for a rescue process.

For that reason / partition did not use soft updates.

The problem with this old way, with different partitions for /, /var/, /tmp, /usr is that if you did not choose carefully the size of one partition you might end with not enough disk space. For example if your /var partition is too small and you have lot of mails or MySQL database, or logs, this can be quickly be filled. And if you allocate too much space for /var and you will never use mail or mysql?

For some time now on Linux sysadmins used a single partition for everything, I've noticed that for servers installed in datacenters by big companies. This is out of convenience.

What to do in case of an error? Well you will notice that default installation of FreeBSD 9 make the / partition: journaled soft-updates. This should be enough to guarantee better protection for your data.

Of course when using old way if you did not have not enough space there still are things you can do but do we really need to mitigate this if there's better ways?

So even if until now I've used to install FreeBSD in old way, this is a good thing I guess.


----------



## Anonymous (Feb 3, 2012)

overmind said:
			
		

> ...For example if your /var partition is too small and you have lot of mails or MySQL database, or logs, this can be quickly be filled. And if you allocate too much space for /var and you will never use mail or mysql? ...



Yeah, for this reason on my FreeBSD 8.2 production servers, I found myself urged putting the pgsql data directory into /usr, and I did not like this too much.



			
				overmind said:
			
		

> ... For some time on Linux sysadmins use a single partition for everything, I've noticed that for servers installed in datacenters by big companies. This is out of convenience.



This facilitates also backing-up, at least, how I like it to do.



			
				overmind said:
			
		

> ... What to do in case of an error? Well you will notice that default installation of FreeBSD 9 make the / partition: journaled soft-updates. This should be enough to guarantee better protection for your data.



I prepared bootable USB-Sticks, which are exact snapshots of the actual FreeBSD 8.2 servers, except the data, of course. In the case of a disaster, the stick shall be plugged-into a USB port of the respective server, and the server shall be restarted, now using the sticks snapshot from a previous good state. If there would be still something to recover, it could be done more comfortable by this way, than by any other way.



			
				overmind said:
			
		

> So even if until now I've used to install FreeBSD in old way, this is a good thing I guess.



Well, my objective is to migrate my FreeBSD 8.2 servers (having the classic FreeBSD disk layout) to FreeBSD 9.0, and I was evaluating the strategic options, i.e. either freebsd-update them or setting-up new FreeBSD 9 systems from the scratch, and transferring the data. The latter option is more involved, however, the consideration about the new disk layout made-up my mind. I will setup new systems from the scratch having the new disk layout, and transfer the data.

Many thanks for your response.

Best regards

Rolf


----------



## SirDice (Feb 3, 2012)

rolfheinrich said:
			
		

> I will setup new systems from the scratch having the new disk layout, and transfer the data.


If you're going to re-install anyway why not make the layout more convenient for you? The default layout isn't mandatory, it's just a layout that works for most people.

I would suggest creating a separate partition for your pgsql data. It's always a good idea to separate the data from the OS. Take some time to figure out what layout works best for you. As my goals changed over the years I've used many, many different layouts. Some worked, some didn't. You'll figure it out soon enough


----------



## Anonymous (Feb 4, 2012)

SirDice said:
			
		

> If you're going to re-install anyway why not make the layout more convenient for you?



I like the new default disk layout of FreeBSD 9, i.e. having one big partition for everything. As a matter of fact, I had it like this on various computer systems in the last 25 years. Only for the sake of giving FreeBSD 8 some kind of satisfaction, I accepted an exception from my old habits - now its time for a happy falling back !:r

Best regards

Rolf


----------

