# Fresh SSD install with gmirror/geli and UFS



## ohyes (May 17, 2012)

Hello everybody 

*I* just received my two new SSDs (Plextor M3P). *I* want to make a new installation of FreeBSD 9.0 with full UFS, AHCI, Trim, home encryption [and mirror and the second SSD]. I don't really need GPT, the full disk is for FreeBSD, but *I* choose GPT during the install process.

*I* tr*ied* it today. and it failed.

This is the process *I*'ve done: (*I* do not paste every command line here - maybe later)

OK - plug my 2 SSDs (ada0 and ada1)
OK - boot on a memstick USB 9.0
OK - install + src, make partitions on first SSD + GPT (ada0)
OK - during install, set up GPT on ada1 (but with no partition)
After install, reboot single user

OK - enable Trim on all partitions ( /, /var, /usr, /usr/home) [/tmp as tmpfs]
OK - /usr/home as a GELI partition
KO - setup the gmirror [on ada1]

I read Handbook for every step, and esp*e*cially for gmirror (http://www.freebsd.org/doc/handbook/geom-mirror.html) but the command [cmd=]# gmirror load[/cmd] generate*s* errors.

On a second reinstall try, *I* do gmirror before geli. Same problem.


I'm not a newbie on freebsd FreeBSD (using it since 6.2 on all my PCs and a de*di*cated server), *I*'m a middle newbie as a sysadmin :\ 

Before *I* post the errors of *gmirror load*, maybe you have tips and tricks for me. Maybe *I*'m wrong in my process with geli and gmirror (with gpt, ahci, trim). Can you help me with geli/gmirror/trim and FreeBSD 9?


----------



## ohyes (May 17, 2012)

*O*ne more thing.

During the process, *I* have rebuilt the kernel with the right option (handbook), and load everything about geli/gmirror in loader.conf / rc.conf.


----------



## wblock@ (May 17, 2012)

Whoa, stop.

You want to mirror the two SSDs?  Then do not use GPT.  And do not follow the Handbook gmirror section, it is incorrect.  (Yes, I know, I'm working on a rewrite.)

Create the mirror, create an MBR on it, then create slices and partitions and use GELI on them.  bbzz has a good GELI article here.


----------



## Crest (May 17, 2012)

Gmirror stores its metadata on the last sector of the underlaying GEOM providers. So does the GPT. Either format your disk with an MBR or create on mirror per partition. Both gmirror and geli will drop your BIO_DELETE commands there by disabling TRIM support.


----------



## ohyes (May 17, 2012)

*O*h thanks for those quick posts.

*S*o my error was GPT  I'll redo without.


----------



## ohyes (May 17, 2012)

Crest said:
			
		

> Gmirror stores it's metadata on the last sector of the underlaying GEOM providers. So does the GPT. Either format your disk with an MBR or create on mirror per partition. Both gmirror and geli will drop your BIO_DELETE commands their by disabling TRIM support.



*B*efore *I* go: do you mean if *I* want geli and gmirror *I* can not activate trim? [of course with MBR not GPT]


----------

