Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Mar 2022 18:56:43 -1000
From:      "parv/FreeBSD" <parv.0zero9+freebsd@gmail.com>
To:        "Russell L. Carter" <rcarter@pinyon.org>
Cc:        questions@freebsd.org
Subject:   Re: difficulties replacing a ZFS installer zroot pool with a new zroot pool on a new disk
Message-ID:  <CABObuOoS_GFTV_=necAJ6hPiqr3K1o%2BxJBu=3GnS3DbD9ocrJg@mail.gmail.com>
In-Reply-To: <c69c61b5-726c-4058-564f-6c541f50bba2@pinyon.org>
References:  <899c1dd2-30f5-5e3d-f4bb-91d29011c8be@pinyon.org> <d72c2328-86b2-0c55-7069-ece31cc07a3e@holgerdanske.com> <c69c61b5-726c-4058-564f-6c541f50bba2@pinyon.org>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
On Wed, Mar 30, 2022 at 12:47 PM Russell L. Carter wrote:
...

> Once the NVMe SSD
> was booted, I reattached the SATA data cable and it showed up in the
> 'zpool import' list.  'zpool import zroot' was not a happy solution as
> it collided with the new SSD zroot pool.
>

Unsurprising, expected.



> I eventually worked out that I should rename the old pool zroot.old on
> import.


To rename a pool (semi-permanently), import it with a second name which
answers your query in (4) at the end your email ...

  # zpool import <existing pool name> <new pool name>

... which you had mentioned yourself in (2).


...

> I would submit that

...

> having the old SSD zroot.orig
> automatically import and mount everything, but not automatically
> import and mount everything when set given an altroot, is confusing.
> I would add that manually performing
>
> zfs mount zroot.old/ROOT/default
>
> (but not, say zfs unmount zroot.old/usr; zfs mount zroot.old/src)
>
.               ^ ^ ^ ^ ^
Is that "unmount" supposed to be "mount"?


mount everything I was missing, is also confusing and unintuitive.
>

Is this case not already covered by your assertion that given "altroot",
auto-mount of datasets did not happen on pool import?



> I have two more ZFS system pools to upgrade to SSDs.  I am going to
> try the following procedure:
>
> 1) unplug the old SATA drive and install FreeBSD to the new SSD.
>
> 2) shutdown,  reattach old drive, reboot
>     If the new drive boots (instead of the old drive), I boot
>     to single user.  I then try
>
>     zpool import -o altroot /mnt/zrool.old  zroot zroot.old
>

> 3) If that works, I try:
>
>     zfs mount zpool.old/ROOT/default
>
> 4) If it doesn't work, I'll probably have to zpool export the pool and
>     iterate.
>


How would you "iterate"?


- parv



>   I forget exactly how I got the old pool renamed in the
>   above.
>
...

[-- Attachment #2 --]
<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-family:monospace">On Wed, Mar 30, 2022 at 12:47 PM Russell L. Carter wrote:<br></div></div><div class="gmail_quote"><div><div style="font-family:monospace" class="gmail_default"></div><div><span class="gmail_default" style="font-family:monospace">...</span> </div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Once the NVMe SSD<br>
was booted, I reattached the SATA data cable and it showed up in the<br>
&#39;zpool import&#39; list.  &#39;zpool import zroot&#39; was not a happy solution as<br>
it collided with the new SSD zroot pool.<br></blockquote><div><br></div><div><div style="font-family:monospace" class="gmail_default">Unsurprising, expected.</div><div style="font-family:monospace" class="gmail_default"><br></div></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
I eventually worked out that I should rename the old pool zroot.old on<br>
import.</blockquote><div><br></div><div><div style="font-family:monospace" class="gmail_default">To rename a pool (semi-permanently), import it with a second name which</div><div style="font-family:monospace" class="gmail_default">answers your query in (4) at the end your email ...</div><div style="font-family:monospace" class="gmail_default"><br></div><div class="gmail_quote">  # zpool import &lt;existing pool name&gt; &lt;new pool name&gt;</div><div class="gmail_quote"><span class="gmail_default" style="font-family:monospace"></span></div><div class="gmail_quote"><span class="gmail_default" style="font-family:monospace"><br></span></div><div class="gmail_quote"><span class="gmail_default" style="font-family:monospace">... which you had mentioned yourself in (2).<br></span></div><div class="gmail_quote"><span class="gmail_default" style="font-family:monospace"><br></span></div><div class="gmail_quote"><span class="gmail_default" style="font-family:monospace"><br></span></div><div class="gmail_quote"><div style="font-family:monospace" class="gmail_default">...</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
I would submit that</blockquote><div><span class="gmail_default" style="font-family:monospace">...</span> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">having the old SSD zroot.orig<br>
automatically import and mount everything, but not automatically<br>
import and mount everything when set given an altroot, is confusing.<br>
I would add that manually performing<br>
<br>
zfs mount zroot.old/ROOT/default<br>
<br>
(but not, say zfs unmount zroot.old/usr; zfs mount zroot.old/src)<br></blockquote><div><div style="font-family:monospace" class="gmail_default">.               ^ ^ ^ ^ ^</div><div style="font-family:monospace" class="gmail_default">Is that &quot;unmount&quot; supposed to be &quot;mount&quot;?</div></div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
mount everything I was missing, is also confusing and unintuitive.<br></blockquote><div><br></div><div style="font-family:monospace" class="gmail_default">Is this case not already covered by your assertion that given &quot;altroot&quot;,</div><div style="font-family:monospace" class="gmail_default">auto-mount of datasets did not happen on pool import?</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
I have two more ZFS system pools to upgrade to SSDs.  I am going to<br>
try the following procedure:<br>
<br>
1) unplug the old SATA drive and install FreeBSD to the new SSD.<br>
<br>
2) shutdown,  reattach old drive, reboot<br>
    If the new drive boots (instead of the old drive), I boot<br>
    to single user.  I then try<br>
<br>
    zpool import -o altroot /mnt/zrool.old  zroot zroot.ol<span class="gmail_default" style="font-family:monospace">d</span><br></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
3) If that works, I try:<br>
<br>
    zfs mount zpool.old/ROOT/default<br>
<br>
4) If it doesn&#39;t work, I&#39;ll probably have to zpool export the pool and<br>
    iterate.<br></blockquote><div><br></div><div><br></div><div>How would you &quot;iterate&quot;?</div><div><div style="font-family:monospace" class="gmail_default"><br></div><div style="font-family:monospace" class="gmail_default"><br></div><div style="font-family:monospace" class="gmail_default">- parv</div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">  I forget exactly how I got the old pool renamed in the<br>
  above.<br></blockquote><div><span class="gmail_default" style="font-family:monospace">...</span></div><div><span class="gmail_default" style="font-family:monospace"><br></span></div><div><span class="gmail_default" style="font-family:monospace"></span></div></div></div></div></div>
help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CABObuOoS_GFTV_=necAJ6hPiqr3K1o%2BxJBu=3GnS3DbD9ocrJg>