zvol cloning

Status
Not open for further replies.

alexander_ks

Dabbler
Joined
Mar 6, 2016
Messages
42
Hello, Can I copy or clone zvol on one zpool1 to zvol on another zpool2? I have to different pools on different physical dicks. First zvol has data for VM through bhyve and I dont want to configure and install VM to the second zvol again.
 

m0nkey_

MVP
Joined
Oct 27, 2015
Messages
2,739
Yes, use zfs send and zfs recv. You need to take a snapshot before you do this.

Code:
# zfs snapshot pool1/zvol@tobecloned
# zfs send pool1/zvol@tobecloned | zfs recv pool2/zvol
 

alexander_ks

Dabbler
Joined
Mar 6, 2016
Messages
42
Yes, use zfs send and zfs recv. You need to take a snapshot before you do this.

Code:
# zfs snapshot pool1/zvol@tobecloned
# zfs send pool1/zvol@tobecloned | zfs recv pool2/zvol
Okey, i try to do this. I do not know much about snapshots and how does it work. But I note, that snaphort is a copy of occupied disk space on zvol. And this snapshot was copied to the second zvol. But on the second zvol I have not anougth disck space to copy full snapshot.
Does the pool2/zvol contain all data from pool1/zvol afrter zfs send/revc copy ?
 
Status
Not open for further replies.
Top