#1932 Issue closed: feature request: zfs support (binaries and pool layout)

Labels: enhancement, needs sponsorship, no-issue-activity

mailinglists35 opened issue at 2018-10-15 19:22:

Relax-and-Recover (ReaR) Issue Template

Fill in the following items before submitting a new issue
(quick response is not guaranteed with free support):

  • ReaR version ("/usr/sbin/rear -V"):
    all template values from issue #1930

  • OS version ("cat /etc/rear/os.conf" or "lsb_release -a" or "cat /etc/os-release"):

  • ReaR configuration files ("cat /etc/rear/site.conf" and/or "cat /etc/rear/local.conf"):

  • Hardware (PC or PowerNV BareMetal or ARM) or virtual machine (KVM guest or PoverVM LPAR):

  • System architecture (x86 compatible or PPC64/PPC64LE or what exact ARM device):

  • Firmware (BIOS or UEFI or Open Firmware) and bootloader (GRUB or ELILO or Petitboot):

  • Storage (lokal disk or SSD) and/or SAN (FC or iSCSI or FCoE) and/or multipath (DM or NVMe):

  • Description of the issue (ideally so that others can reproduce it):
    It would be nice to include zfs binaries and optionally restore zfs pool layout
    essential binaries would be zfs zpool zdb zstreamdump mount.zfs
    pool layout and zfs datasets with properties save/restore should be
    similar to how save/restore partitions layout works
    user should be responsible for restoring the rest of zfs contents (files, volumes)
    at minimum looking for zfs binaries would be a good start

  • Work-around, if any:

jsmeix commented at 2018-10-16 08:49:

To get only plain ZFS setup binaries and whatever ZFS related helper files
into the ReaR recovery system you can use generic ReaR config variables
like COPY_AS_IS, REQUIRED_PROGS, and LIBS,
see the comments in usr/share/rear/conf/default.conf

When you have your basic operating system on ZFS
things get somewhat complicated because then you would have to
manually do your ZFS setup and mount it appropriately (under /mnt/local)
in the running recovery system before you can restore the backup
of your basic operating system.

I think (but I did not test it) you could do such a missing ZFS setup
before the backup gets restored by enforcing ReaR's so called
"migration mode" via export MIGRATION_MODE='true' before
you run rear -D recover.

In migration mode there are several user dialogs that let you
interrupt and change the ReaR recovery procedure as you need it.

For example you may manually enhance the diskrestore.sh script
with your needed ZFS setup commands or alternatively you may interrupt
the ReaR recovery procedure after the disk layout was recreated
as far as ReaR could do it (i.e. without ZFS setup) but just before the
backup gets restored and at that point change into the ReaR shell
and do your missing ZFS setup manually there.

You may also have a look at
https://github.com/rear/rear/issues/1912#issuecomment-423475172
and for a different example how ReaR's migration mode is used
for some special task have a look at
http://lists.relax-and-recover.org/pipermail/rear-users/2018-April/003547.html

In contrast when you do not have your basic operating system on ZFS
(but e.g. only some particular application data like a database system)
then I would thoroughly recommend as far as possible
to keep separated things separated, cf.
https://github.com/rear/rear/issues/1925#issuecomment-428479375

gdha commented at 2018-10-25 13:27:

@mailinglists35 Feel free to prepare a pull request so you help other with ZFS integration issues as well. Thanks.

github-actions commented at 2020-06-30 01:33:

Stale issue message


[Export of Github issue for rear/rear.]