Add LVM PV move.

This commit is contained in:
Chantara Tith 2016-07-04 08:13:26 +07:00
parent e526786d73
commit faa314c87d
2 changed files with 9 additions and 0 deletions

View File

@ -320,6 +320,14 @@ bool LvmDevice::insertPV(Report& report, LvmDevice& dev, const QString& pvPath)
return (cmd.run(-1) && cmd.exitCode() == 0);
}
bool LvmDevice::movePV(Report& report, LvmDevice& dev, const QString& pvPath)
{
Q_UNUSED(dev);
ExternalCommand cmd(report, QStringLiteral("lvm"),
{ QStringLiteral("pvmove"),
pvPath});
return (cmd.run(-1) && cmd.exitCode() == 0);
}
bool LvmDevice::createVG(Report& report, const QString vgname, const QStringList pvlist)
{

View File

@ -67,6 +67,7 @@ public:
static bool removePV(Report& report, LvmDevice& dev, const QString& pvPath);
static bool insertPV(Report& report, LvmDevice& dev, const QString& pvPath);
static bool movePV(Report& report, LvmDevice& dev, const QString& pvPath);
static bool removeVG(Report& report, LvmDevice& dev);
static bool createVG(Report& report, const QString vgname, const QStringList pvlist);