X-Git-Url: http://git.datanom.net/omvzfs.git/blobdiff_plain/e6fdbbae3c0aeb53b9877ba9983e26a7304c99b0..f6d97ba0aef0419618ef5e36b73b971b55627360:/src/Zvol.php diff --git a/src/Zvol.php b/src/Zvol.php index 496e360..c6fd20d 100644 --- a/src/Zvol.php +++ b/src/Zvol.php @@ -156,6 +156,17 @@ class OMVModuleZFSZvol { $this->size = $this->properties["volsize"]["value"]; } + /** + * Destroy the Zvol. + * + * @return void + * @access public + */ + public function destroy() { + $cmd = "zfs destroy " . $this->name; + $this->exec($cmd,$out,$res); + } + /** * Helper function to execute a command and throw an exception on error * (requires stderr redirected to stdout for proper exception message).