# Adding a new software raid



## EverydayDiesel (Mar 28, 2018)

Hello,  I have (4) drives, (2) raid 1 configured in the intel bios.

I installed the os on the first (2) drives (raid 1)

This is what I have done

```
gpart create -s gpt raid/r1
gpart add -t freebsd raid/r1
```


```
mount -t freebsd /dev/raid/r1s1 /mnt/data
mount: /dev/raid/r1s1: Operation not supported by device
```


```
gpart show
=>       63  463888321  raid/r0  MBR  (221G)
         63          1           - free -  (512B)
         64  463470592        1  freebsd  [active]  (221G)
  463470656     417728           - free -  (204M)

=>        0  463470592  raid/r0s1  BSD  (221G)
          0  455081984          1  freebsd-ufs  (217G)
  455081984    8388607          2  freebsd-swap  (4.0G)
  463470591          1             - free -  (512B)

=>       40  927985584  raid/r1  GPT  (442G)
         40  927985584        1  freebsd  (442G)
```



```
graid status
   Name   Status  Components
raid/r0  OPTIMAL  ada0 (ACTIVE (ACTIVE))
                  ada1 (ACTIVE (ACTIVE))
raid/r1  OPTIMAL  ada2 (ACTIVE (ACTIVE))
                  ada3 (ACTIVE (ACTIVE))
```

Can someone please tell me what I am missing.  Thanks in advance.


----------



## EverydayDiesel (Mar 28, 2018)

*newfs -U /dev/raid/r1s1*
was the answer.


----------



## SirDice (Mar 29, 2018)

No, no. You're installing in a slice. Instead of using MBR I recommend using GPT. If you do want to use MBR you should create partitions inside the slice. Then use the partitions.


```
MBR
     In this example, we will format ada0 with the MBR scheme and create a
     single partition which we subdivide using a traditional BSD disklabel.

     First, we create the partition table and a single 64 GB partition, then
     we mark that partition active (bootable) and install the first-stage boot
     loader:

           /sbin/gpart create -s MBR ada0
           /sbin/gpart add -t freebsd -s 64G ada0
           /sbin/gpart set -a active -i 1 ada0
           /sbin/gpart bootcode -b /boot/boot0 ada0

     Next, we create a disklabel in that partition ("slice" in disklabel
     terminology) with room for up to 20 partitions:

           /sbin/gpart create -s BSD -n 20 ada0s1

     We then create an 8 GB root partition and a 4 GB swap partition:

           /sbin/gpart add -t freebsd-ufs -s 8G ada0s1
           /sbin/gpart add -t freebsd-swap -s 4G ada0s1

     Finally, we install the appropriate boot loader for the BSD label:

           /sbin/gpart bootcode -b /boot/boot ada0s1
```
From gpart(8)


----------

