Re: difficulties replacing a ZFS installer zroot pool with a new zroot pool on a new disk
Date: Thu, 31 Mar 2022 00:38:49 UTC
On Thu, Mar 31, 2022 at 1:24 AM Russell L. Carter wrote: > > On 3/30/22 16:09, Tomasz CEDRO wrote: > > 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 :-) > > > > Yeah, the crux of the matter is getting those pools named differently. > I did not notice how to get the new pool renamed during the install, > must be in the partition menu? I am not afraid of the 'for experts' > option but tend to use guided just to be standard. And I haven't had > to fight a BIOS like this instance in a very long time. It's a new > motherboard, new problems, life goes on. > > I am also going to examine carefully what I can do > when dropping to the shell at the end of the install, as you and > David Christensen suggest. You also have LiveCD option aside to Install on the installer boot media. Do not start Install just go to LiveCD and play a bit over there.. it comes very handy when something goes wrong you can boot off the "external" working OS and play with the data on your machine.. also always make a backup before you experiment :-) -- CeDeROM, SQ7MHZ, http://www.tomek.cedro.info