]> git.datanom.net - omvzfs.git/commitdiff
Added destroy method to Zvol class.
authorNiclas Berglind <nb@kjam.se>
Wed, 12 Mar 2014 19:34:21 +0000 (20:34 +0100)
committerMichael Rasmussen <mir@datanom.net>
Wed, 12 Mar 2014 22:50:52 +0000 (23:50 +0100)
Signed-off-by: Niclas Berglind <nb@kjam.se>
src/Zvol.php

index 496e360feda5e1712c152e5b2c0f9f06e1fe6c4a..c6fd20d5037364e976317fd7a8ad41a0bd205482 100644 (file)
@@ -156,6 +156,17 @@ class OMVModuleZFSZvol {
                $this->size = $this->properties["volsize"]["value"];
        }
 
                $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).
        /**
         * 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.034001 seconds and 5 git commands to generate.