Best method to restore backup VM on new pool/hardware?

NadoNate

Dabbler
Joined
Aug 7, 2017
Messages
18
Hello,
I've run out of room on a single SSD / ZVOL i use for a VM. I've orderd a second SSD in an attempt to expand my available space.

What is the best way to backup and restore my ZVOL?

I've created a snapshot and sent it to a different local pool following the suggestion here: how-to-backup-and-restore-a-vm.109523/

At this point I want to delete the existing VM-ZVOL, add the new hardware, create a new pool/ZVOL using both SSD's.

How would I than restore my backup using my snapshot clone? Am I misunderstanding that clones are deleted after the origional dataset is destroyed?
 

NadoNate

Dabbler
Joined
Aug 7, 2017
Messages
18
For anyone curious, I was able to accomplish this by:
  1. Create snapshot of the zvol with the VM - zfs snapshot pool#1/zvolname@snapshot-name
  2. Clone the snapshot to a seperate pool - zfs send pool#1/zvolname@snapshot-name | pv | zfs recv pool#2/dataset/zvolname
  3. Destroy the (original) snapshot - zfs destroy pool#1/zvolname@snapshot-name
  4. Export/Disconnect pool#1 and disk through the UI
  5. Add new hardware and create new pool#3 with expanded storage through the UI
  6. Push the cloned zvol/snapshot to the new pool - zfs send pool#2/dataset/zvolname@snapshot-name | pv | zfs recv pool#3/newzvolname
  7. Recreate the VM (add) selecting the new zvol as an existing disk:
Screenshot from 2023-06-02 08-46-50.png


At this point the VM boots. I had to create a partition with the new space, add the partion to the LVM group (i'm using Ubuntu 22) and use resize2fs to make the OS recognize the new available space.

Additional helpful resources:
 
Last edited:
Top