Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 31 Mar 2022 01:09:40 +0200
From:      Tomasz CEDRO <tomek@cedro.info>
To:        "Russell L. Carter" <rcarter@pinyon.org>
Cc:        FreeBSD Questions List <questions@freebsd.org>
Subject:   Re: difficulties replacing a ZFS installer zroot pool with a new zroot pool on a new disk
Message-ID:  <CAM8r67CssJ5qTTrxhApFc2hiPUKppUd9N7ALDw-yXf8htsEBRw@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
On Thu, Mar 31, 2022 at 12:48 AM Russell L. Carter wrote:
> I installed the new NVMe SSD drive and I was able to boot the USB
> install image and install a new FreeBSD system on it.  On reboot I
> first tried keeping the old SATA drive as it was.  However the
> motherboard BIOS (CSM enabled, legacy, ASUS Prime X570-PRO) refused
> all of my efforts to set the boot drive to the new SSD.  I finally
> resorted to disconnecting the data cable of the old SATA drive, and
> the new SSD booted fine.  I then powered down the motherboard,
> reattached the old SATA data cable, and booted.  The motherboard again
> refused to boot the new NVMe SSD.  After about an hour of fighting the
> BIOS, I gave up, set the SATA drive as "hot pluggable" in the BIOS,
> and rebooted with the SATA data cable disconnected.  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.
>
> I eventually worked out that I should rename the old pool zroot.old on
> import.  That was also not a happy solution as it continued to
> automatically mount itself on top of the new SSD zroot pool.  I then
> worked out that I need to specify an altroot:

* I had a similar situation.
* I exported old pool and disconnected all old disks.
* I have connected only nvm disk and did clean install on it using
`znvd` in place of `zroot`.
* When new install on a new disk was working fine, power off, connect
old disks, import `zroot`, change mountpoint with `zfs set
mountpoint=/zroot/something zroot/something`.

* Remember not to use different pools with the same name (i.e. `zroot`).
* You can also rename pool of the old disks and name new disk pool to
zroot to avoid boot problems.
* You can use shell from installer drive to manipulate pools easily as
the are not /.

Hope that helps :-)

-- 
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAM8r67CssJ5qTTrxhApFc2hiPUKppUd9N7ALDw-yXf8htsEBRw>