# ZFS RAID MIRROR Boot Error



## iamfahad (Feb 18, 2017)

I have installed FreeBSD-RELEASE 11.0 with MIRROR (Double Disk). SWAP mirror too.



```
Mounting from zfs:zroot/ROOT/default failed with error 2: unknown file system
```

I can by pass the problem by loading kernels,
load /boot/kernel/kernel
load /boot/kernel/opensolaris.ko
load /boot/kernel/zfs.ko

But every time I need boot this way.

If I then edit loader.conf and add lines to load the modules, it will boot automatically:

opensolaris_load="YES"
zfs_load="YES"

Is this the perfect solution? I have to build an Internal server. But If it is like that, i am little bit worried to rely. I had to give some time to find the exact way around.

Isn't there any official update in this FREEBSD?


----------



## gkontos (Feb 18, 2017)

How did you install the system? bsdinstall in FreeBSD 11.0-RELEASE has a very straight forward way to create a mirror root on ZFS.


```
opensolaris_load="YES"
```
Is not needed.


----------



## iamfahad (Feb 18, 2017)

gkontos said:


> How did you install the system? bsdinstall in FreeBSD 11.0-RELEASE has a very straight forward way to create a mirror root on ZFS.
> 
> 
> ```
> ...



I did install that way. It works in my virtualbox with several disk and raid mirror. But facing this problem in my home server(to be).

does it varies on main boards?


----------



## gkontos (Feb 18, 2017)

iamfahad said:


> I did install that way. It works in my virtualbox with several disk and raid mirror. But facing this problem in my home server(to be).
> 
> does it varies on main boards?



No, it is exactly the same. Here is the /boot/loader.conf of one server installed with FreeBSD 11.0-RELEASE


```
kern.geom.label.disk_ident.enable="0"
kern.geom.label.gptid.enable="0"
kern.geom.label.disk_ident.enable="0"
kern.geom.label.gptid.enable="0"
zfs_load="YES"
```

If your home server is using any sort of raid make sure that you disable it.


----------



## iamfahad (Feb 18, 2017)

gkontos said:


> No, it is exactly the same. Here is the /boot/loader.conf of one server installed with FreeBSD 11.0-RELEASE
> 
> 
> ```
> ...



Actually I meant mirror. Not raid. Raid is disabled. I clean partitioned the disks. I will update the config check, will let you know. Thank You.


----------



## iamfahad (Feb 19, 2017)

gkontos said:


> No, it is exactly the same. Here is the /boot/loader.conf of one server installed with FreeBSD 11.0-RELEASE
> 
> 
> ```
> ...




Hello, I have the following configs in /boot/loader.conf


```
geom_mirror_load="YES"
kern.geom.label.disk_ident.enable="0"
kern.geom.label.gptid.enable="0"
zfs_load="YES"
```

Is it supposed to be like that?

If I just comment the "geom_mirror_load="YES" " then the system boot normally.  But why is it by default enabled ?


----------



## ShelLuser (Feb 19, 2017)

geom_mirror should not be used in combination with ZFS, that is most definitely the cause of your problem. GEOM is basically the 'internal' way to set up mirrors, raids and journals (see also gmirror(8)). It's been years since I installed FreeBSD but I can only guess that you could have enabled a wrong option somewhere.

To my knowledge you can set up ZFS during installation, but it doesn't fully automatically set up mirrors and raid-z and such. However, I could be wrong about that because as said: it's been ages since I used the installer.


----------



## chrbr (Feb 19, 2017)

ShelLuser said:


> To my knowledge you can set up ZFS during installation, but it doesn't fully automatically set up mirrors and raid-z and such. However, I could be wrong about that because as said: it's been ages since I used the installer.


Nowadays it works well assuming you want to use the whole disk(s).


----------

