]> git.datanom.net - omvzfs.git/blobdiff - src/Dataset.php
Added mount and unmount methods to the Dataset class
[omvzfs.git] / src / Dataset.php
index d6796e59217a55127df9d9aa6fa69095219b2f0b..57e8eddb5e2c77a1d3bf2044ca137fbcf75f3c23 100644 (file)
@@ -191,6 +191,31 @@ class OMVModuleZFSDataset {
                $this->exec($cmd,$out,$res);
        }
 
+       /**
+        * Mount the Dataset
+        *
+        * @return void
+        * @access public
+        */
+       public function mount() {
+               $cmd = "zfs mount " . $this->name . " 2>&1";
+               $this->exec($cmd,$out,$res);
+               $this->updateProperty("mounted");
+       }
+
+       /**
+        * Unmount the Dataset
+        *
+        * @return void
+        * @access public
+        */
+       public function unmount() {
+               $cmd = "zfs unmount " . $this->name . " 2>&1";
+               $this->exec($cmd,$out,$res);
+               $this->updateProperty("mounted");
+       }
+
+
        /**
         * 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.030831 seconds and 5 git commands to generate.