Boot with Live CD FreeBSD on thirst host, when we migrate a pool.

Setup network.

# ifconfig vtnet0 add 10.0.0.191 netmask 255.255.255.0 # route add default 10.0.0.176


Load unionfs.

# mkdir /tmp/etc # mount_unionfs /tmp/etc /etc

Edit config sshd.

# vi /etc/ssh/sshd_config

 

PermitRootLogin yes

 

# service sshd onestart

Create simple password for one time connect ssh.

# passwd Password

List disks.

# sysctl -a | grep disk

See gpt table.

# gpart show

If exists, delete it.

# gpart destroy -F vtbd0

Create new gpt table and make disk allocation.

# gpart create -s gpt vtbd0 # gpart add -t freebsd-boot -s 512 vtbd0 # gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 vtbd0 # gpart add -t freebsd-swap -s 1G vtbd0 # gpart add -t freebsd-zfs vtbd0

Create pool example2.

# zpool create -m /mnt example2 /dev/vtbd0p3

Go to second host, from wich we will migrate pool.
Create snaphot of pool.

# zfs snapshot -r example@23-03-2017

List snaphots.

# zfs list -t snaphot

Migrate snapshot to first host.

# zfs send -R example@23-03-2017 | ssh 10.0.0.191 zfs receive -vFd example2

Restart thirst host and boot with Live CD FreeBSD again.

# reboot

Load pool.

# zpool import -f example2

List pool and partitions.

# zpool list # df -h

Change hostname and ip address at /mnt/etc/rc.conf

Poweroff first host, eject Live CD, and start it.

Check partitions.

# df -h