Disconnect and reconnect zfs storage with containers?

Chicken76

Well-Known Member
Jun 26, 2017
54
2
48
44
Is it possible to disconnect a zfs-based storage from a Proxmox machine that has containers on it and then reconnect it and restore the containers from it?

I need to add the machine in question to a cluster and don't have the space to back up those containers. So I was thinking if I could physically disconnect the drive, delete de container from the configuration so I can add the machine to the cluster, then reconnect the drive and somehow restore the container (maybe from a backup of the configuration from /etc/pve/lxc ?)
 
Last edited:
In theory yes, but there are some implementation details (as always).

If you have ZFS on both machines and they are both installed from the installer, they will both have the same name, so you have to take care of it. A smarter approach would be to just make a ZFS snapshot and send/receive the dataset from one node to the other. Shut it down, make another snapshot and send/receive the incremental (much smaller time requirement).

If you have ZFS only on the source, just go ahead, import the pool on the other node and copy the files.

In the end, copy the VM configuration and start the VM on the other side.
 
I think I've not explained well what I'm trying to do. The machine has a separate pool from RPOOL that's filled with data in a container. In order to add that machine to a cluster it needs to have no VMs. Since I don't have the space to move that data elsewhere, I was wondering if I could disconnect the pool, add the machine to the cluster and then reconnect the pool and somehow restore the container.
 

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!