# Software RAID



## mariourk (Nov 19, 2011)

I would like to install FreeBSD on a software RAID setup.
However, I have no idea how to do that.

The documentation doesn't really work, for some reason


----------



## wblock@ (Nov 19, 2011)

There's gmirror(8), gstripe(8), gvinum(8), [man=1M]zfs[/man].  In addition to these man page links, there are sections in the Handbook on each.


----------



## mariourk (Nov 20, 2011)

The handbook is what I tried. However, I had to exit the installer in order to make the RAID devices and go back to the installer afterwards. But for some reason, the installer didn't show any of the RAID devices, only regular HDD's. I suppose I did something wrong.

Isn't there any tutorial somewhere that describes this procedure in more detail?

I also tried the onboard RAID-controller, on my motherboard. But when I enable onboard-RAID, the bootcd refuses to boot and keeps rebooting the computer. Is anyone familiar with this problem?


----------



## hainan (Nov 20, 2011)

Hi mariourk

First of all,

Which FreeBSD RELEASE are you trying to install? 
Did you read the hardware documentation for this FreeBSD RELEASE? 

Please check your hardware compatibility from this documentation. Here is FreeBSD 8.2 RELEASE Notes : http://www.freebsd.org/releases/8.2R/relnotes-detailed.html

*Please Note:* Onboard RAID hardware contains mostly Software RAID Chipset and using of this hardware is not recommended.


----------



## wblock@ (Nov 20, 2011)

mariourk said:
			
		

> The handbook is what I tried. However, I had to exit the installer in order to make the RAID devices and go back to the installer afterwards. But for some reason, the installer didn't show any of the RAID devices, only regular HDD's. I suppose I did something wrong.



That's possible, but could also be that the installer isn't built to deal with RAID arrays.  If you're looking for a root-on-ZFS type of installation, PC-BSD's installer can do that.  mfsBSD also has a script to do that.



> Isn't there any tutorial somewhere that describes this procedure in more detail?



Maybe.  But it would depend on which kind of software RAID, which you haven't specified.


----------



## mariourk (Nov 21, 2011)

I tried to install _FreeBSD 9.0 RC2_. I also tried _FreeBSD 8.2_ but with the same result (no result  )

I have 4 SATA HDD's installed in my computer. Two 160GB HDD's and two 1TB HDD's. I want to combine those to two RAID-1 setups. One of the two combined 160GB HDD's and one with the two 1TB HDD's. I want to install FreeBSD on the 160GB RAID and mount the 1TB RAID to /home.

I know how to do this with Linux. But FreeBSD turns out to be a different story :e

I hope I can get this working, with some help. FreeBSD seems to be worthwhile to run on a server. I want to use it on my own server at home first, to get to know the system. Once I get the hang of it, I want to use it on 2 of my servers at work. At least, that's the plan...


----------



## hainan (Nov 21, 2011)

Hi mariourk

I suggest

On 160GB HDD's you can use gmirror to create Raid1 system for / and swap.
On 1TB HDD's you can use ZFS pool (if your system have enough memory) and create mirror pool then mount your home folder (_/usr/home/your_user_name_).

Howto (_to understand the commands and installation; on FreeBSD 9 FixIT option is disable. Use Livecd option instead._)
http://forums.freebsd.org/showthread.php?t=21064

Some usefull links is here :

*gmirror*
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/geom-mirror.html

*zfs *
http://www.freebsd.org/doc/handbook/filesystems-zfs.html
http://wiki.freebsd.org/ZFS

Sorry about my English.


----------



## mariourk (Nov 22, 2011)

Thanks!

I managed to build two gm-devices. I passed on ZFS, because I'm not going to use all those fancy featues for now and there is only 2GB of mem in this machine. ZFS is going to be another project :e

I dropped out of the installer, to the shell and created two gm-devices. I got back to the installer and managed to create some partitions of the feshly created gm-devices and install FreeBSD on them.

Booting was a problem, but the given section of the handbook handled that nicely in the troubleshooting section. All I had to do was load geom_mirror and continue booting.

The next step is checking /boot/loader.conf Only that file doesn't seem to exist...?


----------



## kpa (Nov 22, 2011)

There is no /boot/loader.conf unless you create the file yourself.


----------



## mariourk (Nov 22, 2011)

That thought just crossed my mind. The system is booting just fine now.


----------



## DutchDaemon (Nov 22, 2011)

Note that /boot/loader.conf overrides the default settings in /boot/defaults/loader.conf (Which _does_ exist and _is_ used).


----------



## Crivens (Nov 23, 2011)

DutchDaemon said:
			
		

> Note that /boot/loader.conf overrides the default settings in /boot/defaults/loader.conf (Which _does_ exist and _is_ used).


... and please let me add to this "and is *not* to be touched directly". That will invite all kinds of trouble.


----------



## mariourk (Nov 23, 2011)

/boot/loader.conf only reads:

```
geom_mirror_load="YES"
```
I guess that's allright. If not, I'm happy to hear how it should be done. 

But so far everything seems to work fine. Now I'm going to figure out how the package manager works and install the packages I need to build my server.

Thanks for all the help so far! :beergrin


----------

