icarbajo
icarbajo

Reputation: 351

zfs send warning: snapshot does not exist (it exists)

I have the next 'zfs pool' in the machine A:

root@machineA:/ # zfs list -t all
NAME                                            USED  AVAIL  REFER  MOUNTPOINT
tank                                           7.44M  28.8G    20K  /tank
tank/test                                        92K  28.8G    19K  /tank/test
tank/test@SNAP_2017-June-30_10:00:00              9K      -    19K  -
tank/test@SNAP_2017-July-01_10:00:00              9K      -    19K  -
tank/test@SNAP_2017-July-02_10:00:00              9K      -    19K  -
tank/test@SNAP_2017-July-03_10:00:00              9K      -    19K  -
tank/test@SNAP_2017-July-04_10:00:00               0      -    19K  -
tank/test@BACKUP_from_2017-June-30                 0      -    19K  -
tank/test/exe                                    37K  28.8G    19K  /tank/test/exe
tank/test/exe@EXE_2017-June-29_13:58:49           9K      -    19K  -
tank/test/exe@EXE_2017-July-03_10:00:00           9K      -    19K  -
tank/test/exe@EXE_2017-July-04_10:00:00            0      -    19K  -
tank/test/exe@BACKUP_from_2017-June-29

And I want to send a snapshot to the machine B:

root@machineB:/ # zfs list -t all
NAME   USED  AVAIL  REFER  MOUNTPOINT
tank  6.04M  28.8G    23K  /tank

With the netcat I can send the snapshots but the system returns me an error very unusual...

If I do:

B: nc -w 5 -l 7766 | zfs recv tank/test/exe
A: zfs send -R tank/test/exe@EXE_2017-July-04_10:00:00 | nc -w 5 192.168.99.2 7766

All it's ok, but if I do:

B: nc -w 5 -l 7766 | zfs recv tank/test
A: zfs send -R tank/test@SNAP_2017-July-04_10:00:00 | nc -w 5 192.168.99.2 7766

The stream of snapshots is sent but in the source side I can show:

root@machineA:/ # zfs send -R tank/test@SNAP_2017-July-04_10:00:00 | nc -w 5 192.168.99.2 7766
WARNING: could not send tank/test/exe@SNAP_2017-July-04_10:00:00: does not exist
WARNING: could not send tank/test/exe@SNAP_2017-July-04_10:00:00: does not exist

Why ZFS takes the dataset tank/test/exe? Any suggestions?

Upvotes: 2

Views: 2011

Answers (1)

Dan
Dan

Reputation: 7737

Actually, the snapshots it's complaining about don't exist on the source system -- tank/test/exe only has @EXE_<date> snapshots, while you're trying to send tank/test/exe@SNAP_<date>. This warning is appearing because you're sending with -R (recursive) from the top-level tank/test filesystem, which sends the specified snapshot on the parent filesystem first, and then searches the children for the same snapshot name to try to send those as well. Usually, this only does what you are expecting when you've taken a snapshot on the parent filesystem with -R -- on your system, you only snapshotted the parent without snapshotting the child at the same time.

On the sending system, you probably want to change your command to be: zfs send -R tank/test/snap@SNAP_2017-July-04_10:00:00 | nc -w 5 192.168.99.2 7766

Upvotes: 4

Related Questions