Re: moving a zfs pool

From: Bernd Walter <ticso_at_cicely12.cicely.de>
Date: Sun, 8 Jul 2007 02:23:12 +0200
On Sun, Jul 08, 2007 at 12:34:17AM +0200, Volker wrote:
> Hi,
> 
> this is more likely currently a theoretical question: How does one
> move a zfs pool from one machine to another?

on old machine: zpool export foo
attach disks to new machine
on new machine: zpool import foo

You can also do zpool import without parameter to list pools available
to import.
You need to "zpool import -f foo" on the new machine to force the
import in case you hadn't exported it on the old machine.

> I've done that in the past a lot with ufs filesystems by piping a dump
> through an ssh session and restoring on another machine just to move
> data to another system. This should also work on a per filesystem
> basis when using zfs but isn't there a way to move the whole pool to
> another machine (w/o physically moving the hard disk)?
> 
> This would be the case when migrating a machine or migrating hard
> disks. The zfs export feature doesn't look promising for this or do I
> misread some bits? Please don't tell me, 42 is the answer... ;)

You misread :)

> I'm missing something I would call 'zpool dump' and 'zpool restore'.

There is none :(
But you can zfs send/receive at filesystem/volume level.
It seems that you can trust the zfs list order on snapshots when
copying multiple/all snapshots.
Unfortunately things become more complex if you want to save clone
data - especially to keep common stored blocks - as well.

-- 
B.Walter                http://www.bwct.de      http://www.fizon.de
bernd_at_bwct.de           info_at_bwct.de            support_at_fizon.de
Received on Sat Jul 07 2007 - 22:23:21 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:13 UTC