Moving a zvol

anderstn

Dabbler
Joined
Oct 2, 2017
Messages
41
Hi

I have a couple of Linux VM's and I believe the drives their zvols are stored on may be failing. These are SSD and they pass all the regular SMART based read tests so write tests will be needed in order to verify that they still work. However I was wondering how I can move the zvol's to another pool before I start running write tests.

I checked the manual but I couldn't find any scenario like this that was described there. Neither did google help much as the answers all went deep into virtualization discussions straight away. And that's not really relevant as I don't need to copy the entire machine and just need the virtual disks so I can hook them up to a newly configured machine with similar specs. Basically following the same approach that I would use if I had to reinstall Freenas.
 

Huib

Explorer
Joined
Oct 11, 2016
Messages
96
Did you consider making snapshots and replicate them to another pool?
You can replicate to the same machine, on another pool. I have a pool with ssd's that I back up to spinning rust in this way.
 

Mlovelace

Guru
Joined
Aug 19, 2014
Messages
1,111
Hi

I have a couple of Linux VM's and I believe the drives their zvols are stored on may be failing. These are SSD and they pass all the regular SMART based read tests so write tests will be needed in order to verify that they still work. However I was wondering how I can move the zvol's to another pool before I start running write tests.

I checked the manual but I couldn't find any scenario like this that was described there. Neither did google help much as the answers all went deep into virtualization discussions straight away. And that's not really relevant as I don't need to copy the entire machine and just need the virtual disks so I can hook them up to a newly configured machine with similar specs. Basically following the same approach that I would use if I had to reinstall Freenas.
Is the other pool on the same freeNAS server? If so, snapshot the zvol and replicate it to the other pool.
zfs snapshot -r pool/zvol@relocate zfs send pool/zvol@relocate | zfs receive -v pool/zvol

If the pool is on another server (on the same local network) then you'll need a slightly different command. Just substitute 'dataset' for the zvol in those commands.
 

anderstn

Dabbler
Joined
Oct 2, 2017
Messages
41
It's on the same machine so this should work. I will let you know if I run into any problems :)
 
Top