# FreeBSD 9: zroot + mirror. ZFS datasets?



## ekar (Feb 14, 2012)

Dear *,

*I* have Freebsd FreeBSD 9 installed with a zroot + mirror (2 HDDs).

*F*or a couple of days *I* am trying to understand if *I* do benefit from adding freebsd FreeBSD zfs datasets described here: http://www.freebsdwiki.net/index.php/ZFS,_creating_datasets_for_the_FreeBSD_system

*I* do understand the benefits for compression on separate datasets like /usr/src, /usr/ports, /var/*, maybe other, those are not read very often but could be compressed.

But what is the benefit to have simply default zfs dataset for /usr/home? Or any other dataset without compression=on in terms of backup/snapshots, saving space?

I want to use that configuration for my desktop, what is benefit to have zfs dataset on /usr/home ?

Many thanks in advance,
eKar


----------



## kpa (Feb 14, 2012)

Compression saves space and can actually speed up reading in case the files compress so well that the time needed to read and decompress the compressed files is significantly less than the time needed to read the uncompressed files.


----------



## gkontos (Feb 14, 2012)

ekar said:
			
		

> But what is the benefit to have simply default zfs dataset for /usr/home? Or any other dataset without compression=on in terms of backup/snapshots, saving space?
> 
> I want to use that configuration for my desktop, what is benefit to have zfs dataset on /usr/home ?



The main advantage is that you can use ZFS snapshots ability. Therefore, sometimes you will need to create those datasets during the installation before they get populated by OS directories.

For example. I have a web server with a mirror setup and full root on ZFS. During installation I created the following datasets:

/usr/local
/usr/local/www

Apache points to: /usr/local/www/site(n). I choose to maintain daily snapshots and keep them for 7 days. 

This makes my life easier for backups and I also know that I have the ability to rollback the data quickly if necessary without even having to restart apache.

If you make a separate /home dataset then you will be able to use ZFS datasets for home directories as well. 

/home/user1
/home/user2

Regards,
George


----------



## ekar (Feb 14, 2012)

*T*hank you very much for explanations, *I* will go for the data sets then!


----------

