[SOLVED] Can I copy data from zfs snapshot directly ?

chengkinhung

Renowned Member
Feb 11, 2016
57
10
73
24
Hi, everybody,

I am tring to migrate one VM from ZFS disk to LVM disk, I can dd clone the full ZFS disk, but this VM is running, so I like to create a snapshot for this ZFS disk first, but I can not find the way to access the device path of this snapshot. Could you please tell us how to copy data from ZFS snapshot or where I can find the snapshot device ? I am using ProxMox 7.4-16 , thanks very much.
 
I find the way to do:
Code:
# zfs snapshot pool/vm-100-disk-0@mysns
# zfs set snapdev=visible pool/vm-100-disk-0
after that, the devices of this snapshot will show under /dev/zvol/pool/
Code:
# /dev/zvol/pool/vm-100-disk-0@mysns -> ../../zd0
# /dev/zvol/pool/vm-100-disk-0@mysns-part1 -> ../../zd0p1
when completed:
Code:
# zfs set snapdev=hidden pool/vm-100-disk-0
# zfs destroy pool/vm-100-disk-0@mysns
 
Last edited:
because I will still need the snapshot to run rsync later, even when I restored VM from backup, I need to keep the same data till I can run latest rsync. The data is over 2TB, it is not easy.
 

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!