raid0 questions

I have 3 usb pen drives:

I have the FreeBSD installer on da2 (installer boots fine)
da0 and da1 are identical in disk size, make/vendor (32 GB each)

1] How do I use da0 and da1 as a single 64 GB disk and install FreeBSD onto it? (Any FS UFS2/ZFS will do.)
2] Do I have to use graid before I run the setup using the shell?

Any ideas??
 
Using RAID0 across USB pen drives is a bad idea. Perhaps you meant RAID1? Redundant USB sticks?
USB sticks ares pretty flakey and I would not trust a pair for a RAID0 array.

gstripe(8) is UFS software RAID0
 
I did a write-up for bootable gmirror(FreeBSD RAID1 for UFS) so maybe you can glean something from that:

So you would need to do the same and drop out to a shell during installation and load gstripe and then build your raid array.

Unsure if you want to go UEFI or MBR/Legacy BIOS route.
 
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
 
Back
Top