Replacing a failed boot disk in a mirror

Status
Not open for further replies.

Garyw

Dabbler
Joined
Sep 4, 2011
Messages
45
So, I've got two USB sticks in a mirror that boot FreeNAS. All good there. A few weeks back one of the sticks failed and I replaced it.
I did a zpool replace [mirror] [new device name] and it rebuilt the new stick just fine but it gave me a message saying I needed to put the boot code onto the new USB stick but no matter what I do the command fails.

I've labbed this up to do some testing and this is what I'm seeing:

Code:
root@freenas99:~ # zpool replace freenas-boot /dev/da10p2 da10
Make sure to wait until resilver is done before rebooting.

If you boot from pool 'freenas-boot', you may need to update
boot code on newly attached disk 'da10'.

Assuming you use GPT partitioning and 'da0' is your new boot disk
you may use the following command:

		gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 da0

root@freenas99:~ # gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 da10
gpart: No such geom: da10.
root@freenas99:~ #


Any suggestions? I know I'm probably missing something silly but I'm stumped!
 
Last edited by a moderator:

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
I did a zpool replace [mirror] [new device name]
Why? The GUI has the capability to replace the mirrored boot device, and it will install the boot code.
 
Status
Not open for further replies.
Top