From owner-freebsd-fs@FreeBSD.ORG Sat Aug 17 19:55:25 2013 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 94312E78 for ; Sat, 17 Aug 2013 19:55:25 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from mail.vx.sk (mail.vx.sk [176.9.45.25]) by mx1.freebsd.org (Postfix) with ESMTP id 52B6828EE for ; Sat, 17 Aug 2013 19:55:24 +0000 (UTC) Received: from core.vx.sk (localhost [127.0.0.2]) by mail.vx.sk (Postfix) with ESMTP id AED233C06B; Sat, 17 Aug 2013 21:55:17 +0200 (CEST) X-Virus-Scanned: amavisd-new at mail.vx.sk Received: from mail.vx.sk by core.vx.sk (amavisd-new, unix socket) with LMTP id qade1iYo-LyM; Sat, 17 Aug 2013 21:55:17 +0200 (CEST) Received: from [192.168.2.103] (dslb-188-102-024-080.pools.arcor-ip.net [188.102.24.80]) by mail.vx.sk (Postfix) with ESMTPSA id 491693C063; Sat, 17 Aug 2013 21:55:17 +0200 (CEST) Message-ID: <520FD524.5070004@FreeBSD.org> Date: Sat, 17 Aug 2013 21:55:16 +0200 From: Martin Matuska User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130803 Thunderbird/17.0.8 MIME-Version: 1.0 To: Zeus Panchenko Subject: Re: what is the "correct" way to "replicate" mem stick with ZFS on it? References: <20130816162532.72259@relay.ibs.dn.ua> In-Reply-To: <20130816162532.72259@relay.ibs.dn.ua> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: FreeBSD Filesystems X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Aug 2013 19:55:25 -0000 Hi Zeus, you can use dd, if the target stick has the same (or larger) size but you have to export the pool first. Other option is to create a ZFS mirror of both sticks, resilver it and then use the "zpool split" subcommand. If you do it this way, the new pool will require a different name, so you have to rename it by reimporting it under the original name (after exporting the original pool). A third working but not that nice way is to create a ZFS mirror, resilver it and export it. Then you may physically separate the devices and load the second one on the other system. Remember, it will always be loaded as a mirror with one missing device, so you have to detach the missing device later. Cheers, mm On 2013-08-16 15:25, Zeus Panchenko wrote: > hi all, > > please, advice > > what is the "correct" way to "replicate" mem stick with ZFS on it? > > what I mean: > > we have mem stick with ZFS pool `mypool' on it > > how to get copy of the mem stick (including the name of the pool)? > > - `zfs send ... | zfs receive ...' ? > > is not what will help untill pool names > on both mem sticks are the same (it is not what I want) > > - to make mirror and to detach second mem stick after resilvering? > > I have bad experience with detaching (perhapse I do it wrong way) > > - dd ? >