# migration to gmirror



## dbi (Aug 29, 2009)

Hi,

After using FreeBSD for about month as my home desktop, I've decided to migrate permanently. Still a newbie, I'd appreciate any advice on my migration plan.

FreeBSD is currently installed on one hdd. I have two other disks, which I want to mirror with geom and do a "dump | restore" over the mirror.

There is an example on gmirroring 2 whole drives in the handbook. What I didn't like in the example is that the swap goes in the mirror also.
I see no good reason to get the paged out data mirrored and even more - putting the swap on different drives would let the kernel use striping hence better speed.

So, I'd like to make a layout like this:


```
ad8s1b - 2G swap
ad10s1b - 2G swap

ad[8,10]s2 - mirrored as "gm0"

gm0a    500M /
gm0d    4G   /var
gm0e    4G   /tmp
gm0f    10G  /usr
gm0g    <all the rest> /home
```


1) Do you guys see any problems with this layout? Any suggestions for a better one?

2) How should I proceed with "bsdlabel" and "gmirror label" - which one first?

Thanks in advance!


----------



## aragon (Aug 29, 2009)

This is exactly how I have mine setup, except I have 8 GB RAM so I don't bother with swap anymore.  Mirroring slices instead of entire drives allows me to dual boot Windows, and I originally used to use swap in the leftover slice.

Anyhow, this setup works well for me.  Incidentally it just saved me 700 GB so I'm particularly happy with it right now.

Do the bsdlabel after creating the gmirror instance if you can.  If you have to do bsdlabel first, edit partition 'c' to be 1 block smaller than slice size.  Remember gmirror stores its meta data in the last block of a provider, so you don't want any file system data there.  If you do the bsdlabel after gmirror, you shouldn't have to worry about that.


----------



## dbi (Aug 29, 2009)

*[solved]*



			
				aragon said:
			
		

> Mirroring slices instead of entire drives allows me to dual boot Windows, and I originally used to use swap in the leftover slice.



Absolutely - this is much more flexible. BTW if you don't use Windows for some specific applications  (like 3D games) that won't work (well/ at all) under virtual machine, VirtualBox may be a good choice - saves reboots. 



			
				aragon said:
			
		

> Anyhow, this setup works well for me.  Incidentally it just saved me 700 GB so I'm particularly happy with it right now.



Yep. Better safe than sorry. 



			
				aragon said:
			
		

> Do the bsdlabel after creating the gmirror instance if you can.  If you have to do bsdlabel first, edit partition 'c' to be 1 block smaller than slice size.  Remember gmirror stores its meta data in the last block of a provider, so you don't want any file system data there.  If you do the bsdlabel after gmirror, you shouldn't have to worry about that.



THANKS! Exactly what I needed to know for sure!


----------

