From f6d97ba0aef0419618ef5e36b73b971b55627360 Mon Sep 17 00:00:00 2001 From: Niclas Berglind Date: Wed, 12 Mar 2014 20:34:21 +0100 Subject: [PATCH] Added destroy method to Zvol class. Signed-off-by: Niclas Berglind --- src/Zvol.php | 11 +++++++++++ 1 file changed, 11 insertions(+) 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). -- 2.39.2