# Some doubts about FreeBSD 10 + zfs on root + beadm



## Symbiosis (Jun 8, 2014)

Hi,

Yesterday I installed a new FreeBSD with ZFS. The installation went fine and I checked that it was prepared for beadm by default.

The problem is that I don't understand the actual layout of filesystem. This is the output of the ZFS filesystem after installation (please, take into account that jessyfs/usr/home/carlos was created by me, I will go with this filesystem later).


```
zfs list
NAME                          USED  AVAIL  REFER  MOUNTPOINT
jessyfs                       217G   236G   144K  none
jessyfs/ROOT                 26.1G   236G   144K  none
jessyfs/ROOT/default         26.1G   236G  25.9G  /
jessyfs/tmp                   176K   236G   176K  /tmp
jessyfs/usr                   191G   236G   144K  /usr
jessyfs/usr/home              191G   236G   184K  /usr/home
jessyfs/usr/home/carlos       191G   236G   191G  /usr/home/carlos
jessyfs/usr/ports             144K   236G   144K  /usr/ports
jessyfs/usr/src               144K   236G   144K  /usr/src
jessyfs/var                  64.2M   236G  63.6M  /var
jessyfs/var/crash             148K   236G   148K  /var/crash
jessyfs/var/log               220K   236G   220K  /var/log
jessyfs/var/mail              144K   236G   144K  /var/mail
jessyfs/var/tmp               152K   236G   152K  /var/tmp
```

As you can see, only jessyfs/ROOT/default seems to grow up. In fact, I check which filesystem were mounted and this was the result:


```
zfs mount
jessyfs/ROOT/default            /
```

So here are my questions:

1.- If the other filesystems are not used, why are they created?
2.- If all the data goes to the same filesystem, what's happens with different properties that you want to use on different filesystems? I mean, if I want to activate compression on /tmp, how can I do it if all data goes to ROOT/default?
3.- If all the filesystems have the canmount to on (jessyfs/usr is the only one that is set to off by default), why aren't they mounted on startup?

Talking about the filesystem I created after the installation (/usr/home/carlos), when I created it, it was mounted automatically and that's the reason why this filesystem grew up but when I restart the computer, it doesn't mount automatically and I have to mount it manually to get my data back. So here are some other doubts.

4.- How ZFS knows which filesystem must mount on boot?
5.- How should I create new filesystems to follow the layout of the new installation? Now, I think that my /usr/home/carlos breaks the current layout.

Thanks a lot for your help.

Best regards


----------



## Symbiosis (Jun 8, 2014)

Would it be possible that the zfs on root installation script will be wrong?

I think the right layout should be something similar to:


```
NAME                                      USED  AVAIL  REFER  MOUNTPOINT
system                                    716M   444G   144K  none
system/ROOT                               715M   444G   144K  none
system/ROOT/default                       715M   444G   713M  /mnt
system/ROOT/default/root                  160K   444G   160K  /mnt/root
system/ROOT/default/tmp                   144K   444G   144K  /mnt/tmp
system/ROOT/default/usr                  1.13M   444G   144K  /mnt/usr
....
....
....
and so on
```

With this layout you can put flags for each filesystem.

Best regards


----------



## kpa (Jun 9, 2014)

Yes, that certainly looks wrong to me. The root filesystem that is now on dataset jessyfs/ROOT/default and the dataset that has the /usr filesystem (now on jessyfs/usr) should go together always because they make up the code and shared data part of "world". If you now added a new boot environment with a different version of the OS you would still get the /usr filesystem from jessyfs/usr that is of wrong version.


----------

