public Void invoke(File f, VirtualChannel channel) throws IOException { try { NativeZfsFileSystem fs = nativeUtils.getZfsByMountPoint(f); if (fs != null) { return null; // already on ZFS } // nope. create a file system String fullName = rootDataset + '/' + name; listener.getLogger().println("Creating a ZFS file system " + fullName + " at " + f); fs = nativeUtils.createZfs(fullName); fs.setMountPoint(f); fs.mount(); } catch (NativeAccessException ex) { Logger.getLogger(ZFSProvisioner.class.getName()).log(Level.SEVERE, null, ex); } return null; } });
out.println("Creating " + name); hudson = nativeUtils.createZfs(name);