Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nothing works on FreeBSD 12.1 #29

Open
Peter2121 opened this issue Oct 26, 2020 · 4 comments
Open

Nothing works on FreeBSD 12.1 #29

Peter2121 opened this issue Oct 26, 2020 · 4 comments
Labels
bug Something isn't working

Comments

@Peter2121
Copy link

peter@peter-freebsd ~ % sudo abgleich --version
0.0.7
peter@peter-freebsd ~ % uname -a
FreeBSD peter-freebsd.domain.local 12.1-RELEASE-p10 FreeBSD 12.1-RELEASE-p10 GENERIC  amd64

zfs-backup.yaml :

source:
    zpool: tanksys
    prefix: data/homedirs
    host: localhost
    user:
target:
    zpool: zbackup
    prefix: data
    host: localhost
    user:
include_root: yes
keep_snapshots: 2
always_changed: yes
written_threshold: 1048576
check_diff: no
suffix: _backup
digits: 2
ignore: []
ssh:
    compression: no
    cipher: [email protected]

zfs list:

NAME                                                USED  AVAIL  REFER  MOUNTPOINT
tanksys                                             202G  42.7G    19K  none
tanksys/ROOT                                        158G  42.7G    19K  none
tanksys/ROOT/update20200921                         544K  42.7G   991M  /
tanksys/ROOT/update20200921/usr                      76K  42.7G  2.54G  /usr
tanksys/ROOT/update20200921/usr/local                76K  42.7G   111G  /usr/local
tanksys/ROOT/update20200921/usr/local/frpc             0  42.7G  64.2M  /usr/local/jails/cbsd/jails-data/frpc-data
tanksys/ROOT/update20200921/usr/local/frps             0  42.7G  66.8M  /usr/local/jails/cbsd/jails-data/frps-data
tanksys/ROOT/update20200921/usr/local/npm              0  42.7G   191M  /usr/local/jails/cbsd/jails-data/npm-data
tanksys/ROOT/update20200921/usr/local/oauth            0  42.7G  55.1M  /usr/local/jails/cbsd/jails-data/oauth-data
tanksys/ROOT/update20200921/usr/local/php              0  42.7G   179M  /usr/local/jails/cbsd/jails-data/php-data
tanksys/ROOT/update20200921/usr/local/ports-build      0  42.7G  42.8M  /usr/local/jails/cbsd/jails-data/ports-build-data
tanksys/ROOT/update20200921/usr/obj                    0  42.7G    19K  /usr/obj
tanksys/ROOT/update20200921/usr/src                    0  42.7G   335M  /usr/src
tanksys/ROOT/update20200921/var                     188K  42.7G  38.0G  /var
tanksys/ROOT/update20200921/var/log                  85K  42.7G  8.86M  /var/log
tanksys/ROOT/update20200921/var/tmp                   1K  42.7G    20K  /var/tmp
tanksys/ROOT/update20201021                         158G  42.7G   939M  /
tanksys/ROOT/update20201021/usr                     118G  42.7G  2.54G  /usr
tanksys/ROOT/update20201021/usr/local               115G  42.7G   111G  /usr/local
tanksys/ROOT/update20201021/usr/local/frpc         64.2M  42.7G  64.2M  /usr/local/jails/cbsd/jails-data/frpc-data
tanksys/ROOT/update20201021/usr/local/frps         66.8M  42.7G  66.8M  /usr/local/jails/cbsd/jails-data/frps-data
tanksys/ROOT/update20201021/usr/local/npm           191M  42.7G   191M  /usr/local/jails/cbsd/jails-data/npm-data
tanksys/ROOT/update20201021/usr/local/oauth        55.1M  42.7G  55.1M  /usr/local/jails/cbsd/jails-data/oauth-data
tanksys/ROOT/update20201021/usr/local/php           179M  42.7G   179M  /usr/local/jails/cbsd/jails-data/php-data
tanksys/ROOT/update20201021/usr/local/ports-build  42.8M  42.7G  42.8M  /usr/local/jails/cbsd/jails-data/ports-build-data
tanksys/ROOT/update20201021/usr/obj                  19K  42.7G    19K  /usr/obj
tanksys/ROOT/update20201021/usr/src                 336M  42.7G   335M  /usr/src
tanksys/ROOT/update20201021/var                    39.4G  42.7G  39.3G  /var
tanksys/ROOT/update20201021/var/log                9.03M  42.7G  8.89M  /var/log
tanksys/ROOT/update20201021/var/tmp                31.5K  42.7G  21.5K  /var/tmp
tanksys/data                                       41.3G  42.7G    19K  none
tanksys/data/TabSessionManagerBackups              5.17G  42.7G  5.17G  /home/peter/Downloads/TabSessionManagerBackups
tanksys/data/homedirs                              36.1G  42.7G  34.0G  /usr/home
tanksys/swap                                       2.06G  44.0G   729M  -
zbackup                                             162K  1.76T    23K  none
zbackup/data                                         23K  1.76T    23K  /zbackup-data
peter@peter-freebsd ~ % sudo abgleich tree zfs-backup.yaml source
(empty)
@s-m-e s-m-e added the bug Something isn't working label Nov 26, 2020
@s-m-e
Copy link
Member

s-m-e commented Nov 26, 2020

@Peter2121 sorry for the late reply.

Yes, this is something I have also noticed. The root cause is that abgleich queries ZFS in a way that does not properly work in FreeBSD's "old" implementation of ZFS. It is this command that I use:

zfs get all -r -H -p tank

ZoL lists all properties of all datasets in one go this way. It's a relatively fast query. On FreeBSD's implementation of ZFS, it apparently does not work recursively. I'll have to check.

The only feasible workaround that I can see is to iteratively recursively run zfs get against all datasets and snapshots. I have tried this - on large and complex zpools, this can take ages (hours at least) to complete (while ZoL completes a single recursive query even in complex zpools within seconds to few minutes).

I'll need to setup a FreeBSD test system. Maybe I can find another, more performant workaround. Besides, in the meantime, you can also check if you can make it work on the new, unified OpenZFS codebase. FreeBSD and ZoL have recently joined forces. It's part of FreeBSD 12.1 and 13.0 forward.

@s-m-e
Copy link
Member

s-m-e commented Nov 26, 2020

Just noticed: You explicitly reported this behavior for FreeBSD 12.1. Can you please check which ZFS implementation you are using?

@Peter2121
Copy link
Author

OK, I understand the problem.
Indeed, on my 12.1 system I use ZFS from base, so it is the 'old' one. The 'new' version comes as a port/package. If you consider that supporting the ZFS from base is too hard - you need to mention it in your README file. I think, the support of 'new' version of ZFS will be merged in base in future releases.

@s-m-e
Copy link
Member

s-m-e commented Nov 26, 2020

@Peter2121 I am not sure yet whether or not it is too hard to support it. I just came across this recently and "by accident". I simply did not expect that this rather fundamental query would not work. It is my understanding that the underlying ZFS library does have the required capabilities, so a call to its API might do the trick. I have not had time yet to dig as deep into it as I'd liked ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants