]> git.datanom.net - omvzfs.git/blobdiff - src/Zvol.php
Added destroy method to Zvol class.
[omvzfs.git] / src / Zvol.php
index 496e360feda5e1712c152e5b2c0f9f06e1fe6c4a..c6fd20d5037364e976317fd7a8ad41a0bd205482 100644 (file)
@@ -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).
This page took 0.028266 seconds and 5 git commands to generate.