# zfs add mirror disk



## rdunkle (May 6, 2012)

This is for FreeBSD 8.3. I had two disks in the pool.

```
NAME                     STATE     READ WRITE CKSUM
	zroot                    DEGRADED     0     0     0
	  mirror-0               DEGRADED     0     0     0
	    gpt/system0          ONLINE       0     0     0
	    5565969487498398351  OFFLINE      0     0     0  was /dev/gpt/system1
```

I was unable to do a replace. 

```
zpool replace zroot gpt/system1
invalid vdev specification
use '-f' to override the following errors:
/dev/gpt/system1 is part of active pool 'zroot'
```

I detached.
Have this now:

```
NAME           STATE     READ WRITE CKSUM
	zroot          ONLINE       0     0     0
	  gpt/system0  ONLINE       0     0     0
```
I have used gpart and created the system1. How do I get it to attach to zroot again? I tried this:

```
zpool attach zroot gpt/system1 /dev/gpt/system1
cannot attach /dev/gpt/system1 to gpt/system1: no such device in pool
```


----------



## usdmatt (May 6, 2012)

You have the last attach command wrong. You are trying to attach system1 to itself...
Should be the disk already in pool you want to attach to, following by the new disk; i.e.


```
zpool attach zroot gpt/system0 gpt/system1
```


----------



## rdunkle (May 6, 2012)

Solved
thanks


----------

