Sample Header Ad - 728x90

Adding a fresh zfs sub-dataset pri_zp/Z1/Z99-future to pri_zp/Z1, and resuming recursive replication to sec_zp/Z1

0 votes
1 answer
34 views
I have set up and replicated the OpenZFS dataset pri_zp/Z1 (with pri_zp/Z1/Z00-initial) to sec_zp/Z1 using a zfs send -R. But then (months later) when I try to create (and replicate) a newer data set, called pri_zp/Z1/Z99-future, the replication to sec_zp/Z1 fails. How do I add a fresh sub data set pri_zp/Z1/Z99-future, and enable its recursive replication? Below is an example trace of the zfs commands that demonstrate the hiccup I encountered. **A. Setup Z1 base with Z00-initial:** # zfs create pri_zp/Z1 # zfs create pri_zp/Z1/Z00-initial # zfs snapshot -r pri_zp/Z1@ssA # zfs send -V -R pri_zp/Z1@ssA | zfs receive -d sec_zp full send of pri_zp/Z1@ssA estimated size is 79.1K full send of pri_zp/Z1/Z00-initial@ssA estimated size is 78.6K total estimated size is 158K **B. Send an next snapshot, ssB:** # zfs snapshot -r pri_zp/Z1@ssB # zfs send -V -R -I pri_zp/Z1@ss{A,B} | zfs receive -d sec_zp send from @ssA to pri_zp/Z1@ssB estimated size is 624B send from @ssA to pri_zp/Z1/Z00-initial@ssB estimated size is 624B total estimated size is 1.22K **C. Start integration of Z99-future:** # zfs create pri_zp/Z1/Z99-future # zfs snapshot -r pri_zp/Z1@ssC # zfs send -V -I pri_zp/Z1@ss{B,C} | zfs receive -d sec_zp send from @ssB to pri_zp/Z1@ssC estimated size is 61.1K total estimated size is 61.1K Everything working fine until here. But now I need to send the initial ssC snapshot of pri_zp/Z1/Z99-future@ssC. (It's not an incremental) **This next zfs command probably triggers the problem, but it cannot be done recursively:** # zfs send -V pri_zp/Z1/Z99-future@ssC | zfs receive -d sec_zp **D. Here the problem manifests itself:** # zfs snapshot -r pri_zp/Z1@ssD # zfs send -V -R -I pri_zp/Z1@ss{C,D} | zfs receive -d sec_zp send from @ssC to pri_zp/Z1@ssD estimated size is 624B send from @ssC to pri_zp/Z1/Z99-future@ssD estimated size is 624B send from @ssC to pri_zp/Z1/Z00-initial@ssD estimated size is 624B total estimated size is 1.83K cannot receive incremental stream: destination sec_zp/Z1 has been modified since most recent snapshot **The specific dataset change caused by** zfs send -V pri_zp/Z1/Z99-future@ssC: # zfs diff sec_zp/Z1@ssC + /sec_zp/Z1/Z99-future M /sec_zp/Z1/ - /sec_zp/Z1/Z99-future - /sec_zp/Z1/Z99-future/ - /sec_zp/Z1/Z99-future//security.selinux Also: # zfs list -r -t all -S creation sec_zp/Z1 NAME USED AVAIL REFER MOUNTPOINT sec_zp/Z1/Z99-future 96K 1.22T 96K /sec_zp/Z1/Z99-future sec_zp/Z1@ssC 64K - 104K - sec_zp/Z1/Z99-future@ssC 0B - 96K - sec_zp/Z1@ssB 0B - 96K - sec_zp/Z1/Z00-initial@ssB 0B - 96K - sec_zp/Z1/Z00-initial 96K 1.22T 96K /sec_zp/Z1/Z00-initial sec_zp/Z1 416K 1.22T 96K /sec_zp/Z1 sec_zp/Z1@ssA 0B - 96K - sec_zp/Z1/Z00-initial@ssA 0B - 96K Any hints are welcomed.
Asked by NevilleDNZ (250 rep)
Jul 17, 2024, 02:54 AM
Last activity: Jul 17, 2024, 11:07 AM