# ZFS installation - Is it that simple?



## fred974 (Aug 16, 2012)

Hi,

I found the following tutorial on the web:



> Install a FreeBSD 9 system with zfs root using the new installer:
> 
> Start the install, drop to shell when it asks about disks, run these commands:
> 
> ...



All the tutorial I have seen before involved sevral a few more steps...
IS the above correct or does it need more stuff to get it to work?
Is there a way of knowing if your OS is running in zfs?

thank you 
Fred


----------



## fred974 (Aug 16, 2012)

37 viewing and no reply

Anybody please?


----------



## lme@ (Aug 16, 2012)

Have you already tried the tutorial?
If so, you should see "Trying to mount root from zfs:zroot".


----------



## fred974 (Aug 16, 2012)

I did but reached a wall 
I couldn't mount zroot but its my system I think.

I'll try again later on today with a new VM.


----------



## gkontos (Aug 16, 2012)

Try with this


----------



## vermaden (Aug 16, 2012)

@fred974

Its as simple as that: http://forums.freebsd.org/showthread.php?t=31662

You may as well use latest PC-BSD 9.x snapshot and select ZFS in the graphical installer.


----------



## PageDir (Aug 16, 2012)

http://wiki.freebsd.org/RootOnZFS/GPTZFSBoot
This one is fine, I've already tried it in virtualbox, and have translated it into Chinese a fewer days ago.


----------



## PageDir (Aug 17, 2012)

PageDir said:
			
		

> http://wiki.freebsd.org/RootOnZFS/GPTZFSBoot
> This one is fine, I've already tried it in virtualbox, and have translated it into Chinese a fewer days ago.



I'm so sorry, the wiki URL should be this one! It is for 9.0-RELEASE.

wiki.freebsd.org/RootOnZFS/GPTZFSBoot/9.0-RELEASE


----------



## fred974 (Aug 17, 2012)

thank you for all your reply 
I now have several tutorial to follow


----------



## kpa (Aug 17, 2012)

The one posted by PageDir is probably the best of the bunch. I would still do one thing differently and that's the step where the mountpoint of zroot  is set to legacy. I'd keep it at / and not change mountpoints for the other filesystems.

Why? Well the pool is mounted anyway with altroot set to /mnt so setting the mountpoint of zroot to / would keep everything nicely rooted under /mnt with correct hierarchy without explicitly setting mountpoints for the other filesystems.

Using / as the mountpoint for the ZFS root filesystem does work correctly and you don't have to add it into /etc/fstab anymore.

It also makes recovery easier when you can import the pool in one go by just setting the altroot to a temporary directory with the -R flag on zpool import.


----------



## fred974 (Aug 17, 2012)

Hi kpa,

are you saying that you'll skip this:



> 4 - Change mount points for zroot pool
> Fixit# zfs set mountpoint=legacy zroot
> Fixit# zfs set mountpoint=/tmp zroot/tmp
> Fixit# zfs set mountpoint=/usr zroot/usr
> Fixit# zfs set mountpoint=/var zroot/var



what would you chANGE it to?
Could you show me please


----------



## kpa (Aug 17, 2012)

I think it could work by just leaving those steps out. Not 100% sure though...


----------



## fred974 (Aug 17, 2012)

gkontos said:
			
		

> Try with this



Hi thank your for the link..
what '4K optimized' mean exactly?

thank you

fred


----------



## gkontos (Aug 17, 2012)

fred974 said:
			
		

> Hi thank your for the link..
> what '4K optimized' mean exactly?
> 
> thank you
> ...



Many new SATA drives are build with the so called "Advanced Format" sector.


----------

