Boot into RescueCD onto receiving machine. Then create GPT partitioning scheme (If a new machine and assuming ad0 is the disk)
gpart create -s gpt ad0
gpart add -t freebsd-boot -s 64K ad0
gpart add -t freebsd-swap -s 2G -l swap0 ad0
gpart add -t freebsd-zfs -l disk0 ad0
gpart bootcode -b /dist/boot/pmbr -p /dist/boot/gptzfsboot -i 1 ad0
Set up ssh keys and copy them over to the sending machine
ssh-keygen -t dsa
cat .ssh/id_dsa.pub|ssh <sending machine> dd of=/root/.ssh/authorized_keys
Load the necessary kernel modules
kldload /dist/boot/kernel/opensolaris.ko
kldload /dist/boot/kernel/zfs.ko
Make snapshots on sending machine
zfs snapshot -r <zpool>@now
Create zpool on receiving machine
zpool create <zpool>
Find out which snapshots to send
zfs list -t snapshot|grep now
Send/Receive snapshots
for fs in <output from above>; do
ssh <sending machine>
zfs send ${fs}|zfs receive -d -F <zpool>
done
Set flags (compression, exec, …). Then set mountpoints.
export LD_LIBRARY_PATH=/dist/usr
zfs unmount -a
zfs set mountpoint=legacy <zpool>
zfs set mountpoint=/tmp <zpool>/tmp
zfs set mountpoint=/usr <zpool>/usr
zfs set mountpoint=/var <zpool>/var
Recent Comments