2

I'm trying to incrementally send changes for a zvol from my working pool (zdata) to a backup pool (zbackup), however I'm struggling to suppress the refreservation property.

While I realise that the purpose of this property is to ensure that the zvol has enough space, I don't envision ever mounting it from the backup pool, so I would rather free up the space, especially since the zvol is mostly empty and probably will be for some time.

However, while I can temporarily suppress the setting, it seems to keep being recreated and I'm not entirely sure why.

The command I'm using to send the incremental changes looks something like this:

zfs send -pw -i @snapshot1 zdata/zvol@snapshot2 | zfs receive -dus -x reservation -x refreservation zbackup

Basically on the sending side I've got -p to send properties (as I do want the other properties to be synchronised), -w for sending encrypted blocks, and -i to specify the snapshot to send incrementally from.

On the receiving side I've got -d for the naming convention (drop the pool name), -u to prevent anything from being mounted, and -s to allow for an interrupted transfer to be resumed (using the resume token), plus -x to drop the properties I don't want to transfer (reservation and refreservation, though I think only the latter is actually required).

My problem is that dropping the properties doesn't seem to stick; first time I ran the command the reservation disappeared (and I had the free space I expected), then the next time I ran the command the reservation came back. It seems to alternate every time I run the command, rather than staying suppressed.*

If I run zfs get refreservation zbackup/zvol when the reservation has returned, I get a response like:

zbackup/zvol    refreservation  257G    received

Even though the property should not be received (or if it is, it should be ignored) as per the -x options on the receiving side.

I realise I could try setting the reservation to none on the receiving side as a local property, or use the -o option to set refreservation=none as an option on zfs receive, but I would have thought that I shouldn't need to do either of these if -x is behaving like it's supposed to? So am I doing something wrong in this case or is this likely to be a bug?

Update: *Actually, the alternating behaviour I'm seeing may be related to another property being changed (possibly causing the properties to be resent to the receiver on every second run). This isn't the cause of the overall problem though (the reservation somehow being received even though it should be excluded).

Haravikk
  • 267
  • 4
  • 12

0 Answers0