]> git.datanom.net - omvzfs.git/blobdiff - src/Utils.php
Create GPT label before creating/expanding pools.
[omvzfs.git] / src / Utils.php
index c7049dc752a570042ac2cb799e15db8ea689f2c3..4ccf60f8f58b776dbcd48814d51ae7419040bb5f 100644 (file)
@@ -11,6 +11,16 @@ require_once("Zpool.php");
  */
 class OMVModuleZFSUtil {
 
+       /**
+        * Sets a GPT label on a disk to prevent the zpool command from generating
+        * errors.
+        *
+        */
+       public static function setGPTLabel($disk) {
+               $cmd = "parted " . $disk . " mklabel gpt 2>&1";
+               OMVModuleZFSUtil::exec($cmd,$out,$res);
+       }
+
        /**
         * Manages relocation of ZFS filesystem mountpoints in the OMV backend.
         * Needed when the user changes mountpoint of a filesystem in the GUI.
This page took 0.029354 seconds and 5 git commands to generate.