From owner-freebsd-current@FreeBSD.ORG Sun Jul 8 00:23:21 2007 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E67C916A400 for ; Sun, 8 Jul 2007 00:23:21 +0000 (UTC) (envelope-from ticso@cicely12.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) by mx1.freebsd.org (Postfix) with ESMTP id 614EC13C480 for ; Sun, 8 Jul 2007 00:23:20 +0000 (UTC) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de ([10.1.1.7]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id l680NJB9019370; Sun, 8 Jul 2007 02:23:19 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (cicely12.cicely.de [10.1.1.14]) by cicely5.cicely.de (8.13.4/8.13.4) with ESMTP id l680NDm2000483 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 8 Jul 2007 02:23:13 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.13.4/8.13.3) with ESMTP id l680NDeZ083275; Sun, 8 Jul 2007 02:23:13 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.13.4/8.13.3/Submit) id l680NCuH083274; Sun, 8 Jul 2007 02:23:12 +0200 (CEST) (envelope-from ticso) Date: Sun, 8 Jul 2007 02:23:12 +0200 From: Bernd Walter To: Volker Message-ID: <20070708002312.GC82285@cicely12.cicely.de> References: <469014E9.5050906@vwsoft.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <469014E9.5050906@vwsoft.com> X-Operating-System: FreeBSD cicely12.cicely.de 5.4-STABLE alpha User-Agent: Mutt/1.5.9i X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED=-1.8, BAYES_00=-2.599 autolearn=ham version=3.1.7 X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on cicely12.cicely.de Cc: current@freebsd.org Subject: Re: moving a zfs pool X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jul 2007 00:23:22 -0000 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@bwct.de info@bwct.de support@fizon.de