ZFS and '-o copies=2' at /etc and booting, weird ...

Hi -

I started to use ZFS only a couple of days ago. The server is not in productive usage, yet.
Thus I do have some time to "play" with ZFS features that are new to me.

I did notice a weird behavior with zfs create -o copies=2 zpool/etc recently:

1) I did copy /etc files from another server into that zpool/etc with copies set to 2
2) Thereafter, I did modify /etc/rc.conf to enable some more services
3) Those newly enabled services did not start at boot time :-(
4) Therefore I did save all zpool/etc files, destroyed zpool/etc, and restored all files into a regular /etc directory
5) Now, all those newly enabled services start as expected

Hmm, weird. Looks as if "the old copy of both" has been used at boot time. But I cannot believe that.

Has someone seen something comparable before? Bug, feature, bad luck, plain weirdness, ...?
 
If I recall correctly :
When you boot, you need to read /etc/rc.conf from etc.
It contains zfs_enable="YES" which in turn runs zfs mount -a
Until then you only have root mounted (perhaps you had old /etc on root, with old config, and new config on separate etc zfs filesystem)

Also it is quite pointless to make zfs filesystem for every directory, because it will make your life suck when you will need to backup them all.

I keep all my FreeBSD on 1 zfs filesystem, this gives good results, easy to manage etc.
I have separate zfs from jails and group of jails.

Here's my setup on server. It works dam well, and I see no point breaking system in more filesystems
Code:
a                   6.48G   218G    27K  none
a/jails             3.84G   218G  24.5K  /jails
a/jails/main        1.39G  8.61G  1.09G  /jails/main
a/jails/main/srv     256M  8.61G   233M  /jails/main/srv
a/jails/share1      2.45G  7.55G  1.24G  /jails/share1
a/jails/share1/srv  1.14G  7.55G   974M  /jails/share1/srv
a/root              2.29G   218G  2.00G  /
a/srv                180M   218G  94.9M  /srv
a/templates          131M   218G   123K  /jails/templates
a/templates/base     131M   218G   131M  /jails/templates/base

One think I could improve is maybe create separate fs for logs on root server
 
killasmurf86 said:
When you boot, you need to read /etc/rc.conf from etc.
It contains zfs_enable="YES" which in turn runs zfs mount -a
Until then you only have root mounted

Yeah, that makes sense.

(perhaps you had old /etc on root, with old config, and new config on separate etc zfs filesystem)

Hmm. Might well have been the case.

Also it is quite pointless to make zfs filesystem for every directory, because it will make your life suck when you will need to backup them all.

Thanks, I did read your other posting in the meantime. I will have to re-think my filesystem layout, though.
 
I tend to create many filesets, so I can fine tune exec, suid and compression options as needed however its a good point made above for /etc. I have never seperated /etc on zfs luckily :)

That article been linked to, if you want to use compression then I suggest using lzjb instead of gzip as it is far superior for performance and stabler.
 
Back
Top