Mirroring the boot drive

Status
Not open for further replies.

Mark Stega

Dabbler
Joined
Dec 29, 2014
Messages
24
When I first installed FreeNAS I used a single 8Gb USB stick on an internal header. I just purchased as 16Gb stick in order to mirror the boot partition. I zero'd the drive using Active@KillDisk on a Windows system. I then plugged in the 2nd stick. In the boot section of the GUI, clicking on the freenas-boot or stripe line does not create the 'Attach' dialog popup. Under 'View disks' the new stick does show up as da1. Is there something I need to do like partition or format the new disk for it to appear in the boot status window?

This is FreeNAS 9.10 U4
 

melloa

Wizard
Joined
May 22, 2016
Messages
1,749
If not mistaken, you go to system -> boot -> status -> click the first line freenas-boot -> click attach on the bottom and select the disk you want to add.
 

Mark Stega

Dabbler
Joined
Dec 29, 2014
Messages
24
If not mistaken, you go to system -> boot -> status -> click the first line freenas-boot -> click attach on the bottom and select the disk you want to add.

Arghh - Absolutely correct; I looked at the screen shot in the documentation (as well as misreading the steps) and expected to see the dialog when I selected the 'freenas-boot'. I totally missed the 'Attach' button at the bottom.

Oh well, that's why noobs present the fodder for entertainment...
 

melloa

Wizard
Joined
May 22, 2016
Messages
1,749
Arghh - Absolutely correct; I looked at the screen shot in the documentation (as well as misreading the steps) and expected to see the dialog when I selected the 'freenas-boot'. I totally missed the 'Attach' button at the bottom.

Oh well, that's why noobs present the fodder for entertainment...

Glad we got it :)
 

riktam

Dabbler
Joined
Dec 16, 2012
Messages
15
One more thing to consider:
Last time that I checked .. .mirroring the boot drive will not install the boot loader on the new drive.
As a test you can shutdown FN , remove the first drive and try to boot from the second. Does it boot?

I think you might have to save the configuration file, reinstall FN configuring both USB disk as boot disks. Then FN will put the boot loader on both disks. And finally import the configuration file to have your installation as before.
 

Mark Stega

Dabbler
Joined
Dec 29, 2014
Messages
24
I'm still waiting for the resilver to finish; it's been two hours so far... I'll try the 'remove the first drive' test as soon as it completes.
 

Mark Stega

Dabbler
Joined
Dec 29, 2014
Messages
24
I guess it will be tomorrow before I can test the second disk; Looks like the resilver won't finish until about 9PM tonight:

Code:

  pool: freenas-boot

 state: ONLINE

status: One or more devices is currently being resilvered.  The pool will

  continue to function, possibly in a degraded state.

action: Wait for the resilver to complete.

  scan: resilver in progress since Fri Nov 18 07:04:24 2016

  3.31G scanned out of 6.35G at 48.4K/s, 18h18m to go

  3.31G resilvered, 52.15% done

config:



  NAME  STATE  READ WRITE CKSUM

  freenas-boot  ONLINE  0  0  0

	mirror-0  ONLINE  0  0  0

	da0p2  ONLINE  0  0  0

	da1p2  ONLINE  0  0  0  (resilvering)



errors: No known data errors

 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
One more thing to consider:
Last time that I checked .. .mirroring the boot drive will not install the boot loader on the new drive.
As a test you can shutdown FN , remove the first drive and try to boot from the second. Does it boot?

I think you might have to save the configuration file, reinstall FN configuring both USB disk as boot disks. Then FN will put the boot loader on both disks. And finally import the configuration file to have your installation as before.
This is not correct.
I have mirrored boot and they are true mirrors. It does not matter at all which one the system boots from. I pulled them both out, during a shutdown for hardware changes, and did not plug them back in the same places. On reboot, the system tried to boot from one of the array disks, so I had to go into the UEFI and tell it which drives to boot from and which drives to ignore.
I am sure that it booted from a different drive than the original one and I never had a problem with FreeNAS, just with the system board and it was only minor.

I used USB in my old FreeNAS but when I build my latest ones, I have used actual hard drives for boot drives. They re-silver MUCH faster and you can run diagnostics against them to have some idea what their health condition is. USB drives will fail with no warning.
 

Mark Stega

Dabbler
Joined
Dec 29, 2014
Messages
24
My experience matches what Chris stated. After the resilver finished I removed both USB sticks, placed the second (larger) stack in the position of the original single boot USB device and placed a new matching larger stick in the other slot. The system booted with no issue, told me that the boot mirror was degraded (couldn't find 'long string of digits'). I selected 'replace' and the resilvering is underway against the new device. So what started as simple user error all seems to be working perfectly. And in about 36 hours I'll have matching mirrored boot USB sticks.
 

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
One more thing to consider:
Last time that I checked .. .mirroring the boot drive will not install the boot loader on the new drive.
As a test you can shutdown FN , remove the first drive and try to boot from the second. Does it boot?

I think you might have to save the configuration file, reinstall FN configuring both USB disk as boot disks. Then FN will put the boot loader on both disks. And finally import the configuration file to have your installation as before.

It mirrors the boot partitions as part of the process. You get into trouble if you do it via CLI.

Last time I did this, it only took minutes to resilver.

@Mark Stega what model/brand USB sticks are you using? Have you got USB 2 enabled?
 

Mark Stega

Dabbler
Joined
Dec 29, 2014
Messages
24
I just realized that the new 32Gb sticks are showing as 16Gb. Presumably this is becase that was the old, smaller single USB stick that I mirrored.

Is the best way to get all of the storage as part of the boot image to save the system database and then reinstall FN using the FN installer and both sticks, then restore the system DB?
 

pschatz100

Guru
Joined
Mar 30, 2014
Messages
1,184
I just realized that the new 32Gb sticks are showing as 16Gb. Presumably this is becase that was the old, smaller single USB stick that I mirrored.

Is the best way to get all of the storage as part of the boot image to save the system database and then reinstall FN using the FN installer and both sticks, then restore the system DB?
I wouldn't bother. 16Gb will hold a lot of boot images. I would however, make certain you also back up the configuration. Having a proper configuration backup will allow you to more easily reinstall FreeNAS, if it ever becomes necessary to do so.
 

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
I'd recommend @Bidule0hm's config backup script. With my attachment patch.

Just have that send a config every week and auto-archive in your mail app
 
Status
Not open for further replies.
Top