From owner-freebsd-questions@FreeBSD.ORG Wed Dec 19 13:01:41 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CDBE54A2 for ; Wed, 19 Dec 2012 13:01:41 +0000 (UTC) (envelope-from cjr@cruwe.de) Received: from wp376.webpack.hosteurope.de (wp376.webpack.hosteurope.de [IPv6:2a01:488:42::50ed:8591]) by mx1.freebsd.org (Postfix) with ESMTP id 602038FC14 for ; Wed, 19 Dec 2012 13:01:41 +0000 (UTC) Received: from p5b37a6fb.dip.t-dialin.net ([91.55.166.251] helo=dijkstra); authenticated by wp376.webpack.hosteurope.de running ExIM with esmtpsa (SSL3.0:DHE_RSA_AES_128_CBC_SHA1:16) id 1TlJHH-0001UU-O1; Wed, 19 Dec 2012 14:01:39 +0100 Date: Wed, 19 Dec 2012 14:01:37 +0100 From: "Christopher J. Ruwe" To: freebsd-questions@freebsd.org Subject: Re: Curious question about using zfs send -R and receive on FreeBSD Message-ID: <20121219140137.4673f395@dijkstra> In-Reply-To: <2930c477429212255788f1a2c90aa202@dweimer.net> References: <2930c477429212255788f1a2c90aa202@dweimer.net> X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.6; amd64-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-bounce-key: webpack.hosteurope.de;cjr@cruwe.de;1355922101;b9649c2f; X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Dec 2012 13:01:41 -0000 On Mon, 17 Dec 2012 16:00:06 -0600 dweimer wrote: > I recently migrated a machine that was built on a VM to physical > hardware using the zfs send -R option against a snapshot of its root > zfs setup. I went from smaller drives to larger, both using a > mirrored zpool. However the devices were different, the device IDs > on the VM were da0 and da1, the device IDs on the physical hardware > were ada0 and ada1. I had used labels when creating the gpt layout > to plan for this. And all worked great, in fact it was the fastest I > have ever converted a virtual machine to a physical machine. > After I finished though, I got curious, was it actually necessary > for me to mount the new boot zfs partition while running on the live > cd and copy the zpool.cache file I had created when creating the > zpool or would have the existing cache file that would have been > included in the zfs send contained the right information? As the > zpool was pointed at the gpt label devices, or was the fact that the > size changed enough difference that copying the file was indeed > necessary? > I fear you might be mixing things up here. You did a zfs-migrate, not a zpool-migrate, you created a new zpool and received the datasets on that new zpool, even if the zpool names were the same. The function of zpool.cache is to tell the OS about available device-zpool combinations. Without, the OS does not know which zpools are available and accordingly cannot mount the root-ZFS passed in the vfs.root.mountfrom directive in loader.conf, which is why you needed to copy the zpool.cache and, if you changed the zpool-names, needed to adapt loader.conf. There are plans to change this behaviour, as it is deemed superfluous at least in the case of disks, but I do not know how much that has progressed so far. http://lists.freebsd.org/pipermail/freebsd-fs/2012-October/015328.html Hope I could shed some light on that issue, although I am by no means an expert on this. Cheers, -- Christopher TZ: GMT + 2h GnuPG/GPG: 0xE8DE2C14 Punctuation matters: "Let's eat Grandma" or "Let's eat, Grandma" - Punctuation saves lives. "A panda eats shoots and leaves" or "A panda eats, shoots, and leaves" - Punctuation teaches proper biology.