Replacing unreliable boot USB drives with SSD's

Status
Not open for further replies.

philsta

Cadet
Joined
Nov 4, 2017
Messages
3
Hi there
I'm new to FreeNAS having only built my first server earlier this week, however after reading some suggestions decided to go with a mirrored boot drive setup using USB Thumb drives for this I used a pair of SanDisk 16GB Cruzer Fit's. Unfortunately they have been a pain in the ass in the past week have been failing and resilvering ( it's very slow ), apart from this I'm very happy with the server and even though it's only running 16GB of RAM and a Xeon E3-1220 v2 it can happily stream a 4k .mkv file using Plex. So my proposal is to bin these annoying USB drives and replaces them with two 30GB SSD's. Will the below procedure work well?

Open CLI and use the following commands:

zpool detach freenas-boot da0p2 ( remove 1 of the USB drives )

zpool attach freenas-boot xxxxx ( import SSD to boot mirror )

zpool attach freenas-boot xxxxx ( import second SSD to mirror )

zpool detach freenas-boot da2p2 ( remove remaining USB drive )

I should then be left with the two mirrored SSD's as the boot drive?

So far to test I added a further USB thumb drive to the boot mirror and once it had the boot config installed detached it and all seems well so I'm thinking that the above should work and may be faster than backing up the config and key then doing a reinstall and importing everything back.

Any suggestions?
 
Last edited by a moderator:

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
Or simply save config install to new drives and upload saved config. Seems easier to me unless you want to do the CLI dance above.
 

philsta

Cadet
Joined
Nov 4, 2017
Messages
3
I kind of like getting into the CLI, been working in IT since the early 90's and find you learn a lot more about how a system works using the command line and I'm new to zfs so if what I posted will work then I'll give it a go, after all if it fails I have a backup and can just reinstall and restore the saved config.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Open CLI and use the following commands:
That should work, I think. Of course, you could also just replace the USB sticks through the GUI.
 

Arwen

MVP
Joined
May 17, 2014
Messages
3,611
You probably want to do it through the GUI. FreeNAS uses an odd configuration for all the disks. For your case, the command line will likely miss installing the boot sectors, and then later Grub. (I don't have my FreeNAS available to play with.)

The other flash drive you broke off may not be a clean copy. ZFS has a special method to break a mirror off, so that it can be used as a pool in its own right.

Next, if I were doing it, (GUI or command line), I would add both SATA SSDs first, before detaching the USB flash drives. ZFS supports n-way mirroring, so 4 ways works. This over comes a tiny, (but real), potential problem where the sole remaining USB flash drive has a bad block. (But it's partner USB flash drive did have a good copy.)
 
Last edited by a moderator:

philsta

Cadet
Joined
Nov 4, 2017
Messages
3
Thanks for the advice Arwen, ended up doing it using the GUI, first I shutdown and added the SSD's, then on reboot went to Boot, then Status and replaced the USB drives with SSD's, shutdown once more, removed the thumb drives and rebooted, it rebooted twice but all was fine when I logged in.
 

Arwen

MVP
Joined
May 17, 2014
Messages
3,611
Thanks for the advice Arwen, ended up doing it using the GUI, first I shutdown and added the SSD's, then on reboot went to Boot, then Status and replaced the USB drives with SSD's, shutdown once more, removed the thumb drives and rebooted, it rebooted twice but all was fine when I logged in.
That will work fine.

In fact ZFS is one of the few RAID that does the best thing if the replacement is available at the same time as the device to remove. To sum it up, ZFS makes the new disk a mirror of the one to remove, until it's completed. Then it detaches the disk to remove. Perfect, something I've wanted since last century.
 
Status
Not open for further replies.
Top