More than one matching pool, select pool, HOW?

emsicz

Explorer
Joined
Aug 12, 2021
Messages
78
If I insert a former TrueNAS SSD into the tower and try to boot, TrueNAS gets confused as to which disk to use for it's boot-pool. That's quite expected. It tells me I have to manually tell it which drive to use, also fine. It doesn't tell me how to do that tho. I can't find any documentation on this. How do I tell this thing what to use as boot-pool?

2022-07-29_110009.png
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,700
Disconnect the boot-pool that you don't want to use and then boot.
 

emsicz

Explorer
Joined
Aug 12, 2021
Messages
78
Disconnect the boot-pool that you don't want to use and then boot.
That is not what I am asking, I want to boot from my correct pool and use TrueNAS to wipe the new disks. The console says "manually import" and I'm asking how to do that.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Insert the disk after you booted from your regular pool, then wipe it. Only way that I know. Or use a different system to wipe the disk.
 

emsicz

Explorer
Joined
Aug 12, 2021
Messages
78
I understand that would work, I'm just perplexed the console specifically gives clue - use numeric ID instead, please manually specify boot-pool and nowhere on the net can I find any information on how to proceed from here - clearly there is a way to do it, the developer of this part of the process just felt that they will tell me exactly what to do, but stopped just short of telling me how to do it and didn't even make any documentation for this. I can re-run it's own command, which is /sbin/zpool import -N -f 'boot-pool' with same error output. This tells me there must be a way to make it list all discovered pools with their ID and adapt the above command to mount specific boot-pool by ID, I just don't know how and I can't find any documentation anywhere for this command.

I'll leave this post up here in case someone knows how to do it. Until then I'll have to physically remove drives and format them one by one.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,700
TrueNAS isn't designed for you to do that.

The message you're seeing is a fragment of FreeBSD, which would be useful if you were using a full install of FreeBSD, but you aren't.

TrueNAS is performing tasks that FreeBSD/OpenZFS doesn't know about and those can't be modified without recompiling TrueNAS (which you're entitled to do if you want to engineer your own changes to make it work).

Personally, I would just remove the not-needed boot media first, boot, then add it later to wipe it.
 

emsicz

Explorer
Joined
Aug 12, 2021
Messages
78
I'm not sure how do I add NVME PCIe disks to the system once it has already booted. As far as I know those are not hot plug. Additionally, this guy says he can do it, he just doesn't state how exactly. So clearly there is a path to success here that none of us in this thread know about.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,700
I guess there are 2 options:

1. NVME to USB adapter.

2. Boot to live Linux/FreeBSD from USB and nail the disk from that install.
 

neofusion

Contributor
Joined
Apr 2, 2022
Messages
159
Joined
Oct 22, 2019
Messages
3,641
2. Boot to live Linux/FreeBSD from USB and nail the disk from that install.
Probably the sanest option, without needing to disconnect/reconnect anything.

The one caveat is that you must absolutely make sure you wipe the correct drive. The Linux live USB might present/name the drives in an order different to what you're expecting. Therefor, there's the risk that you might casually wipe the wrong drive with something like "I'm sure that nvme0 is the old boot-pool drive, and nvme1 surely must be the new one..."
 

HoneyBadger

actually does care
Administrator
Moderator
iXsystems
Joined
Feb 6, 2014
Messages
5,112
Probably the sanest option, without needing to disconnect/reconnect anything.
I'm going to go ahead and still say that @emsicz should really, really disconnect the drive(s) they don't want wiped here.

Safety first when it comes to wiping disks from another OS, all it takes is a typo or a slipped finger to cause regret.
 

emsicz

Explorer
Joined
Aug 12, 2021
Messages
78
I'm going to go ahead and still say that @emsicz should really, really disconnect the drive(s) they don't want wiped here.

Safety first when it comes to wiping disks from another OS, all it takes is a typo or a slipped finger to cause regret.
Please stay on topic. For starts, the first recommendation was to wipe the new disk from TrueNAS itself, not from a different OS. Booting from different OS was proposed later, but I never claimed to have taken or that I will take that route. I specifically asked, several times now, how to do what TrueNAS console itself tells me to do - manually mount boot pool during boot. That's literally all that this thread is about.
 

Etorix

Wizard
Joined
Dec 30, 2020
Messages
2,134
It's fine to be stubborn… until gets in the way of understanding useful answers because they are not what you expect.
@sretalla gave a strong clue in post #6: TrueNAS is an appliance. It is not a full fledged FreeBSD/Linux distribution, may not contain all the functions one expects from a full OS, and, most importantly, the user is NOT supposed to interfere with its inner workings.

So TrueNAS expects to boot from a pool named 'boot-pool', assumes that there is one and only one pool with this reserved name and imports the pool by name. You cannot change this behaviour—unless you dig into the boot scripts, which you are not supposed to do, and for which you won't get any help here. You absolutely cannot enter a numeric ID at keyboard at boot time and resume whatever script TrueNAS was running when it threw the errow.
 

emsicz

Explorer
Joined
Aug 12, 2021
Messages
78
It's fine to be stubborn… until gets in the way of understanding useful answers because they are not what you expect.
@sretalla gave a strong clue in post #6: TrueNAS is an appliance. It is not a full fledged FreeBSD/Linux distribution, may not contain all the functions one expects from a full OS, and, most importantly, the user is NOT supposed to interfere with its inner workings.

So TrueNAS expects to boot from a pool named 'boot-pool', assumes that there is one and only one pool with this reserved name and imports the pool by name. You cannot change this behaviour—unless you dig into the boot scripts, which you are not supposed to do, and for which you won't get any help here. You absolutely cannot enter a numeric ID at keyboard at boot time and resume whatever script TrueNAS was running when it threw the errow.
I just want to do what the appliance is telling me to do. If it can't be done and the appliance spits errors that make no sense, or if those errors are thrown by components that the appliance has no control over, those are all valid answers. All I'm saying is I don't need others to presume what is the problem I could be facing and derail the thread based on their assumptions. SCALE is so broken at this point that anyone operating it surely is well capable of removing hardware and wiping disks, that's not what I'm asking. If what I'm asking has no solution and the error is purely generic ZFS error unrelated to the appliance, just say so.

You're saying I can't manually identify the correct boot-pool by ID or name, that's fine, I would refer you to the JIRA post I referenced earlier where a guy stated he's done just that. So maybe I misunderstood what he wrote, but it seems pretty clear.
 

Davvo

MVP
Joined
Jul 12, 2022
Messages
3,222
Wiping the disk from another machine is such a big bad idea? None seems to have suggested it.
btw, I know it has become a matter of principle. I'm just curious.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,700

Davvo

MVP
Joined
Jul 12, 2022
Messages
3,222

emsicz

Explorer
Joined
Aug 12, 2021
Messages
78
Chiming back to this thread - I noticed the linked JIRA has more comments but those are hidden by default. They reference this thread where users reported how to manually import pools by their ID during boot sequence:

Code:
zpool import -a -d /dev/disk/by-id


TrueNAS isn't designed for you to do that.
It's fine to be stubborn… until gets in the way of understanding useful answers because they are not what you expect.
You two might be interested in knowing that this totally works. If you manually mount the boot pool when the appliance prompts you to do just that in a way the appliance expects you to (without telling you so) and then exit, the boot sequence continues as normal and TrueNAS starts just fine.
 

neofusion

Contributor
Joined
Apr 2, 2022
Messages
159
Chiming back to this thread - I noticed the linked JIRA has more comments but those are hidden by default. They reference this thread where users reported how to manually import pools by their ID during boot sequence:

Code:
zpool import -a -d /dev/disk/by-id




You two might be interested in knowing that this totally works. If you manually mount the boot pool when the appliance prompts you to do just that in a way the appliance expects you to (without telling you so) and then exit, the boot sequence continues as normal and TrueNAS starts just fine.
Thanks for returning with a suggestion.
Since I posted a variant solution that I had not been able to test myself, does that mean you tested it and it doesn't work?
 

emsicz

Explorer
Joined
Aug 12, 2021
Messages
78
Thanks for returning with a suggestion.
Since I posted a variant solution that I had not been able to test myself, does that mean you tested it and it doesn't work?
Apologies, I didn't see your post. I compared the page you linked and it probably would've worked also, since it explains how to list IDs and how to import a pool by ID. This was totally what I was looking for, but somehow I completely missed your submission.
 
Top