Possible (or smart) to put freebsd-boot on USB stick for root-on-ZFS?
Mehmet Erol Sanliturk
m.e.sanliturk at gmail.com
Tue Mar 24 07:49:47 UTC 2015
On Mon, Mar 23, 2015 at 10:09 PM, Jason Birch <jbirch at jbirch.net> wrote:
> Hey there,
>
> I'm looking at a relatively old resource
> (https://wiki.freebsd.org/RootOnZFS/GPTZFSBoot/9.0-RELEASE) about how
> to run root on ZFS for 9.0, and I noticed the section on installing
> the boot section to all drives that make up the root. In my setup,
> I'll only be mirroring two SSDs on 10.1, but it made me consider the
> possibility of having the freebsd-boot partition on a USB stick rather
> than on each drive itself for basically the following reason:
>
> Should an SSD die, I'd need to say "boot from this other device" to
> get my system back up and running, do the original partitioning magic
> on the replacement device, get that back into the vdev... Should the
> USB stick die, I'd need to simply replace it with one that had the
> same image (that is, only the boot partition), and `zpool replace` a
> blank device (I won't have a swap partition).
>
> However, I can think of some downsides as well - namely that the USB
> stick is probably more likely to die than the SSDs, and that the image
> on the USB stick will change over time (This gets mounted as /boot? or
> am I mistaken here... This would plague the freebsd-boot on the SSDs
> as well, with drift...)
>
> Am I misinterpreting the point of freebsd-boot? Does /boot actually
> end up living on the ZFS mount, and freebsd-boot just contains enough
> information to read the kernel and other goodies required to bring up
> a full system from a ZFS dataset? Is my thought to use a USB stick for
> this partition a little thick or actually worth trying out?
>
> JB
> _______________________________________________
>
>
Not a direct answer to your question , but only an example :
I was using a FULL installation previously : Everything on the SAME HDD .
When it was becoming necessary to install a new operating system , I was
using another HDD and after installation on it the new OS , I was copying
my files ( in my home directory in previous HDD ) into new installed HDD .
This was taking approximately twelve hours .
I one instance , my OS has been corrupted by a malicious inject ( this is
my suspect because I could not find a true reason for what was the attack
through "Bash" ) .
Now , I am using the following set up :
I am using TWO HDDs :
One is ONLY OS , and other is for my data files ( all of them downloaded
from Internet as open source project files ) mounted after installation of
OS .
When I want to upgrade to a new OS , I am using a NEW HDD ( I am NOT
installing onto existing HDD ) by disconnecting power of existing OS and
data HDDs .
After installing the new OS and verifying that it is working correctly , I
am powering the data HDD and using an fstab entry to mount it .
I am keeping the old OS HDD for a NEW install .
My suggestion :
Use a USB stick or HDD ( revolving platter or SSD ) for ONLY OS and OTHER
HDDs for your data files .
OS my be on any convenient medium : revolving HDD , SSD , USB stick , it is
not important .
It may be in any form , it is not important . Important point is for your
convenience : You may select any form .
You may generate any number of copies of it as a spare for possible
failures of used OS device :
In case of failure , the only thing is to do is to shut down the computer ,
attach a spare OS medium and boot the computer .
I am not using RAID , but "rsync" : one with -"-delete" as a replication
of current data disk , another without "--delete" for fear of accidental
deletions .
I wish that my example may be useful for you .
Thank you very much .
Mehmet Erol Sanliturk
More information about the freebsd-questions
mailing list