lib/zpool.js
function create (opts, cb) {
    //

    "use strict";

    var params = [ 'create', '-f' ];

    /*
     immediately add some options to the create procedure
     done by adding argument -o option=value
     the opts.options parameter is an array of objects, or a single object

     opts.options = { property: String, value: String }

     OR:

     opts.options = [ { property: String, value: String }, { property: String, value: String } ]

     */

    if (opts.options) {
        if (opts.options.length) {
            //opts.options is an array
            for (var x =0; x < opts.options.length; x++) {
                params.push('-o', opts.options[x].property + "=" + opts.options[x].value);
            }
        } else {
            //opts.options is a single object
            params.push('-o', opts.options.property + "=" + opts.options.value);
        }
    }

    if (opts.mountpoint) {
        params.push('-m', opts.mountpoint);
    }

    params.push(opts.name);

    if (opts.devices.length) {
        params = params.concat(opts.devices);
    } else {
        var devices = opts.devices.split(/\s+/);
        params = params.concat(devices);
    }

    zpool(params, cb);
}
function create (opts, cb) {
    //

    "use strict";

    var params = [ 'create', '-f' ];

    /*
     immediately add some options to the create procedure
     done by adding argument -o option=value
     the opts.options parameter is an array of objects, or a single object

     opts.options = { property: String, value: String }

     OR:

     opts.options = [ { property: String, value: String }, { property: String, value: String } ]

     */

    if (opts.options) {
        if (opts.options.length) {
            //opts.options is an array
            for (var x =0; x < opts.options.length; x++) {
                params.push('-o', opts.options[x].property + "=" + opts.options[x].value);
            }
        } else {
            //opts.options is a single object
            params.push('-o', opts.options.property + "=" + opts.options.value);
        }
    }

    if (opts.mountpoint) {
        params.push('-m', opts.mountpoint);
    }

    params.push(opts.name);

    if (opts.devices.length) {
        params = params.concat(opts.devices);
    } else {
        var devices = opts.devices.split(/\s+/);
        params = params.concat(devices);
    }

    zpool(params, cb);
}
/*

Creates a new storage pool containing the virtual devices specified
on the	command	line. The pool name must begin with a letter, and can
only contain alphanumeric characters as well as underscore ("_"),
dash ("-"), and period	(".").

zpool create -f datastore raidz /dev/vdb /dev/vdc /dev/vdd

PARAMS:
opts: {
options: { property: String, value: String } //all extra options you want to set for the new datastore, like quota,... (optional)
OR:
options = [ { property: String, value: String }, { property: String, value: String } ],
mountpoint: String, //Optional, Sets the mount point for the root dataset. The	default	mount point is "/pool" or "altroot/pool" if altroot is specified.
name: String, //must exist, the name of the datastore
devices: String or Array //Must exist, a list or array containing the device paths and things like mirror and raidz. (see example above)
}