]> git.datanom.net - omvzfs.git/commitdiff
Added upgrade method to Dataset class
authorNiclas Berglind <nb@kjam.se>
Tue, 4 Mar 2014 20:28:08 +0000 (21:28 +0100)
committerMichael Rasmussen <mir@datanom.net>
Tue, 4 Mar 2014 21:52:53 +0000 (22:52 +0100)
Signed-off-by: Niclas Berglind <nb@kjam.se>
src/Dataset.php

index db3a165f848a6f8ee876e774c8bd5e6cf4e37359..d6796e59217a55127df9d9aa6fa69095219b2f0b 100644 (file)
@@ -18,7 +18,8 @@ class OMVModuleZFSDataset {
      * @access private
      */
     private $name;
-    /**
+       
+       /**
      * Mountpoint of the Dataset
      *
      * @var    string $mountPoint
@@ -179,6 +180,17 @@ class OMVModuleZFSDataset {
                $this->updateProperty($property);
        }
 
+       /**
+        * Upgrades the Dataset to latest filesystem version
+        *
+        * @return void
+        * @access public
+        */
+       public function upgrade() {
+               $cmd = "zfs upgrade " . $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.030783 seconds and 5 git commands to generate.