Clone or copy entire 4 disk zpool to new 4 disk zpool (ZFS Stripe)

Status
Not open for further replies.
Joined
Jun 21, 2016
Messages
7
I am banging my head against the wall this morning. I have a "Master" drive that consists of a ZFS zpool (striped) that is on a 4 disk proprietary disk cartridge. This drive consists of 2 partitions that I need to keep the same size, names, etc and I need to copy / clone it all to another blank 4 disk cartridge.

When I put the 2 cartridges into my computer via their drive adapters, here is the disk layout when I look at what drives are being detected.

Data Cartridge #1 (Master)
/dev/sdc
/dev/sdd
/dev/sde
/dev/sdf

Data Cartridge #2 (Target)
/dev/sdg
/dev/sdh
/dev/sdi
/dev/sdj

I have tried using...

dd if=/dev/sdc of=/dev/sdg bs=1M
dd if=/dev/sdd of=/dev/sdh bs=1M
dd if=/dev/sde of=/dev/sdi bs=1M
dd if=/dev/sdf of=/dev/sdj bs=1M

But for some reason once its completed, I am not able to see the pool on the Target drive when I run "zpool import". Any thoughts or suggestions on a better process to accomplish what I am trying to do? Any help or pointing me to a resource or something would be helpful. Thanks in advance.
 

snaptec

Guru
Joined
Nov 30, 2015
Messages
502
Why dont mount the Master.
Createthe new zfs Pool and do a zfs send | zfs recv ?


Gesendet von iPhone mit Tapatalk
 

wblock

Documentation Engineer
Joined
Nov 14, 2014
Messages
1,506
Those are Linux device names which would not appear on FreeNAS, but let's ignore that.

Rather than using a low-level binary tool like dd to copy high-level, structured data, use the right tools. Things like unique IDs will be kept, well, unique that way.

gpart's backup and recover tools can copy the partitioning. This is on FreeNAS and FreeBSD. Create the pool on the new drives in the same layout as the original. Then use zfs send and zfs recv to copy the data. This will also likely take less time than copying the whole drive, because it will only copy the blocks in use. It's also safer than dd, which will happily overwrite actual data when the device names are not as suspected.
 
Status
Not open for further replies.
Top