# unable to create zfs pool



## vasechka (Jul 20, 2009)

Hi,

 I've got FreeBSD 7.2-Stable. I Have 24 drives (/dev/da0- /dev/da23) which I want to add to zfs pool. When I run command 

`# zpool create tank raidz da0 da1 da2 da3 da4 da5 da6 da7`

I get an error: 


```
cannot create 'tank': invalid argument for this pool operation
```


When I use -n option to create, I get expected result. What am I doing wrong? 

`# zpool create -n tank raidz da0 da1 da2 da3 da4 da5 da6 da7`
would create 'tank' with the following layout:

```
tank
          raidz1
            da0
            da1
            da2
            da3
            da4
            da5
            da6
            da7
```

Thanks.


----------



## Business_Woman (Jul 20, 2009)

Hm, 

Are you sure you want `da`? 
da's are direct access drives, like usb sticks and such. Ata drives are named ad


----------



## vasechka (Jul 20, 2009)

Yes, I'm pretty sure:


```
da0 at twa0 bus 0 target 0 lun 0
da1 at twa0 bus 0 target 1 lun 0
da2 at twa0 bus 0 target 2 lun 0
da3 at twa0 bus 0 target 3 lun 0
da4 at twa0 bus 0 target 4 lun 0
da5 at twa0 bus 0 target 5 lun 0
da6 at twa0 bus 0 target 6 lun 0
da7 at twa0 bus 0 target 7 lun 0
da8 at twa0 bus 0 target 8 lun 0
da9 at twa0 bus 0 target 9 lun 0
da10 at twa0 bus 0 target 10 lun 0
da11 at twa0 bus 0 target 11 lun 0
da12 at twa0 bus 0 target 12 lun 0
da13 at twa0 bus 0 target 13 lun 0
da14 at twa0 bus 0 target 14 lun 0
da15 at twa0 bus 0 target 15 lun 0
da16 at twa0 bus 0 target 16 lun 0
da17 at twa0 bus 0 target 17 lun 0
da18 at twa0 bus 0 target 18 lun 0
da19 at twa0 bus 0 target 19 lun 0
da20 at twa0 bus 0 target 20 lun 0
da21 at twa0 bus 0 target 21 lun 0
da22 at twa0 bus 0 target 22 lun 0
da23 at twa0 bus 0 target 23 lun 0
```


----------



## vasechka (Jul 20, 2009)

forgot to mention, i have 7.2-stable on amd64.


----------



## phoenix (Jul 20, 2009)

And if you try with a name other than *tank*, what happens?  Does it give the same error?

Are any of the drives listed currently in use anywhere in the system?


----------



## vasechka (Jul 20, 2009)

phoenix said:
			
		

> And if you try with a name other than *tank*, what happens?  Does it give the same error?
> 
> Are any of the drives listed currently in use anywhere in the system?



I tried any other name - same error message. 

No, drives are not used by the system.


----------



## danger@ (Jul 20, 2009)

da* devices may be also SCSI drives.


----------



## DutchDaemon (Jul 20, 2009)

Business_Woman said:
			
		

> Are you sure you want `da`?
> da's are direct access drives, like usb sticks and such.



And SCSI drives ... which are not uncommon


----------



## danger@ (Jul 20, 2009)

They actualy can be used -- you already have a RAID controller on your system - twa(4). I am not sure whether it is allowed to acces the drives directly through /dev/da* in this case...


----------



## phoenix (Jul 20, 2009)

*@danger@:*  If the drives are configured as Single Drive (as opposed to JBOD, Spare, or part of a RAID array) via the 3Ware controller, then they will appear to the OS as individual drives.  This is how we configure our 3Ware cards in our ZFS storage pools.

Doing things this way allows for the use of the management features of the RAID controller, as well as the onboard cache of the controller, and the controller does better queuing and what not.

If the drives are configured as part of a hardware RAID array, then they will appear as *twadX* where X is the "drive" (actually unit/array) number.

Just for clarification.  

*@vasechka:* Do you get the same error if you try to create a mirror vdev instead of a raidz vdev?  For example:
`# zpool create tank mirror da4 da5`

Or, if you use only some of the disks?  For example:
`# zpool create tank raidz da6 da5 da4`

Are there any messages in /var/log/messages or dmesg output?

Also, what's the output of *zpool status* or *zpool list*?  Just to be sure that "tank" isn't already created or similar.


----------



## vasechka (Jul 21, 2009)

@phoenix:

You're right - I'm using single disk on 3ware 9650SE controller. 


```
# zpool create tank mirror da4 da5
cannot create 'tank': invalid argument for this pool operation
```


and here is what makes me wonder, after I ran the command:

```
# zpool status
internal error: out of memory
# zpool list
internal error: out of memory
```


I have an amd64 - so didn't do any fine tuning for the zfs, as recommended and have 4Gig memory in the system. 

I'm rebuilding world again, just to see if that will bring me somewhere, as I might have older z* utilities from 7.2-RELEASE...


----------



## vasechka (Jul 21, 2009)

stupid me. for some reason, I did makeworld, but never managed to install it - that' the reason why I was getting those strange error messages. 

Thanks for help.


----------

