zfs.go
func CreateVolume(name string, size uint64, properties map[string]string) (*Dataset, error) {
	args := make([]string, 4, 5)
	args[0] = "create"
	args[1] = "-p"
	args[2] = "-V"
	args[3] = strconv.FormatUint(size, 10)
	if properties != nil {
		args = append(args, propsSlice(properties)...)
	}
	args = append(args, name)
	_, err := zfs(args...)
	if err != nil {
		return nil, err
	}
	return GetDataset(name)
}
func CreateVolume(name string, size uint64, properties map[string]string) (*Dataset, error) {
	args := make([]string, 4, 5)
	args[0] = "create"
	args[1] = "-p"
	args[2] = "-V"
	args[3] = strconv.FormatUint(size, 10)
	if properties != nil {
		args = append(args, propsSlice(properties)...)
	}
	args = append(args, name)
	_, err := zfs(args...)
	if err != nil {
		return nil, err
	}
	return GetDataset(name)
}
func CreateVolume ( name string , size uint64 , properties map [ string ] string ) ( * Dataset , error ) { args := make ( [ ] string , 4 , 5 ) args [ 0 ] = " " args [ 1 ] = " " args [ 2 ] = " " args [ 3 ] = strconv . FormatUint ( size , 10 ) if properties != nil { args = append ( args , propsSlice ( properties ) ... ) } args = append ( args , name ) _ , err := zfs ( args ... ) if err != nil { return nil , err } return GetDataset ( name ) }
// CreateVolume creates a new ZFS volume with the specified name, size, and
// properties.
// A full list of available ZFS properties may be found here:
// https://www.freebsd.org/cgi/man.cgi?zfs(8).
CreateVolume creates a new ZFS volume with the specified name size and properties . A full list of available ZFS properties may be found here : https : // www . freebsd . org / cgi / man . cgi?zfs ( 8 ) .