lxd/storage_zfs_utils.go
func zfsPoolVolumeExists(dataset string) (bool, error) {
	output, err := shared.RunCommand(
		"zfs", "list", "-Ho", "name")

	if err != nil {
		return false, err
	}

	for _, name := range strings.Split(output, "\n") {
		if name == dataset {
			return true, nil
		}
	}
	return false, nil
}
func zfsPoolVolumeExists(dataset string) (bool, error) {
	output, err := shared.RunCommand(
		"zfs", "list", "-Ho", "name")

	if err != nil {
		return false, err
	}

	for _, name := range strings.Split(output, "\n") {
		if name == dataset {
			return true, nil
		}
	}
	return false, nil
}
func zfsPoolVolumeExists ( dataset string ) ( bool , error ) { output , err := shared . RunCommand ( " " , " " , " " , " " ) if err != nil { return false , err } for _ , name := range strings . Split ( output , " \n " ) { if name == dataset { return true , nil } } return false , nil }
// zfsPoolVolumeExists verifies if a specific ZFS pool or volume exists.
zfsPoolVolumeExists verifies if a specific ZFS pool or volume exists .