From owner-freebsd-fs@FreeBSD.ORG Sun Aug 18 19:39:44 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 51546A44 for ; Sun, 18 Aug 2013 19:39:44 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from anubis.delphij.net (anubis.delphij.net [IPv6:2001:470:1:117::25]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2967428A6 for ; Sun, 18 Aug 2013 19:39:44 +0000 (UTC) Received: from delphij-macbook.local (c-67-188-85-47.hsd1.ca.comcast.net [67.188.85.47]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by anubis.delphij.net (Postfix) with ESMTPSA id AC272DC4F; Sun, 18 Aug 2013 12:39:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=delphij.net; s=anubis; t=1376854783; bh=Oz1K1e3m3OPo8Fx38nc3J8iYGLJT0Z/7R+pRXbSbLyI=; h=Date:From:Reply-To:To:CC:Subject:References:In-Reply-To; b=LsUhN9fk5KoTZ+u+BTYGZMHNdY0pqSiHSq9TE9zKlMmO6H62x6GxeFYyChUv6ZFvG zM/RvsaJNHDcS5JpITTqXPcqru7zUCaQW6HzdyKHMFUHa9lPDOUem6ro7Ufk6V041F iPXfhcmM98zQ4MlKJUTBj55N9zPxEbBMFMqNTEsA= Message-ID: <52112303.8030106@delphij.net> Date: Sun, 18 Aug 2013 12:39:47 -0700 From: Xin Li Organization: The FreeBSD Project 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> X-Enigmail-Version: 1.5.2 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 Reply-To: d@delphij.net List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Aug 2013 19:39:44 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Hi, On 8/16/13 6:25 AM, 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) Not if you save your initial copy a master file (zfs send ... > master_snapshot) then populate it to a pool after detaching your first pool (cat master_snapshot | zfs receive ...). This approach can be used as a way of mass production and can be easily scripted. The benefit of using snapshot is that you don't have to detach your zfs pool or have some way to block its writes before copying (with dd or recoverdisk, you _should_ do it to prevent accidentally making an inconsistent image) and since you have a new pool, you don't need to do reguid which is normally needed if dd/recoverdisk is used. Cheers, -----BEGIN PGP SIGNATURE----- iQEcBAEBCAAGBQJSESMDAAoJEG80Jeu8UPuz9KgH/AnLCC9hJiVT1GfoahMcddw1 o3IrkbUZwCtuLazWHtLRlenELRwlCENgPaMRBaqRof/hnNKqz5krJqn47xk/ge0Y n7s0LgMomdAxETlYH4vgbLIXVlY3gDc4fi3GTaO3fBdjow6Ed7m031kFWEFPcRvE aXncU6VwFSc+tUXXEPwoyJ0BQL+Nh72mrKnvLny2xs9J7ij+nK0VoFmOpx27E0Wd YsPC/Kr+eQWvBcYpGna0EKW85d2NG+7GLsP2wbtoaU4aTkg69BjhqtrhSx73iVMH xwmF+rvXMgOBVIleHgBoy3Yv+noEHZReNpYzdAOejEgD9IFBaBz0PaJksMFfAHM= =t8nH -----END PGP SIGNATURE-----