# ZFS stripe volume mirroring



## jspicijaric (Apr 19, 2012)

Is it not possible to replace a stripe set of disks by adding a mirror with a single 
larger disk then the striped pair?  

```
# zpool status
  pool: rpool
 state: ONLINE
 scan: none requested
config:

        NAME                                     STATE     READ WRITE CKSUM
        zpool_amdsqluat                          ONLINE       0     0     0
          c3t600A0B800075F5FF00004E864F1D1F20d0  ONLINE       0     0     0
          c3t600A0B800075F5FF00004E884F1D1F56d0  ONLINE       0     0     0

errors: No known data errors
```
Tried this

```
# zpool add -n  zpool_amdsqluat mirror  c3t600A0B800049C92700000FE34BA3A878d0
invalid vdev specification: mirror requires at least 2 devices
```

The one LUN is bigger then the 2 small LUN


----------



## kpa (Apr 20, 2012)

You can turn one unmirrored disk into a mirror with zpool attach but I don't think you can replace a vdev completely.


----------



## Sebulon (Apr 20, 2012)

I think itÂ´s kind of cool that Solaris (or derivative) users comes to FreeBSD forums to ask about ZFS

@jspicijaric

Once a vdev is created, it is set in stone and cannot be deleted again. But, if I understood you correctly, this is what you want:

`# zpool replace rpool c3t600A0B800075F5FF00004E884F1D1F56d0 c3t600A0B800049C92700000FE34BA3A878d0`
Wait for resilver, and then:
`# zpool detach rpool c3t600A0B800075F5FF00004E864F1D1F20d0`

/Sebulon


----------



## kpa (Apr 20, 2012)

I don't think that is going to work. As far as I know you can't break a striped pool back to smaller pieces, at least I couldn't when I tested on VBox with a pool of two disks striped. I tried both remove and detach on one disk but zpool(8) wouldn't let me do anything that would remove the disk from the pool.


----------



## Sebulon (Apr 20, 2012)

@kpa

Ahh shit, youÂ´re right.

@jspicijaric

My bad, I read wrong. ThatÂ´s going to fail. I thought it was a mirror vdev. Sorry!

/Sebulon


----------



## kpa (Apr 20, 2012)

The best you can do in this case is to replace the smaller disks with larger ones (*zpool replace*) and expand the pool with two additional disks into a pool with two 2-disk mirrors (*zpool attach*), that's about the only way I can think of if you want your pool to have redundancy.


----------

