# ZFS on root for HDD+SSD combination



## masteroman (Oct 14, 2014)

I have two drives in my PC. One is 60GB SSD and the other one is classic 1,5TB spinning hard disk. I am trying to configure ZFS on root but I don't know what would be the best configuration for my setup. I currently use Linux on that machine and I have my / on SSD and /home on hard disk. 

How can I do that in FreeBSD?
Is there better solution than above mentioned?


----------



## aupanner (Oct 15, 2014)

Unless you want to get some new drives and spend the time playing with ZFS, the setup you have might be fine for your purposes. 

The basic setup many people use is 2xHDD in a ZFS mirror configuration.  This provides redundancy if one drive should fail.

Getting a little more fancy, some people use a (non-MLC) SSD for the ZFS ZIL (ZFS Intent Log: the buffer to which ZFS writes before commiting an entire transaction to HDD).  Sometimes the ZIL is 2xSSD in a mirror configuration because if the ZIL fails you will lose data.  Normally the ZIL is on the HDD itself and can cause contention under heavy write situations.

Even fancier, the other thing people sometimes do with a SSD is to use it as a L2ARC read cache.  This can speed up repeat access to the same on-disk data.

ZFS wants at least 4GB of RAM to run well.  Also your RAM should _really_ be ECC RAM unless you like corrupted data; ZFS cannot help you against corruption occurring in primary memory.


----------



## Oko (Oct 15, 2014)

Unless you have money for 5 more 1.5 TB your setup is not appropriate for ZFS. OS on SSD+RAIDZ2 using 6 HDD would be a fine setup assuming that you have good quality hardware. Most people at home (myself included) do not hardware of the quality necessary to run ZFS. If you want to play and spend little money I would propose installing DragonFly on SSD, adding another HDD 1.5 and set up as HAMMER master + slave storage on those two 1.5 TB drives. Hammer is not resources hungry and you will have a fine file server.

Disclosure: I run 7  FreeBSD file servers at work. I have decommissioned backup server running DragonFly and HAMMER due to the lack of enterprise infrastructure in DragonFly (SNMP functioning only as v1, no IPMI driver, no LDAP, no Monit, many useful ports missing etc).


----------



## wblock@ (Oct 15, 2014)

Let's not overcomplicate things.  ZFS on root on a 60G SSD will work, although without redundancy.  It would not be greatly different than UFS, although some would say the ZFS setup would be more reliable.  ZFS could also be used on the 1.5TB drive, again without redundancy.


----------



## masteroman (Oct 17, 2014)

Thank you very much for your replies and suggestions. Because this is my desktop machine I am not comfortable with big investments right now. I think I'll go with configuration suggested by aupanner and that is root on ZFS on HDD and L2ARC on my SSD drive.


----------



## Feos (Nov 5, 2014)

In my opinion that*'*s a waste. There is no need for a cache drive in a desktop machine. I would recommend to use the SSD as root and take advantage of the speed and latency. If you are building a ZFS only machine you can create a second pool on your HDD. Just create a dataset on your HDD (e.g. tank/home) and mount it as /home and you would have the same distribution as before in *L*inux.


----------



## masteroman (Nov 5, 2014)

Feos said:


> In my opinion that*'*s a waste. There is no need for a cache drive in a desktop machine. I would recommend to use the SSD as root and take advantage of the speed and latency. If you are building a ZFS only machine you can create a second pool on your HDD. Just create a dataset on your HDD (e.g. tank/home) and mount it as /home and you would have the same distribution as before in *L*inux.



I'm still learning FreeBSD and how to do things here. ZFS is a novelty to me so any help is greatly appreciated. Anyway, in the meantime I bought one more drive and I'll probably do Root-on-ZFS and then mount a mirror of these two hard drives as /home.

Thanks for your help.


----------



## ArashTheKID (Jul 7, 2015)

Feos said:


> In my opinion that*'*s a waste. There is no need for a cache drive in a desktop machine. I would recommend to use the SSD as root and take advantage of the speed and latency. If you are building a ZFS only machine you can create a second pool on your HDD. Just create a dataset on your HDD (e.g. tank/home) and mount it as /home and you would have the same distribution as before in *L*inux.


I will go one step further, and use two mirrored HDDs for second pool so I can provide a minimal redundancy for my data, just a thought...
Cheers,
A.


----------



## phoenix (Jul 7, 2015)

masteroman said:


> I have two drives in my PC. One is 60GB SSD and the other one is classic 1,5TB spinning hard disk. I am trying to configure ZFS on root but I don't know what would be the best configuration for my setup. I currently use Linux on that machine and I have my / on SSD and /home on hard disk.
> 
> How can I do that in FreeBSD?
> Is there better solution than above mentioned?



Buy two more disks:  another 60 GB SSD and another 1.5 TB HD.

That way, you can create 2 pools:  2x SSDs for OS, 2x HDs for data

And, you can even partition off a little of the SSDs to use as an L2ARC (cache) for the data pool.


----------

