X-Git-Url: http://git.datanom.net/omvzfs.git/blobdiff_plain/bcf5fe520db7b8e44012d46856011752918196f5..HEAD:/src/Utils.php?ds=sidebyside diff --git a/src/Utils.php b/src/Utils.php index c7049dc..43a83b1 100644 --- a/src/Utils.php +++ b/src/Utils.php @@ -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 -s " . $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.