From 68539ad97a27af86148e2750a3f287c23fd0fa6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Thu, 1 Sep 2016 22:22:46 +0100 Subject: [PATCH] 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. --- src/core/lvmdevice.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/core/lvmdevice.cpp b/src/core/lvmdevice.cpp index 789478c..21a1d18 100644 --- a/src/core/lvmdevice.cpp +++ b/src/core/lvmdevice.cpp @@ -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});