Boot from M2

Lorne

Dabbler
Joined
Mar 4, 2022
Messages
10
I currently run TrueNAS from a USB thumb drive with 8HDD's in 7 pools (1 pool has 2x1Tb drives setup as a 2Tb pool using disks ada2 and ada7). I have a spare 128Gb M2 drive from an old laptop which I would like to use as the boot device (I am assuming it would load much faster that the USB) but when I install it TrueNAss assigns it as ada2 which forces the 2Tb pool offline. Is there a simple solution to make TrueNAS assign the M2 as ada8 (the 8 existing disks are ada0-7) ?

Also am I right thinking that the M" will boot faster ?

NB: Do not complain about a striped setup - it is a backup of another pool which is a single 2Tb disk.
 
Joined
Dec 29, 2014
Messages
1,135
What drive number TN assigns to it doesn't matter. You will need to install the appropriate version on the M2 drive and then restore your config file. Your system BIOS is where you will assign boot preference to get it to boot from your M2 drive.
 

Lorne

Dabbler
Joined
Mar 4, 2022
Messages
10
My problem is not getting it to boot from the M2 which I can do in the BIOS, my problem is that the disk it is booting from is assigned ada2 and the disk that was previously assigned ada2 and was part of a pool has been reassigned as ada8 which causes the pool that included ada2 to become inaccessible.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
Also am I right thinking that the M" will boot faster ?

Than what? A USB thumb drive? Probably. The size suggests that it is an older M.2, the use case suggests probably SATA. You can pull up specs for the model number off the Internet.

My problem is not getting it to boot from the M2 which I can do in the BIOS, my problem is that the disk it is booting from is assigned ada2 and the disk that was previously assigned ada2 and was part of a pool has been reassigned as ada8 which causes the pool that included ada2 to become inaccessible.

That's a strange problem to have. Did you create this by hand from the CLI or something weird like that? If so, it sounds like you did it wrong. TrueNAS is expecting the device list for the pool to be comprised of GPT device names, like

Code:
  pool: storage1
 state: ONLINE
status: Some supported features are not enabled on the pool. The pool can
        still be used, but some features are unavailable.
action: Enable all features using 'zpool upgrade'. Once this is done,
        the pool may no longer be accessible by software that does not support
        the features. See zpool-features(5) for details.
  scan: scrub repaired 0B in 2 days 05:39:43 with 0 errors on Tue Oct  4 03:39:46 2022
config:

        NAME                                            STATE     READ WRITE CKSUM
        storage1                                        ONLINE       0     0     0
          raidz3-0                                      ONLINE       0     0     0
            gptid/f965fb05-2dfa-11eb-bff5-005056b36e9d  ONLINE       0     0     0
            gptid/7c725543-2dfc-11eb-bff5-005056b36e9d  ONLINE       0     0     0
            gptid/a26f92b5-2dff-11eb-bff5-005056b36e9d  ONLINE       0     0     0
            gptid/3482d896-2e01-11eb-bff5-005056b36e9d  ONLINE       0     0     0
            gptid/4a921ee1-2e02-11eb-bff5-005056b36e9d  ONLINE       0     0     0
            gptid/0c120294-2f69-11eb-bff5-005056b36e9d  ONLINE       0     0     0
            gptid/10df354f-2f63-11eb-bff5-005056b36e9d  ONLINE       0     0     0
            gptid/607dee67-2f63-11eb-bff5-005056b36e9d  ONLINE       0     0     0
            gptid/21d132d2-2f66-11eb-bff5-005056b36e9d  ONLINE       0     0     0
            gptid/42274d8c-2f63-11eb-bff5-005056b36e9d  ONLINE       0     0     0
            gptid/5edbc5f1-2f66-11eb-bff5-005056b36e9d  ONLINE       0     0     0
        cache
          gptid/0e5a799c-c343-11ec-a823-005056ab945b    ONLINE       0     0     0
        spares
          gptid/67a6642a-2f69-11eb-bff5-005056b36e9d    AVAIL


These correspond to disk devices inside /dev/gptid/{one of the above gptid's}

TrueNAS uses the GPT abstraction so that disks may move around from SATA port to SATA port (to SAS port to NVMe port even) and still identify the same way at the OS level. If you are seeing these show up as ada0..7 devices, then that strongly implies some manual ill-advised tinkering happened. I know there were some people who used to promote this kind of manual tinkering crap on blog posts and YouTube, but there really is a reason that TrueNAS does this more complicated thing -- it makes what you're trying to do much easier to accomplish. There is no good way to force a particular SATA port to show up as a particular ada* device name, short of compiling a custom kernel, so you might be stuck.
 

Lorne

Dabbler
Joined
Mar 4, 2022
Messages
10
The M2 is Sata, but I did not do anything with CLI. When I bought a new desktop I repurposed the old one with all my old HDD's as a NAS and had no previous experience of setting up a NAS so I just followed instructions on the web for a default setup. I can say that no disks have ever been connected to the NAS other than the 8 in there now which show up as ada0-7. It has been running OK and booting from the USB thumb for more than a year. Also at some point I disconnected all the drives and connected them up to different SATA sockets to make the cable runs neater and that did not affect any pool so I presume the gptid's you mention appear to be how it is working.

Is a solution for me to export/disconnect the offending pool, setup the boot from the M2 and then recreate the pool ? It is a copy of data I have in another pool (albeit 2Tb so it will take some time) so I can take the risk that the other disk will not fail at the wrong time.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
I'm having trouble reconciling this reported state with how things typically work via default install.

Are you able to do a "zpool status" and cut/paste the results here, preferably inside of CODE tags?

Is a solution for me to export/disconnect the offending pool, setup the boot from the M2 and then recreate the pool ?

It might be, but as I'm unclear on what's actually going on here, I'm hesitant to encourage that.
 

Lorne

Dabbler
Joined
Mar 4, 2022
Messages
10
I am not sure how to do a zpool status inside code tags but I have attached a screen shot of something that may help and below is a text copy of something else I got (the NAS is booting off the USB without the M2 installed:
root@truenas[~]# zpool status

pool: Data

state: ONLINE

status: Some supported and requested features are not enabled on the pool.

The pool can still be used, but some features are unavailable.

action: Enable all features using 'zpool upgrade'. Once this is done,

the pool may no longer be accessible by software that does not support

the features. See zpool-features(7) for details.

scan: scrub repaired 0B in 1 days 20:13:18 with 0 errors on Mon Mar 28 21:13:18 2022

config:



NAME STATE READ WRITE CKSUM

Data ONLINE 0 0 0

gptid/4b7d9220-876d-11ec-9219-e0cb4eca21f8 ONLINE 0 0 0



errors: No known data errors



pool: DiskImages

state: ONLINE

status: Some supported and requested features are not enabled on the pool.

The pool can still be used, but some features are unavailable.

action: Enable all features using 'zpool upgrade'. Once this is done,

the pool may no longer be accessible by software that does not support

the features. See zpool-features(7) for details.

config:



NAME STATE READ WRITE CKSUM

DiskImages ONLINE 0 0 0

gptid/f77dd94b-cfe8-11ec-a41e-2c4d54588d01 ONLINE 0 0 0



errors: No known data errors



pool: Media

state: ONLINE

status: Some supported and requested features are not enabled on the pool.

The pool can still be used, but some features are unavailable.

action: Enable all features using 'zpool upgrade'. Once this is done,

the pool may no longer be accessible by software that does not support

the features. See zpool-features(7) for details.

scan: scrub repaired 0B in 1 days 20:11:54 with 0 errors on Mon Mar 28 21:11:54 2022

config:



NAME STATE READ WRITE CKSUM

Media ONLINE 0 0 0

gptid/c8eff66f-869c-11ec-be2b-e0cb4eca21f8 ONLINE 0 0 0



errors: No known data errors



pool: Misc

state: ONLINE

status: Some supported and requested features are not enabled on the pool.

The pool can still be used, but some features are unavailable.

action: Enable all features using 'zpool upgrade'. Once this is done,

the pool may no longer be accessible by software that does not support

the features. See zpool-features(7) for details.

config:



NAME STATE READ WRITE CKSUM

Misc ONLINE 0 0 0

gptid/e800eff5-a9f6-11ec-a395-2c4d54588d01 ONLINE 0 0 0



errors: No known data errors



pool: Movies

state: ONLINE

status: Some supported and requested features are not enabled on the pool.

The pool can still be used, but some features are unavailable.

action: Enable all features using 'zpool upgrade'. Once this is done,

the pool may no longer be accessible by software that does not support

the features. See zpool-features(7) for details.

scan: scrub repaired 0B in 04:12:59 with 0 errors on Wed May 4 16:16:02 2022

config:



NAME STATE READ WRITE CKSUM

Movies ONLINE 0 0 0

gptid/4125a354-a921-11ec-bb75-2c4d54588d01 ONLINE 0 0 0



errors: No known data errors



pool: Movies2

state: ONLINE

status: Some supported and requested features are not enabled on the pool.

The pool can still be used, but some features are unavailable.

action: Enable all features using 'zpool upgrade'. Once this is done,

the pool may no longer be accessible by software that does not support

the features. See zpool-features(7) for details.

scan: scrub repaired 0B in 1 days 22:00:42 with 0 errors on Mon Mar 28 23:00:46 2022

config:



NAME STATE READ WRITE CKSUM

Movies2 ONLINE 0 0 0

gptid/9f8ec504-8da7-11ec-94e7-2c4d54588d01 ONLINE 0 0 0

gptid/9f9494ac-8da7-11ec-94e7-2c4d54588d01 ONLINE 0 0 0

gptid/2e1cd3e8-8e58-11ec-b3e0-2c4d54588d01 ONLINE 0 0 0



errors: No known data errors



pool: boot-pool

state: ONLINE

status: Some supported and requested features are not enabled on the pool.

The pool can still be used, but some features are unavailable.

action: Enable all features using 'zpool upgrade'. Once this is done,

the pool may no longer be accessible by software that does not support

the features. See zpool-features(7) for details.

config:
 

Attachments

  • Clip.png
    Clip.png
    86.8 KB · Views: 81

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
I am not sure how to do a zpool status inside code tags but I have attached a screen shot of something that may help and below is a text copy of something else I got (the NAS is booting off the USB without the M2 installed:

On the edit menu line, there's a "More options" menu (tenth from left) and inside that are additional options including CODE tags. Those of us who do this regularly on the forums also know you can just type [-CODE-]yourstuffhere[-/CODE-] without the dashes which have been inserted to render the tokenizer impotent. The key benefit is that "yourstuffhere" gets posted without interfering with the whitespace, and a fixed width font is used, making it much more readable. No worries though.

What I'm really wondering is how your boot-pool looks like, and unfortunately that didn't make it into your last post. The only thing I can think of is that your device list in the boot-pool must include the M.2 as ada2 (and if you have a USB thumb drive, that's probably da0).
 

Davvo

MVP
Joined
Jul 12, 2022
Messages
3,222
I am interested in how you ended up in this mess, following. You have my moral support.
 

Lorne

Dabbler
Joined
Mar 4, 2022
Messages
10
On the edit menu line, there's a "More options" menu (tenth from left) and inside that are additional options including CODE tags. Those of us who do this regularly on the forums also know you can just type [-CODE-]yourstuffhere[-/CODE-] without the dashes which have been inserted to render the tokenizer impotent. The key benefit is that "yourstuffhere" gets posted without interfering with the whitespace, and a fixed width font is used, making it much more readable. No worries though.

What I'm really wondering is how your boot-pool looks like, and unfortunately that didn't make it into your last post. The only thing I can think of is that your device list in the boot-pool must include the M.2 as ada2 (and if you have a USB thumb drive, that's probably da0).
I put the M2 back in and booted it off the USB to get the attached disk list. You can see that the ada2 disk has now changed from the 1Tb disk in the Movies2 pool to the 128 M2 disk and the Movies2 pool is no longer available.

I also have another issue if I try and boot off the M2 I get an error "Boot Loader Too Large". I cloned my USB to the M2 on a windows machine so it should be identical however I was going to trouble shoot that later.
1665408677446.png
 

ChrisRJ

Wizard
Joined
Oct 23, 2020
Messages
1,919
Please check the documentation for your motherboard (which you did not disclose, like with a lot of other details => please check the forum rules). There are boards where an M.2 slot shares lines with a SATA connector, i.e. using the M.2 slot disables the SATA connector. Your symptoms look like this ...
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
I put the M2 back in and booted it off the USB to get the attached disk list. You can see that the ada2 disk has now changed from the 1Tb disk in the Movies2 pool to the 128 M2 disk and the Movies2 pool is no longer available.
There are boards where an M.2 slot shares lines with a SATA connector, i.e. using the M.2 slot disables the SATA connector. Your symptoms look like this ...
That is exactly what it looks like to me as well. When you insert the M.2 drive it turns off one SATA connection. What you see here is your pool 'Movies 2' going down because you removed the drive from the system, as far as the motherboard is concerned.
 

Lorne

Dabbler
Joined
Mar 4, 2022
Messages
10
I am using an Asus Z270 MB. There is nothing in the manual to suggest this however I found a post on Tom's hardware that says exactly that - ie if I run the M2 in sata mode it disables one of the Sata lines. So I have to go back to the USB stick.

Many thanks for those who helped.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
From the users manual, while it does not clearly state the SATA_1 port is disconnected when using the M.2 connection, that is what happens. Some manuals do clearly spell it out.:
** The M.2_1 socket shares bandwidth with SATA_1 port when using M.2 SATA devices. Adjust BIOS settings to use a SATA device.
*** The M.2_2 socket shares bandwidth with SATA_56 ports when using M.2 PCIE devices in X4 mode. Adjust BIOS settings to use M.2 PCIE devices in X4 mode.
 

Davvo

MVP
Joined
Jul 12, 2022
Messages
3,222
The specification summary of the user manual is the only place that mentions it. Nothing on the website or the specific parts in the user manual.
 
Last edited:

NugentS

MVP
Joined
Apr 16, 2020
Messages
2,949
Please check the documentation for your motherboard (which you did not disclose, like with a lot of other details => please check the forum rules). There are boards where an M.2 slot shares lines with a SATA connector, i.e. using the M.2 slot disables the SATA connector. Your symptoms look like this ...
Good catch
 
Top