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>

next in thread | previous in thread | raw e-mail | index | archive | help
--000000000000f80f0205db7c8746
Content-Type: text/plain; charset="UTF-8"

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.
>
...

--000000000000f80f0205db7c8746
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><div class=3D"gmail_default" style=3D"fon=
t-family:monospace">On Wed, Mar 30, 2022 at 12:47 PM Russell L. Carter wrot=
e:<br></div></div><div class=3D"gmail_quote"><div><div style=3D"font-family=
:monospace" class=3D"gmail_default"></div><div><span class=3D"gmail_default=
" style=3D"font-family:monospace">...</span>=C2=A0</div></div><blockquote c=
lass=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px soli=
d 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.=C2=A0 &#39;zpool import zroot&#39; was not a h=
appy solution as<br>
it collided with the new SSD zroot pool.<br></blockquote><div><br></div><di=
v><div style=3D"font-family:monospace" class=3D"gmail_default">Unsurprising=
, expected.</div><div style=3D"font-family:monospace" class=3D"gmail_defaul=
t"><br></div></div><div>=C2=A0</div><blockquote class=3D"gmail_quote" style=
=3D"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=3D"font-family:monospace=
" class=3D"gmail_default">To rename a pool (semi-permanently), import it wi=
th a second name which</div><div style=3D"font-family:monospace" class=3D"g=
mail_default">answers your query in (4) at the end your email ...</div><div=
 style=3D"font-family:monospace" class=3D"gmail_default"><br></div><div cla=
ss=3D"gmail_quote">=C2=A0 # zpool import &lt;existing pool name&gt; &lt;new=
 pool name&gt;</div><div class=3D"gmail_quote"><span class=3D"gmail_default=
" style=3D"font-family:monospace"></span></div><div class=3D"gmail_quote"><=
span class=3D"gmail_default" style=3D"font-family:monospace"><br></span></d=
iv><div class=3D"gmail_quote"><span class=3D"gmail_default" style=3D"font-f=
amily:monospace">... which you had mentioned yourself in (2).<br></span></d=
iv><div class=3D"gmail_quote"><span class=3D"gmail_default" style=3D"font-f=
amily:monospace"><br></span></div><div class=3D"gmail_quote"><span class=3D=
"gmail_default" style=3D"font-family:monospace"><br></span></div><div class=
=3D"gmail_quote"><div style=3D"font-family:monospace" class=3D"gmail_defaul=
t">...</div><blockquote class=3D"gmail_quote" style=3D"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=3D"gmail_default" style=3D=
"font-family:monospace">...</span>=C2=A0</div><blockquote class=3D"gmail_qu=
ote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,20=
4);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></bloc=
kquote><div><div style=3D"font-family:monospace" class=3D"gmail_default">.=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0 ^ ^ ^ ^ ^</div><div style=3D"font-family:monospace" class=3D"gmai=
l_default">Is that &quot;unmount&quot; supposed to be &quot;mount&quot;?</d=
iv></div><div><br></div><div><br></div><blockquote class=3D"gmail_quote" st=
yle=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padd=
ing-left:1ex">
mount everything I was missing, is also confusing and unintuitive.<br></blo=
ckquote><div><br></div><div style=3D"font-family:monospace" class=3D"gmail_=
default">Is this case not already covered by your assertion that given &quo=
t;altroot&quot;,</div><div style=3D"font-family:monospace" class=3D"gmail_d=
efault">auto-mount of datasets did not happen on pool import?</div><div><br=
></div><div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0=
px 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.=C2=A0 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,=C2=A0 reattach old drive, reboot<br>
=C2=A0 =C2=A0 If the new drive boots (instead of the old drive), I boot<br>
=C2=A0 =C2=A0 to single user.=C2=A0 I then try<br>
<br>
=C2=A0 =C2=A0 zpool import -o altroot /mnt/zrool.old=C2=A0 zroot zroot.ol<s=
pan class=3D"gmail_default" style=3D"font-family:monospace">d</span><br></b=
lockquote><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8=
ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
3) If that works, I try:<br>
<br>
=C2=A0 =C2=A0 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>
=C2=A0 =C2=A0 iterate.<br></blockquote><div><br></div><div><br></div><div>H=
ow would you &quot;iterate&quot;?</div><div><div style=3D"font-family:monos=
pace" class=3D"gmail_default"><br></div><div style=3D"font-family:monospace=
" class=3D"gmail_default"><br></div><div style=3D"font-family:monospace" cl=
ass=3D"gmail_default">- parv</div><br></div><div>=C2=A0</div><blockquote cl=
ass=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid=
 rgb(204,204,204);padding-left:1ex">=C2=A0 I forget exactly how I got the o=
ld pool renamed in the<br>
=C2=A0 above.<br></blockquote><div><span class=3D"gmail_default" style=3D"f=
ont-family:monospace">...</span></div><div><span class=3D"gmail_default" st=
yle=3D"font-family:monospace"><br></span></div><div><span class=3D"gmail_de=
fault" style=3D"font-family:monospace"></span></div></div></div></div></div=
>

--000000000000f80f0205db7c8746--



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