Remove some comments about data loss.
lvresize --force should not cause data loss when reducing because we reduce file system first. vgextend --yes is about overwriting number of metadata copies, so it shouldn't cause data loss either.
This commit is contained in:
parent
cd4a6314e7
commit
68539ad97a
|
@ -399,10 +399,9 @@ bool LvmDevice::createLVSnapshot(Report& report, Partition& p, const QString& na
|
|||
|
||||
bool LvmDevice::resizeLV(Report& report, Partition& p)
|
||||
{
|
||||
//TODO: thorough tests and add warning that it could currupt the user data.
|
||||
ExternalCommand cmd(report, QStringLiteral("lvm"),
|
||||
{ QStringLiteral("lvresize"),
|
||||
QStringLiteral("--force"), // this command could corrupt user data
|
||||
QStringLiteral("--force"),
|
||||
QStringLiteral("--yes"),
|
||||
QStringLiteral("--extents"),
|
||||
QString::number(p.length()),
|
||||
|
@ -415,7 +414,6 @@ bool LvmDevice::removePV(Report& report, LvmDevice& d, const QString& pvPath)
|
|||
{
|
||||
ExternalCommand cmd(report, QStringLiteral("lvm"),
|
||||
{ QStringLiteral("vgreduce"),
|
||||
//QStringLiteral("--yes"), // potentially corrupt user data
|
||||
d.name(),
|
||||
pvPath});
|
||||
|
||||
|
@ -426,7 +424,7 @@ bool LvmDevice::insertPV(Report& report, LvmDevice& d, const QString& pvPath)
|
|||
{
|
||||
ExternalCommand cmd(report, QStringLiteral("lvm"),
|
||||
{ QStringLiteral("vgextend"),
|
||||
//QStringLiteral("--yes"), // potentially corrupt user data
|
||||
QStringLiteral("--yes"),
|
||||
d.name(),
|
||||
pvPath});
|
||||
|
||||
|
|
Loading…
Reference in New Issue