Ask Your Question

Zpool create fails when using Puppet

asked 2014-02-17 10:44:36 -0600

Rob D gravatar image

updated 2014-02-17 10:45:10 -0600

I'm trying to set up a home server with ZFS on Linux (Ubuntu Precise 64-bit Server) and Puppet. I've gotten the ZoL packages installed, but when I use the zpool type to try and create the zpool, I get an error. I've tried using both types of pointers to the block devices (e.g., /dev/sda and /dev/disk/by-id/super-long-disk-id), but I get the same error. However, if I create the zpool manually with sudo zpool create storage raidz2 /dev/sda /dev/sdb /dev/sdd /dev/sde /dev/sdf, it works just fine.

I've seen ... (more)

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2015-02-09 00:43:10 -0600

joshc gravatar image

I'm guessing this is . To be sure, run puppet agent -td and look for the zpool command that puppet executes. Might also try applying this commit to restore puppet's proper behavior:

edit flag offensive delete link more

answered 2014-02-17 16:28:36 -0600

Stefan gravatar image

I cannot verify this but my assumption is that you are defining the raidz parameter as one simple string

 $zpool_disks = "/vdev/vdisk1 /vdev/vdisk2 /vdev/vdisk3 /vdev/vdisk4 /vdev/vdisk5"

which is then passed as one single parameter to the zpool command (which then is not able to find the path) while you should pass an array:

$zpool_disks = [ '/vdev/vdisk1', '/vdev/vdisk2', '/vdev/vdisk3', '/vdev/vdisk4', '/vdev/vdisk5' ]

The provider should now detect this as 5 different disks and pass the paths as individual arguments to the zpool command.

edit flag offensive delete link more


I have tried several different permutations of single and double quotes, strings and arrays, and nothing works.

Rob D gravatar imageRob D ( 2014-02-17 23:41:35 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2014-02-17 10:44:36 -0600

Seen: 189 times

Last updated: Feb 09 '15