ZFS Replication to Pool with Different Name

sdet00

Well-Known Member
Nov 18, 2017
77
38
58
Howdy folks. For years I have been using ZFS replication, has all worked great, been a happy chap. One of the frustrating things that I recall having to deal with is that pools had to have the same names to be used for ZFS replication within Proxmox. I recently had a situation where I had an intermittent storage device and I installed replacement storage, but now I have ended up in a situation where my ZFS pools have different names. For example:

pve1 ZFS Pool = zfs-01
pve2 ZFS Pool = zfs-02

I have VMs running on both nodes at the moment. Short of migrating and destroying my pools and re-creating them with the same name, is there a way to configure ZFS replication in 2024 with HA across pools that are named differently? I did a bit of research on this and it didn't seem straightforward. Advice appreciated.
 
I don't think they will want to implement extra settings for something like this, the whole idea of cluster is that the nodes appear identical, it would be quite a nightmare to manager, even the replications are quite convoluted (and not really scalable solution for more nodes).

I think you have to rename the pool, so basically export & import (PVE might do it by itself) and then if need be, appropriately adapt /etc/pve/storage.cfg obviously with nothing running off it while doing it.
 
Short of migrating and destroying my pools and re-creating them with the same name, is there a way ...
Why not simply rename the pools using zpool export followed by import old_name new_name? Don't forget to edit the Proxmox Storage configuration to use the new pool.
 
Why not simply rename the pools using zpool export followed by import old_name new_name? Don't forget to edit the Proxmox Storage configuration to use the new pool.
Hmm, didn't think about that. Although I am not sure how how badly it would break the VMs running on it. I'll look into it but so far I'm leaning towards using this as an opportunity to try out the "Live Restore" feature of Proxmox Backup Server.

Another silly question though - is it possible to use ZFS sync with subvolumes that are named the same? I'm guessing probably not, but I figured I'd ask whilst I'm here.

E.g :

zfs-01/shared1
zfs-02/shared1
 
Hmm, didn't think about that. Although I am not sure how how badly it would break the VMs running on it.
You'll need to stop them in order to export the pool. Normally, VM use the Proxmox storage name (which can be different than the pool name), so just editing the pool name in /etc/pve/storage.cfg (if it is not possible in the GUI) should be enough.
If you need to rename both the pools and the storages, you will need to edit the VM configuration files too (but that should be rather straightforward).
Do the pools need to be named the same, or do the storages need to be name the same, or both?
Another silly question though - is it possible to use ZFS sync with subvolumes that are named the same? I'm guessing probably not, but I figured I'd ask whilst I'm here.
That's not how Proxmox works.
 

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!