zfs replication via second LAN?

randyqx

New Member
May 21, 2024
15
3
3
US Left Coast
i am a proxmox n00b, coming fom ganeti. i am used to drbd-based image replication being on a second LAN, which is pretty much only for that purpose. i am using zfs for image store in proxmox, and zfs-based replication. is there a means to keep the replication traffic off the 'front panel' LAN?
 
Yeah. When I had the same question I found an older answer that said all replication traffic goes over vmbr0. So people would need to adjust their network config to have vmbr0 be the replication traffic bridge, and the public traffic would then come in over a newly created vmbr1.

So that's what I set up, and it works fine.

Later on I found out there's also an option in the /etc/pve/datacenter.cfg file called `migration`, which controls the network all of your migration traffic goes over:

Bash:
# cat /etc/pve/datacenter.cfg

crs: ha-rebalance-on-start=1,ha=static
ha: shutdown_policy=migrate
keyboard: en-us
migration: insecure,network=10.200.1.0/24

I'm not sure if the network listed for the migration traffic there also does replication traffic or not, but that entry does seem to work for migration traffic.

The (optional) insecure keyword there tells Proxmox to just do a direct tcp connection (unencrypted) between hosts for replication data (the memory copy part anyway), rather than using ssh. Much, much faster. Perfectly fine in a homelab, but not super suitable for a production environment.

The ha: shutdown_policy=migrate line might be of interest too for clustered setups. With that setting, when you tell a host box to shut down (or reboot) it automatically migrates any VMs on it to other hosts first (then does the shut down or reboot). That's kind of important, as the default setting for Proxmox will just shut down any VMs and the host instead, thereby causing an outage for anyone using those VMs (!!!).
 
Last edited:
thanks! `/etc/pve/datacenter.cfg` is non-existent on my config, but `/etc/pve/replication.cfg` looks promising although empty. i will experiment.
 
thanks! `/etc/pve/datacenter.cfg` is non-existent on my config, but `/etc/pve/replication.cfg` looks promising although empty. i will experiment.
Set the Migration Network in your GUI under Datacenter. This Setting creates the configfile automaticaly.
 
  • Like
Reactions: justinclift
@randyqx Ahhh. That /etc/pve/replication.cfg file seems to be a different thing.

In my test lab systems it has the list of replication jobs between nodes.

For example, at the moment there's only a single job defined, automatically replicating VM 100 from server1 to server2 using the default schedule (every 15 mins):

Code:
local: 100-0
        target server2
        source server1

You can set that kind of thing up in the GUI using the Replication tab in individual VMs. From the command line it's the pvesr command.

If you're using a multi-node setup, it's probably worth taking a look at. :)
 
Set the Migration Network in your GUI under Datacenter. This Setting creates the configfile automaticaly.
got it. thanks. i am a bit more focused on replication, as that is a perpetual load and not insignificant. so far, i used the hack of a separate front panel LAN bridge, `br-lan`, for payload data, and configured `vmbr0` to bridge to the back end LAN. seems to work.
 
  • Like
Reactions: justinclift

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!