# Several partitions for desktop usage?



## SPlissken (Jan 30, 2012)

Hello,

Until now I was using several partitions for my FreeBSD desktop. But finally I'm wondering why creating several partitions? On my previous desktop /usr was on a too small partition and I had to link the ports directory to an external USB disk to gain space.

So why not having only / and swap?

Thanks for your comment.


----------



## SirDice (Jan 30, 2012)

Use whatever partitioning scheme you feel comfortable with.


----------



## throAU (Jan 30, 2012)

For a desktop it's probably not so critical, but having multiple partitions gives you the following benefits:

- a corrupt FS on one partition does not affect the data on other partitions
- different partitions can have different mount options.  so you can say, mount home directories NOSUID to stop people using setuid files, or make other parts of the system readonly, etc.
- a rogue process continually writing to disk can only fill up the partition it is writing to - it won't knock out the rest of the system
- different partitions can have different block sizes - so you can optimise them for the types of files they store.

For a desktop, I'd consider putting home directories on a separate partition, and also /usr/local.

Why?  Because that way you can reinstall the OS to the other partition(s) and not format those.  It saves having to wipe your data and restore if you wish to format the partition containing the OS.  Ditto for the /usr/local partition - you can keep your installed ports across OS reinstalls/upgrades.

You can also avoid having to size things appropriately (up front, in advance) by installing to ZFS - the storage is just one big pool that all the different filesystems (partition equivalent in ZFS) can share.


----------



## bbzz (Jan 30, 2012)

SPlissken said:
			
		

> Hello,
> 
> Until now I was using several partitions for my FreeBSD desktop. But finally I'm wondering why creating several partitions? On my previous desktop /usr was on a too small partition and I had to link the ports directory to an external USB disk to gain space.
> 
> ...



At the very least use */, /var, /usr*.

You can eyeball first two which for desktop should be small. Rest in /usr.


----------



## fluca1978 (Jan 30, 2012)

In the very first days I was using several partitions even for my laptop, and it was useful to get them since I could reinstall the whole system without having to format (and lost) my /home and /development, of course being careful not to formatting them!
Nowdays I don't do it anymore, I keep /, /usr and /var (and swap) to get a near to server setup, not because I really need it. I find doing backups and restoring the partition data a good compromise since I no more reinstall the system so often. If you run ZFS then also /boot (supposing you are not running ZFS on boot). 
The problem with home computers is that often it is not easy to compute the needed space in advance, since usually a lot of programs are going to be installed to surfe the web, play videos and so on. That is why I don't do a lot of partitions to avoid getting one filled and one empty.
As other pointed out, this is not good for a server, since a crazy process can consume the whole space, or a failure can happen, and so on...


----------



## gkontos (Jan 30, 2012)

If you plan to install FreeBSD 9.0-RELEASE in a desktop with limited disk space, then it is quite safe to just put everything in the root partition. UFS2+J looks very good and stable.


----------

