Resetting network configuration is the only way

Yorick

Wizard
Joined
Nov 4, 2018
Messages
1,912
once i tried to upgrade to 11.3 i started having other issues

What are you booting from? If that's a USB stick, you are likely to face an issue where these sticks cannot handle the stress that FreeNAS puts them under. Worse with USB3 running at USB3 speed.

Recommended boot media is either SATADOM or SSD. SSD could be via SATA, like an Intel 320 40GB for USD 15, or via an adapter like the https://www.amazon.com/dp/B0863F86YT?ozlp-20 with an SSD like the https://www.amazon.com/Transcend-128GB-MTS430S-Solid-TS128GMTS430S/dp/B07KG2G152/?ozlp-20
 

tfran1990

Patron
Joined
Oct 18, 2017
Messages
294
What are you booting from? If that's a USB stick, you are likely to face an issue where these sticks cannot handle the stress that FreeNAS puts them under. Worse with USB3 running at USB3 speed.

Recommended boot media is either SATADOM or SSD. SSD could be via SATA, like an Intel 320 40GB for USD 15, or via an adapter like the https://www.amazon.com/dp/B0863F86YT?ozlp-20 with an SSD like the https://www.amazon.com/Transcend-128GB-MTS430S-Solid-TS128GMTS430S/dp/B07KG2G152/?ozlp-20
ty for the quick reply.

You knew it, i didnt even have to say what i was booting from. i figured that may be the issue.
i need to install 11.2U8 to this older kingston 120g ssd. then boot from it and import my config.
i think i want to create my new pool of 6X8TB once i upgrade to 11.3 for the new features.

Is there anyway to "replace" usb stick with the ssd then detatch the other usb stick to go back to a single boot device?
 

Yorick

Wizard
Joined
Nov 4, 2018
Messages
1,912
Is there anyway to "replace" usb stick with the ssd then detatch the other usb stick to go back to a single boot device?

I am unclear about that. You can mirror the boot pool, but I don't know that this creates the boot sector / EFI necessary to boot the mirror. Over to someone who's done that.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Code:
gpart backup <usb-device> | gpart restore -F <ssd-device>
zpool attach freenas-boot <usb-device>p2 <ssd-device>p2
dd if=<usb-device>p1 of=<ssd-device>p1
# wait for resilver to finish
zpool detach freenas-boot usb-device>p2
 

tfran1990

Patron
Joined
Oct 18, 2017
Messages
294
Code:
gpart backup <usb-device> | gpart restore -F <ssd-device>
zpool attach freenas-boot <usb-device>p2 <ssd-device>p2
dd if=<usb-device>p1 of=<ssd-device>p1
# wait for resilver to finish
zpool detach freenas-boot usb-device>p2

my idea is to use a different box i have sitting here, i would boot up to a linux live usb.
take 1 of the mirror sticks from my server and the new 120gssd put both of them in the live linux box.
use gparted to find the names of the UBS mirror and the new ssd. then use
Code:
gpart backup <usb-device> | gpart restore -F <ssd-device>


can you remind me the context of
Code:
zpool attach freenas-boot <usb-device>p2 <ssd-device>p2
i would put the USB i just copy back into the freenas along with the ssd i just copy to?
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
my idea is to use a different box i have sitting here, i would boot up to a linux live usb.
take 1 of the mirror sticks from my server and the new 120gssd put both of them in the live linux box.
use gparted to find the names of the UBS mirror and the new ssd. then use
Code:
gpart backup <usb-device> | gpart restore -F <ssd-device>
Linux does not have gpart. And why would you employ such a convoluted procedure? I missed that your USB devices are already mirrored, but that does not change much. Let me explain step by step:

1. Shutdown your system and connect your SSD (obviously). Then boot from USB as always.

2. Copy the partition table from one of your USB devices to your SSD:
gpart backup <usb-device> | gpart restore -F <ssd-device>
gpart is a FreeBSD tool and the above command only copies the partition table, not the contents of the disk.

3. Attach the second partition of the SSD to the existing boot pool mirror:
zpool attach freenas-boot <first-usb-device>p2 <ssd-device>p2
The boot pool resides in partition #2 of however many devices you use. By attaching the second partition of the SSD this way you create a three-way-mirror and ZFS will "resilver" - you are probably aware of that. Afterwards and without taking anything offline your SSD will have the "freenas-boot" pool in its second partition. Just wait for the resilver to finish. zpool status freenas-boot will tell you when it's done.

4. With the system still running and everything we could now detach the USB devices from the ZFS pool if it wasn't for booting, so we postpone that.

5. Transfer boot code:
dd if=<first-usb-device>p1 of=<ssd-device>p1
The boot code resides in partition #1 on all relevant devices. Same for GPT/legacy and for GPT/UEFI boot, it's always the first partition. So we copy that over and the system will be able to boot.

6. Now detach the USB devices:
zpool detach freenas-boot <first-usb-device>p2
zpool detach freenas-boot <second-usb-device>p2
The mirror vdev lives in partition #2 of all devices, so we detach this. Removing vdev parts is perfectly possible for mirrors. Another zpool status freenas-boot will show you that the boot pool is now comprised of the SSD partition #2 only.

7. Unplug USB devices, no need to reboot.

Kind regards,
Patrick



 

Yorick

Wizard
Joined
Nov 4, 2018
Messages
1,912
7. Unplug USB devices, no need to reboot.

Debatable. "There's no reason it shouldn't work" is distinct from "I tested it and it works".

I'd reboot, just for that.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Debatable. "There's no reason it shouldn't work" is distinct from "I tested it and it works".
I'd reboot, just for that.
Sure :)
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
After you have successfully rebooted your system from the SSD without the USB drives connected you can expand the available disk space of your freenas-boot pool:
Code:
# check how the SSD is partitioned
gpart show <ssd-device>
# show how large our boot pool is
zpool list freenas-boot

# have the partition cover all of the available space
gpart resize -i 2 <ssd-device>
# check it worked
gpart show <ssd-device>

# now expand the ZFS vdev
zpool online -e freenas-boot <ssd-device>p2
# check it worked
zpool list freenas-boot


Patrick
 

Yorick

Wizard
Joined
Nov 4, 2018
Messages
1,912
Exceedingly clever, kudos.
Of course there's also: Install fresh on SSD, restore config.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Exceedingly clever, kudos.
Of course there's also: Install fresh on SSD, restore config.
Thanks a lot but ... that's basic system administration and storage management to me. Seems like not that many FreeNAS users also have managed hundreds of FreeBSD servers for years ;)

BTW: that's why I feel so confident running FreeNAS betas and even nightlies. They can mess up the UI or the sharing services all they want. As long as the system can boot some FreeBSD and the ZFS pool is there, I will always get at my data somehow.

Kind regards,
Patrick
 

tfran1990

Patron
Joined
Oct 18, 2017
Messages
294
Let me explain step by step
wow ok thank you for the detailed explanation.

for some reason i was thinking of GParted
when you say <first-usb-device>p2 <ssd-device>p2 you mean like /dev/da7 p2 or /dev/da7p2.
The reason im asking is because i see p2 at the end of all devices.
for step 5 will i see /dev/ada#p1 (ada because this ssd will be connected to the sata port where the rest of my disc are connect to a HBA
1589492185337.png

1589492248546.png

could it be that my data disc use P1 for swap?maybe?
 
Last edited:

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
da7p2
And ada0p2 or ada1p2 or whatever your SSD device will be.

da7 means "direct access device number 7", the p2 means "partition number 2".
 

tfran1990

Patron
Joined
Oct 18, 2017
Messages
294
would it be a bad idea to use something like this for the new boot ssd? adapter

is the problem a combination of the usb and the usb sticks?
 

Yorick

Wizard
Joined
Nov 4, 2018
Messages
1,912
It’s usually just the stick itself. People have reported success with usb to m.2 2242 SATA adapters. I’d expect that thing you have there would work as well.
 

tfran1990

Patron
Joined
Oct 18, 2017
Messages
294
i have to look and see what my power cables look like, it might be easier to use the adapter but it will also create another point of failure.
 

tfran1990

Patron
Joined
Oct 18, 2017
Messages
294
some settings done via ssh or the shell(GUI) will not stick on reboot, does this mean i need to be in front of the monitor connected to the machine for the commands to stick; or will this apply via ssh because the changes affect the boot not the config?
 

Yorick

Wizard
Joined
Nov 4, 2018
Messages
1,912
This means that changes to system files don’t survive reboot, no matter how you apply them.

You are changing drives and zpools, those changes persist.
 

Yorick

Wizard
Joined
Nov 4, 2018
Messages
1,912
Top