# How do people install FreeBSD on mirrored drives? Before or after installation?



## olav (Mar 20, 2013)

I've read the manual. And this has become a complex beast to read. There are way too many steps and conditions, it*'*s not a simple and easy task anymore. Is there an easier way to do this? Something you can spend less than 2-3 minutes on? Is it possible to create the mirror from sysinstall?


----------



## SirDice (Mar 20, 2013)

No, it's not possible to create one from sysinstall. You shouldn't use sysinstall any more, it's been deprecated.

Setting up a ZFS mirror might be a little easier. But either way you are going to have to put some effort in.


----------



## AndyUKG (Mar 20, 2013)

Hi, its really easy to use gmirror after a normal install to a single drive.

http://www.freebsd.org/doc/handbook/geom-mirror.html (section 20.4.3)


Thanks, Andy.


----------



## olav (Mar 20, 2013)

Ok, thanks. I think I will try to write a shell script that simplifies this process for us who do not have too much time between our hands. I guess that should be possible out of what I read in the handbook.


----------



## wblock@ (Mar 20, 2013)

It would probably be a little easier to use the Shell mode of the installer to create the mirror, filesystems, and assign mountpoints.  Then turn the installer loose on it.


----------



## estrabd (Mar 21, 2013)

SirDice said:
			
		

> No, it's not possible to create one from sysinstall. You shouldn't use sysinstall any more, it's been deprecated.
> 
> Setting up a ZFS mirror might be a little easier. But either way you are going to have to put some effort in.



I have to say that I tried the ZFS thing first (it's mixed UFS+ZFS, so that might have been it), but I just couldn't get past the issue of the system RAM getting eaten up. I had added 2 disks, so that was the motivation to try it. I ended up doing a gmirror, then felt like I was wasting the disk so I set up a geom stripe. If the ZFS adventure taught me anything, it was to checkout the other options FreeBSD has .

Brett :stud


----------



## throAU (Mar 22, 2013)

Pretty sure you can do it with the PC-BSD installer, if the command line scares you.


----------



## olav (Mar 25, 2013)

I've found a solution that is easy and works great, by using graid. 
All you have to do during installation is the following.
Step 1:
Select shell when the FreeBSD installer starts.
Step 2:
Type in this command
[CMD=""]graid label ddf gm0 raid1 ada0 ada1[/CMD]
Step3:
Type [CMD=""]exit[/CMD] to return to the installer.


----------



## GreenMeanie (Mar 25, 2013)

That is all you had to do to create a Mirror 1 RAID?



			
				olav said:
			
		

> I've found a solution that is easy and works great, by using graid.
> All you have to do during installation is the following.
> Step 1:
> Select shell when the FreeBSD installer starts.
> ...


----------



## wblock@ (Mar 25, 2013)

If you have a motherboard RAID controller, yes.  There are tradeoffs compared to software RAID.


----------



## olav (Mar 25, 2013)

Could you explain? I've just tested this with VirtualBox so far, and it seemed to work just fine.


----------



## wblock@ (Mar 25, 2013)

Check the man pages for detail.  gmirror(8) is a software RAID.  Drives can be attached anywhere, to non-RAID motherboard controllers or even to different types of buses.  graid(8) uses motherboard RAID controllers.  It's an interface to the motherboard RAID, instead of software RAID.


----------



## kpa (Mar 26, 2013)

It does work without a BIOS that has the RAID functions but it's kind of superfluous if you can use gmirror(8).


----------



## throAU (Mar 26, 2013)

If you have a decent amount of RAM, these days I'd recommend using ZFS and following this howto:

http://www.aisecure.net/2012/01/16/rootzfs/

By decent amount of RAM, I mean say 8GB or more.

If you're just doing "general desktop stuff", 8GB of RAM will be largely wasted and may as well be used by ZFS, so you can reap the benefits of data checksums, compression, getting familiar with the new technology, etc.


----------

