Skip to content

Correct approach to sync full tree of zfs #210

@Peter2121

Description

@Peter2121

I would like to create a script to sync the full tree of all zfs filesystems of a newly installed FreeBSD.

The list of the filesystems is as follows:

zroot
zroot/ROOT
zroot/ROOT/default
zroot/home
zroot/home/peter
zroot/tmp
zroot/usr
zroot/usr/ports
zroot/usr/src
zroot/var
zroot/var/audit
zroot/var/crash
zroot/var/log
zroot/var/mail
zroot/var/tmp

Another filesystems could be created during install or after it (for example, zroot/home/<user> or zroot/ROOT/default/<update>). The existing zrep configuration should continue to work in such case, only new filesystems need to be added to the sync list.

As I understand, the recursive replication is not reliable, the filesystems should be synced one-by-one. As I mentioned in #166, zrep data is propagated to the child filesystems, so the only approach would be ZREPTAG defined separately for EVERY filesystem to sync. It looks a bit hard to manage and snapshot deletion needs to be debugged/validated, so I would like to ask if any other approach looks possible before starting developing this solution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions