From nobody Wed Mar 30 02:12:24 2022 X-Original-To: questions@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id C914F1A44CC7 for <questions@mlmmj.nyi.freebsd.org>; Wed, 30 Mar 2022 02:12:44 +0000 (UTC) (envelope-from dpchrist@holgerdanske.com) Received: from holgerdanske.com (holgerdanske.com [184.105.128.27]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "holgerdanske.com", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KSqhW6Nznz3Jh7 for <questions@freebsd.org>; Wed, 30 Mar 2022 02:12:43 +0000 (UTC) (envelope-from dpchrist@holgerdanske.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=holgerdanske.com; s=nov-20210719-112354; t=1648606356; bh=hzR4w40EmRaM2NRxprWbBsjo6maGmcYZHr8JMZDM+Bc=; h=Received:Message-ID:Date:MIME-Version:User-Agent:Subject: Content-Language:To:References:From:In-Reply-To:Content-Type: Content-Transfer-Encoding; b=K+ptVdm7ph4sOhwAb7O/dbGVA5lZiED9+/rax4Ev2bPWQowzPHIAHne/4jYw/p5Ok yZLPUNjNWUozbox8JcYQExOoIMnxUrYebB/1dvCYTbxMtkbkyowaVZhmeq6s+oBRyw mHG+bCpBvNo1bjhMERVqdR6VDJREJDlrvbxtPUytFJG4FAruc5efnkltpWiPDmBHCm kORX+o7nWvNsS8DlIisPV5P//jQ2KfENy0lD7RJmAr1Kls6hQxwYRlhz1upKIgVD9v X9Mdf6nlPSr4T5SuBDWD7VaHj/acNkU3gvJzrPwB+dGknx/zZRO6/qfJfyWvZ+SJqK iioDWk/jzeQ/v51+B+Gjaq4anJRTliZ+86+5FTTQxczhdJzZR2xXzxl6hQru7rjVJ/ IuJh4zbdY0hnJfLd5neBa9M8OZu9ng+187kjjjMeTUxDIdf/OC5VLrkF8BBzTYrbed e8pvWJ8GtBb+AZu4SrjLvukSFc0cmMMfynVfWZUzwPOIW1YOB1afSzHa/ww1yirSfM kwhYMlk518wq9ekU4jReGL0VP4ukXpr+u6Ma9jACtZlRF+ci3U9GOpDdnXRVk6KmDH llygJHeL+Wue2HjNpfFudGUQLiTgrSM6v1zeZ9RiP2jXbwTqM0XjWXK451mCVRQmi8 lmgqevO2fdvnFknraucLYUsw= Received: from 99.100.19.101 (99-100-19-101.lightspeed.frokca.sbcglobal.net [99.100.19.101]) by holgerdanske.com with ESMTPSA (TLS_AES_128_GCM_SHA256:TLSv1.3:Kx=any:Au=any:Enc=AESGCM(128):Mac=AEAD) (SMTP-AUTH username dpchrist@holgerdanske.com, mechanism PLAIN) for <questions@freebsd.org>; Tue, 29 Mar 2022 19:12:36 -0700 Message-ID: <d72c2328-86b2-0c55-7069-ece31cc07a3e@holgerdanske.com> Date: Tue, 29 Mar 2022 19:12:24 -0700 List-Id: User questions <freebsd-questions.freebsd.org> List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: <mailto:questions+help@freebsd.org> List-Post: <mailto:questions@freebsd.org> List-Subscribe: <mailto:questions+subscribe@freebsd.org> List-Unsubscribe: <mailto:questions+unsubscribe@freebsd.org> Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: difficulties replacing a ZFS installer zroot pool with a new zroot pool on a new disk Content-Language: en-US To: questions@freebsd.org References: <899c1dd2-30f5-5e3d-f4bb-91d29011c8be@pinyon.org> From: David Christensen <dpchrist@holgerdanske.com> In-Reply-To: <899c1dd2-30f5-5e3d-f4bb-91d29011c8be@pinyon.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4KSqhW6Nznz3Jh7 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=holgerdanske.com header.s=nov-20210719-112354 header.b=K+ptVdm7; dmarc=pass (policy=none) header.from=holgerdanske.com; spf=pass (mx1.freebsd.org: domain of dpchrist@holgerdanske.com designates 184.105.128.27 as permitted sender) smtp.mailfrom=dpchrist@holgerdanske.com X-Spamd-Result: default: False [-3.98 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[holgerdanske.com:s=nov-20210719-112354]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_SPF_ALLOW(-0.20)[+a]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[questions@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-0.98)[-0.984]; DKIM_TRACE(0.00)[holgerdanske.com:+]; DMARC_POLICY_ALLOW(-0.50)[holgerdanske.com,none]; NEURAL_HAM_SHORT(-1.00)[-1.000]; MLMMJ_DEST(0.00)[questions]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:6939, ipnet:184.104.0.0/15, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-ThisMailContainsUnwantedMimeParts: N On 3/29/22 16:16, Russell L. Carter wrote: > Greetings, > After many hours, I am stuck trying to replace my spinning rust > drive with a new SSD. > > Basically I have renamed the old drive pool 'zroot.old' and imported > it so that it mounts to /mnt/zroot2: > > root@bruno> zfs list | grep zroot.old > zroot.old                                      89.6G  523G      96K > /mnt/zroot2/mnt/zroot.old > zroot.old/ROOT                                 37.6G  523G      96K > none > zroot.old/ROOT/default                         37.6G  523G    37.6G > /mnt/zroot2 > zroot.old/export                                264K  523G      88K > /mnt/zroot2/mnt/zroot.old/export > zroot.old/export/packages                       176K  523G      88K > /mnt/zroot2/mnt/zroot.old/export/packages > zroot.old/export/packages/stable-amd64-default   88K  523G      88K > /mnt/zroot2/mnt/zroot.old/export/packages/stable-amd64-default > zroot.old/tmp                                   144K  523G     144K > /mnt/zroot2/tmp > zroot.old/usr                                  37.8G  523G      96K > /mnt/zroot2/usr > zroot.old/usr/home                              582M  523G     582M > /mnt/zroot2/usr/home > zroot.old/usr/obj                              6.14G  523G    6.14G > /mnt/zroot2/usr/obj > zroot.old/usr/ports                            27.8G  523G    27.8G > /mnt/zroot2/usr/ports > zroot.old/usr/src                              3.27G  523G    3.27G > /mnt/zroot2/usr/src > zroot.old/var                                  1.89M  523G      96K > /mnt/zroot2/var > zroot.old/var/audit                              96K  523G      96K > /mnt/zroot2/var/audit > zroot.old/var/crash                              96K  523G      96K > /mnt/zroot2/var/crash > zroot.old/var/log                              1.32M  523G    1.32M > /mnt/zroot2/var/log > zroot.old/var/mail                              120K  523G     120K > /mnt/zroot2/var/mail > zroot.old/var/tmp                               176K  523G     176K > /mnt/zroot2/var/tmp > zroot.old/vm                                   14.1G  523G     615M > /mnt/zroot2/vm > zroot.old/vm/debianv9base                      3.79G  523G     120K > /mnt/zroot2/vm/debianv9base > zroot.old/vm/debianv9base/disk0                3.79G  523G    3.57G - > zroot.old/vm/debianv9n2                        9.70G  523G     160K > /mnt/zroot2/vm/debianv9n2 > zroot.old/vm/debianv9n2/disk0                  9.70G  523G    11.3G - > root@bruno> zfs mount -a > root@bruno> > > The problem is that /mnt/zroot2/usr/home, /mnt/zroot2/usr, > /mnt/zroot2/usr/src are all empty: > > root@bruno> ls /mnt/zroot.old/usr > root@bruno> > > Even though I can look at the individual datasets and theey're > still using the same amount data as original. This is a bit > unhelpful for migrating over the old configuration. > > The oddball mounting is just the result of several 10s of attempts to > import and mount so that a) the original zroot pool doesn't clobber the > new one, and b) attempts to make the datasets visible. > > So can someone enlighten me on the proper way to do this, and possibly > give a hint how I can get those original datasets visible?  This is > definitely a new wrinkle for a geezer who has been doing such things > without (nontrivial) problems for 30 years now. > > Yeah yeah, this is also my backup drive and I should have replicated > infra over to another system... I'm a gonna do that next. > > Thanks very much, > Russell I recall attempting to install two ZFS FreeBSD OS disks in the same machine at the same time, and the results were very confusing. I suggest that you install only one ZFS FreeBSD OS disk at any given time. If you need to work on the FreeBSD OS disk without booting it, I would boot FreeBSD installer media and use the live system/ shell to access the ZFS pools and datasets. I expect that you will want to set the "altroot" property when you import any pools. I am unclear if you will need to export the ZFS boot pool ("bootpool") or the ZFS root pool ("zroot.old"?) if you import them (?). If the HDD and SSD both have the same interface (e.g. SAS or SATA), if the SSD is the same size or larger than the HDD, and if you can revert your changes to the HDD so that it is a working FreeBSD instance again, you should be able to use a live distribution to clone the HDD to the SSD using dd(1), power down, remove the HDD and live media, connect the SSD to the interface port the HDD was connected to, and boot the SSD. I would use a Linux live distribution without ZFS support, to ensure that the live distribution does not interact with any ZFS content on the HDD or SSD before or after the clone. David