]> git.datanom.net - omvzfs.git/blobdiff - src/Dataset.php
Added method to promote a cloned Dataset.
[omvzfs.git] / src / Dataset.php
index 253909c4d6f06694ce359e4da729be32723c44f9..d60fd069553dfdf3afde121fb867344d3d14bc91 100644 (file)
@@ -322,6 +322,19 @@ class OMVModuleZFSDataset {
                }
        }
 
+       /**
+       * Promotes the Dataset if it's a clone.
+       *
+       * @return void
+       * @access public
+       */
+       public function promote() {
+               if ($this->isClone()) {
+                       $cmd = "zfs promote " . $this->name . " 2>&1";
+                       $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.028399 seconds and 5 git commands to generate.