Ubuntu Server install to usb

Does anyone have experience installing ubuntu server onto a USB drive, specifically a btrfs raid?

I have 6-sata slots and I don’t want to waste one on an OS, let along two for RAID-0 OS. Is there a way to install the OS to an 16gb usb/flash drive then expand into a 3-usbs in Raid-0 and still make it bootable?

@SgtAwesomesauce, Better?

To clarify you want to raid-0 two flash drives using BTRFS and make it bootable with Ubuntu Server?

huuuuuuuuuh, YU

You do understand that they call it RAID 0 because that’s how much data if you lose one of the drives, correct?

I say this because you mention “3xRaid-1” in one part and RAID 0 in another.

2 Likes

@kungr better. Just wanted to verify. So, the concern I see with raid-0 on flash drives is that they die. You’ll want something that’s reliable.

I would do something like this instead:

In fact, it’s what I did do to make a portable Linux OS for when I need to do work on a shared computer that’s not running the obviously superior OS.

As far as the install goes, just make sure the OS drives are the only ones plugged in at the time of install if you’re going UEFI, otherwise, just install it like you would any other time.

1 Like

I was going to mount /tmp and /var as tmpfs in ram, and put the noatime flag in the fstab file.

That’s why i’m wanting to go raid.

Raid 0 is no redundancy.

When you lose a single drive in raid 0, you have 0 data left.

If you want a mirror, it’s raid 1.

It’s an option. You can do it, but it will be god-awful slow. Trust me when I say, you’re better off not doing it.

1 Like

I too like to have unprotected sex with hookers.

what could possibly go wrong

Unless that’s what he’s after. Masochist?

4 Likes

The closer you are to death, the more alive you feel.

1 Like

Why not just use the USE as a boot disk and then just run everything from a RAM Disk? if you are not using DDR4, RAM is cheap and will be leaps and bounds faster than USB RAID.

You would setup the RAM Disk to periodically Sync with the USB drive. Just pray for no brown outs or black outs. Unless you have a UPS.

https://www.newegg.com/Product/Product.aspx?Item=N82E16820233304&cm_re=ddr3--20-233-304--Product

Ram prices suck dawg. Ram, and GPUs really just aren’t something you should buy right now unless you have to have it.

Am I wrong in thinking it’s as simple as telling the UEFI to boot from the USB raid? Pretty sure you’re going to need a separate usb device to do that with.

If you’re really worried about sata ports couldn’t you just get a cheap expansion sata controller and buy some cheapo SSDs, or maybe even some sata -> usb devices exist,

OK @SgtAwesomesauce & @Dynamic_Gravity, Raid-1

Why would it be god awfull slow? I run that on my desktop now to minize ssd writes. I’m still rocking OCZ VII.

Assuming you mean RAID1

If you can’t set up the raid when installing then you just install it to one disk then add the others after it’s been installed. These are the commands to do so:

btrfs dev add /dev/sdx /

where /dev/sdx is the disk you want to add to the raid and / is the mount point (which will just be / if it’s the root volume)

btrfs bal start -mconvert=raid1 -dconvert=raid1 /

How does that affect grub and Boot Process, will it confuse my mobo.

And just incase, if the whole thing goes sideways, is there a way to migrate the other RAID arrays to a new installation?

Whoops, I googlized it.
https://ubuntuforums.org/showthread.php?t=850229

Trips usb here we come.

Its a headless fileserver/print server/torrent box

USB devices are, by their very nature, slow.

Absolutely. Depending on what you use for the array (btrfs, zfs, lvm, md) all you have to do is load the correct driver, do the initialization tasks and mount the virtual devices.

It doesn’t. It will still boot from the disk that has grub installed. If that disk fails you just use a live cd to reinstall grub on a working disk

What does the btrfs partition scheme look like for swap, /boot, and /?
how about raid10