[OpenIndiana-discuss] Installing OI on USB stick

Jim Klimov jimklimov at cos.ru
Fri Mar 1 02:06:44 UTC 2013


On 2013-03-01 02:40, Peter Wood wrote:
> I'm planning to install OI on an USB stick and then mirror rpool to another
> USB stick. This will free up the 2 HDD that were used for the OS to be used
> for storage.
>
> The USB sticks will be plugged in to two USB ports and stay there forever.
> No unplugging or swapping ports.
>
> The system will be a production system and it's important to be reliable.
>
> Any reason not to install OI on USB sticks? Anything I should be careful
> about?

We did have a box with USB sticks in it "forever", written rather
intensively. Every few months they wore out and died. So plan to
set up your datasets in such a manner that regular writes go to
HDDs, which includes swap, much of /var (logs, mail, mqueues, etc),
and USB Flash sticks are as WORM as possible.

Some people on the list might share their experience that USB is
not a reliable protocol. I guess this depends on the controller
and drivers, but in general it can't be expected to work like a
clock on random hardware. YMMV.

On another hand, on my home PC I have a stick with OI Live image
always plugged-in in the back, and it was more often a reliable
way to recover my system from ashes of the flaky single root HDD.
Lesson learned: create rpool with copies=2 or even copies=3, so
that every possible dataset and object would inherit this setting.
To an extent mirroring would help you, until one of the devices
kicks the bucket and another happens to be unreliable in a few
key sectors; and these events are likely to happen in a short
timeframe from each other for any number of reasons, starting
from Murphy's law and ending with them being similarly worn out
by co-working for a lifetime.

Another lesson learned - occasionally zfs-send|zfs-recv copies
of necessary rpool datasets (rpool/ROOT, rpool/export, more in
my split-root cases) to the main storage pool. If you'd have
to recover, it is as simple as booting from live media, making
a new rpool on new disk(s) manually and sending the backed-up
datasets from main storage to this root.

Otherwise, from my limited experience, I see no showstoppers
to using USB devices and Flash devices as root pools - if you
take the right precautions and accept the possible slow IO
speeds. In particular, my box was booted off the liveusb image
for days sometimes with no problems to note.

HTH,
//Jim Klimov




More information about the OpenIndiana-discuss mailing list