# Added disks the wrong way, how do I fix it?



## crazychip (Jul 24, 2012)

Hi. I have a raidz with two disks that I have restored a backup to and started using. The intention was that when the next two disk that I had ordered arrived I would add them.
Problem is that once I got the next two disks I did this:
`# zpool add -f storage ada1 ada3`

That seemed to work like I wanted, but checking the zpool status I instantly realize that there should probably have been a raidz in that command somewhere.

```
pool: storage
 state: ONLINE
 scan: none requested
config:

        NAME        STATE     READ WRITE CKSUM
        storage     ONLINE       0     0     0
          raidz1-0  ONLINE       0     0     0
            ada0    ONLINE       0     0     0
            ada2    ONLINE       0     0     0
          ada3      ONLINE       0     0     0
          ada1      ONLINE       0     0     0

errors: No known data errors
```

Trying to remove them I get this:

```
# zpool remove storage ada3 ada1
cannot remove ada3: only inactive hot spares, cache, top-level, or log devices can be removed
cannot remove ada1: only inactive hot spares, cache, top-level, or log devices can be removed
```


----------



## SirDice (Jul 24, 2012)

crazychip said:
			
		

> I have a raidz with two disks


RAID-Z requires a minimum of three disks to be effective.


----------



## crazychip (Jul 24, 2012)

I know, but it only requires a minimum of two disks to be created. And since I knew that two more disk was on their way I just went ahead and made the raidz with two. (planning on adding the two other disks to it once they arrived.)


----------



## SirDice (Jul 24, 2012)

You can't add the new disks to the existing RAID set. You can create a new RAID set and add them to the pool. 

I'd backup all data and recreate the RAID set with all four drives.


----------



## usdmatt (Jul 24, 2012)

You cannot add more disks to an existing vdev, you can only add more vdevs. You can also not remove any disks from a vdev, or remove a (storage) vdev. The only exception is that you can 'detach' a disk from a 2/3/N way mirror, even going as far as to turn it back into a single disk vdev and 'attach' to make a single disk into 2/3/N way mirror.

If you hadn't gone straight in with the -f, you would of got the following warning:
(Seriously, don't use -f unless you try something that gives an error/warning and you intentionally want to override it)


```
invalid vdev specification
use '-f' to override the following errors:
mismatched replication level: pool uses raidz and new vdev is disk
```

The easiest thing is to move the data off onto another disk (USB for example, if you have one) and recreate the pool with all 4 disks. You could do it with just the 4 disks (if your data will fit on one of them) but it's a bit more hassle.


----------



## crazychip (Jul 24, 2012)

Luckily I have been working with faults on this servers ZFS for a while now so I have a 2TB NAS drive that I am borrowing from a friend. I will take a new backup to that and destroy/recreate the pool with all four disks.


----------

