Raid0 with usb sticks it is a good way to lost all data. We will try to imagine only experimental (non-production) installation.
How do I use da0 and da1 as a single 64 GB disk and install FreeBSD onto it?
Direct boot from software RAID0 seems to be impossible. But there is a lifehack:
You need to prepare your usb-sticks.
Both stick must be partitioned with identical scheme. For example 2Gb and 30GB.
Assuming BIOS and MBR, try to create partitions on 1st stick, and using fdisk copy the same scheme to 2nd stick.
Create gmirror from 2GB partitions on both usb sticks. For example:
Code:
gmirror label usbraid1 /dev/da0s1a /dev/da1s1a
It is a mirror for 'root filesystem', mountpoint is '/'.
Create gstripe from the both 30GB partitions. For example:
Code:
gstripe label usbraid0 /dev/da0s1d /dev/da1s1d
It is a stripe for other filesystems. mountpoint /usr might be a good choice.
Install FreeBSD to the loaded usb-sticks. (Or copy existing installation to these usb sticks)
Enable gmirror and gstripe in loader.conf
Enjoy!
How it works?
PC will boot kernel and root-fs from mirror of the 1st partitions. Other mount points (like /usr) are mounted from stripe.
Using fstab and nullfs you can place /var /tmp /usr on a single stripe partition.
How to mount non-root filesystems from single partition:
Code:
/etc/fstab
# Device Mountpoint FStype Options Dump Pass#
/dev/ufs/sataflash / ufs rw 1 1
/dev/ada1p1 /media/wd3tbvkh ufs rw 2 2
/media/wd3tbvkh/system.bsd/tmp /tmp nullfs rw 0 0
/media/wd3tbvkh/system.bsd/var /var nullfs rw 0 0
/media/wd3tbvkh/system.bsd/usr /usr nullfs rw 0 0