From: Niclas Berglind Date: Wed, 12 Mar 2014 19:34:21 +0000 (+0100) Subject: Added destroy method to Zvol class. X-Git-Url: http://git.datanom.net/omvzfs.git/commitdiff_plain/f6d97ba0aef0419618ef5e36b73b971b55627360 Added destroy method to Zvol class. Signed-off-by: Niclas Berglind --- 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).