# Installing RAID/GPART on single disk



## amtrakuk (Dec 1, 2014)

I am using 2 x 3TB hard disks in a NAS box and wanting to migrate to a BSD box using the disks from the NAS using RAID1.

There is 1 TB of data to "handle".  

Am I able to install GPART on a single disk, migrate the data over the LAN from the NAS to the single GPART disk, then add the second disk and build the RAID?

Thanks


----------



## wblock@ (Dec 2, 2014)

It depends on what you mean by "GPART".  There is a disk partitioning program called gpart(8).  Some people confuse this with the GPT partition scheme.

Yes, you can set up a mirror on one disk, transfer data to it, then add another disk to the mirror.  Make a full backup first.
First, see the metadata section in https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/geom-mirror.html.  Metadata should be removed from the disk on which the mirror will be created.

Then see the rest of that section.  I don't know if the latest version of the installer allows creating and directly installing to a mirror.  If not, the mirror will have to be set up in the shell and then mounted where bsdinstall(8) can find it.


----------



## amtrakuk (Dec 2, 2014)

Thanks for the reply.  Before I used GEOM/gmirror to set[]up a RAID1, but I understand there was a change in the latter releases of FreeBSD which meant gpart had to be used?

I wanted to see if I can reutilise the 2 x 3TB disks in the NAS without having to get a third or spend days backing up a TB of data to a USB disk.


----------



## wblock@ (Dec 2, 2014)

Yes, you can.  The NAS mirror is broken and left running on one drive.  Then a new FreeBSD mirror is created on the other.  The data is copied to it, and then the remaining NAS drive added to the mirror.

The second part of the link above shows how to do that with an existing FreeBSD system.  Because you have a NAS, it will be slightly different.

Backup is a separate matter.  If you attempt this without backing up the NAS to something else, a single misstep can wipe out the data.  If it is data you want to keep, make a full backup of it first.


----------



## amtrakuk (Dec 6, 2014)

Thanks for your replies. In the past eight days when I used a pure gmirror after installing the OS I used to install on a single disk then copy the data from the 2second disk to the 1first, then if I remember right used to sync the 2second already used disk to the first making sure I had a full backup in case anything went wrong. Was juggling a bit but it worked well. I found the guide I followed previously with version 10 which worked well.  http://bentoslack.com/freebsd-10-software-raid-1-mirror/ when I get a bit more confidence I'll play and juggle again but for the moment I'm doubly backing up and going it cautiously.


----------

