X-Git-Url: http://git.datanom.net/omvzfs.git/blobdiff_plain/3ed7a24053f0123d8d4e18ef313d83d23181de00..b71de6b53716e7c7d2670b88de09aa7db7f4e547:/src/Utils.php diff --git a/src/Utils.php b/src/Utils.php index c7049dc..4ccf60f 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 " . $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.