re-use existing LXC disk

amachils

New Member
Mar 11, 2016
15
0
1
I was forced to re-install a server, but the LXC disks are on a available ZFS pool. Can I recreate the containers, using these disks?

Regards,

Angelo Machils
 
You can create a new container just rename your ZFS volume. I do this all the time to "clone" a LXC on ZFS. E.g. use disk 100 for disk 101:

Code:
zfs destroy rpool/proxmox/subvol-101-disk-1
zfs rename rpool/proxmox/subvol-100-disk-1 rpool/proxmox/subvol-101-disk-1

You can also clone to get a real CoW approach for Proxmox/LXC
 
You can create a new container just rename your ZFS volume. I do this all the time to "clone" a LXC on ZFS. E.g. use disk 100 for disk 101:

Code:
zfs destroy rpool/proxmox/subvol-101-disk-1
zfs rename rpool/proxmox/subvol-100-disk-1 rpool/proxmox/subvol-101-disk-1

You can also clone to get a real CoW approach for Proxmox/LXC

Thank you for this! I was rsync'ing one to another (which also works), but this is much faster offcourse.

Regards,

Angelo