Skip to content

Instantly share code, notes, and snippets.

@mattconnolly
Created August 26, 2014 07:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattconnolly/deda874b2f7259db830d to your computer and use it in GitHub Desktop.
Save mattconnolly/deda874b2f7259db830d to your computer and use it in GitHub Desktop.
Connecting another ZFS pool to do a sync
# The si3124 card doesn't seem to like drives being hot plugged, so manually deactivate the ports
cfgadm -x sata_port_deactivate sata1/0 sata1/1 sata1/2 sata1/3
# enable hot plug service
svcadm enable hotplug
# connect the drives, and:
cfgadm -x sata_port_activate sata1/0 sata1/1 sata1/2 sata1/3
# they should connect and configure automatically now, if not:
cfgadm -c configure sata1/0
cfgadm -c configure sata1/1
cfgadm -c configure sata1/2
cfgadm -c configure sata1/3
# import the target pool in an altroot so that there are no filesystem overlaps:
zpool import -o altroot=/ztank tank
# send the ZFS snapshot
zfs send -v -i zones/iscsi-1@m5 zones/iscsi-1@m6 | zfs recv -Fv tank/iscsi-1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment