# ZFS add 2 new devices to mirror



## eyebone (Jun 21, 2012)

Hi folks,

*I* have a zfs mirror in my system of two hard drives. *T*hey are capable of 1TB data storage. *N*ow *I* want to add anoter mirror to this mirror to raise the capacity from 1TB to 2TB.

*I* run amd64 9.0, zfs version is 28. 

*I* tried the command [cmd=]zpool add zpool mirror /dev/ada2 /dev/ada3[/cmd] which sounded most reasonable to me. *B*ut *I* get the error message


```
cannot add to 'zpool': root pool can not have multiple vdevs or seperate logs
```

I have seen in several tutorials that there exists a root pool, and then there were a lot of mirror devices added. *I*s it necessary to add a root pool before?

*B*est regards,
 eyebone


----------



## kpa (Jun 21, 2012)

Turn off the bootfs property first, if you have Root on ZFS setup you'll have to do this in a recovery enviroment of some sort, live cd or memory stick.


----------



## Sebulon (Jun 21, 2012)

kpa said:
			
		

> Turn off the bootfs property first, if you have Root on ZFS setup you'll have to do this in a recovery enviroment of some sort, live cd or memory stick.



I think IÂ´ve tested already tested that once and that it didnÂ´t work, unfortunately. If you have set the bootfs-flag, ZFS kinda "remembers" that and still complains:

```
cannot add to 'zpool': root pool can not have multiple vdevs or seperate logs
```

Example without bootfs being set:

```
NAME   PROPERTY  VALUE   SOURCE
pool   bootfs    -       default
```

Example with bootfs set:

```
NAME   PROPERTY  VALUE       SOURCE
pool   bootfs    pool1/root  local
```

As I remember it, you cannot set it back to exactly VALUE -, SOURCE default, which is needed for it to "forget" and stop complaining. I think the closest I got was VALUE -, SOURCE local, and that wasnÂ´t enough. But I am happily proven wrong


@kpa

Do try but IÂ´m not sure it will work.

/Sebulon


----------



## gkontos (Jun 21, 2012)

I have done that many times successfully in order to add cache or log devices.

Let me point out that the procedure never had to occur from a rescue image.

[CMD=""]#zpool set bootfs="" pool[/CMD]
[CMD=""]#zpool set bootfs="pool" pool[/CMD]


----------



## eyebone (Jun 22, 2012)

Thanks! Worked like a charm:


```
#zpool set bootfs="" pool
#zpool add pool mirror /dev/ada2 /dev/ada3
#zpool set bootfs="pool" pool
```

Great!


----------

