diff --git a/src/core/lvmdevice.cpp b/src/core/lvmdevice.cpp index 2338eba..41e126e 100644 --- a/src/core/lvmdevice.cpp +++ b/src/core/lvmdevice.cpp @@ -198,8 +198,12 @@ qint64 LvmDevice::mappedSector(const QString& lvPath, qint64 sector) const const QStringList LvmDevice::deviceNodes() const { QStringList pvList; - for (const auto &p : physicalVolumes()) - pvList << p->partitionPath(); + for (const auto &p : physicalVolumes()) { + if (p->roles().has(PartitionRole::Luks)) + pvList << static_cast(&p->fileSystem())->mapperName(); + else + pvList << p->partitionPath(); + } return pvList; } @@ -414,8 +418,12 @@ bool LvmDevice::createVG(Report& report, const QString vgName, const QListpartitionPath(); + for (const auto &p : pvList) { + if (p->roles().has(PartitionRole::Luks)) + args << static_cast(&p->fileSystem())->mapperName(); + else + args << p->partitionPath(); + } ExternalCommand cmd(report, QStringLiteral("lvm"), args); diff --git a/src/jobs/resizevolumegroupjob.cpp b/src/jobs/resizevolumegroupjob.cpp index 21cebb1..1c17296 100644 --- a/src/jobs/resizevolumegroupjob.cpp +++ b/src/jobs/resizevolumegroupjob.cpp @@ -41,9 +41,9 @@ bool ResizeVolumeGroupJob::run(Report& parent) for (const auto &p : partList()) { if (type() == ResizeVolumeGroupJob::Grow) - rval = LvmDevice::insertPV(*report, device(), p->partitionPath()); + rval = LvmDevice::insertPV(*report, device(), p->partitionPath()); // FIXME: LUKS else if (type() == ResizeVolumeGroupJob::Shrink) - rval = LvmDevice::removePV(*report, device(), p->partitionPath()); + rval = LvmDevice::removePV(*report, device(), p->partitionPath()); // FIXME: LUKS if (rval == false) break; diff --git a/src/ops/deleteoperation.cpp b/src/ops/deleteoperation.cpp index 551f253..8a9bf59 100644 --- a/src/ops/deleteoperation.cpp +++ b/src/ops/deleteoperation.cpp @@ -126,8 +126,7 @@ bool DeleteOperation::canDelete(const Partition* p) if (p->roles().has(PartitionRole::Luks)) { - const FileSystem& fsRef = p->fileSystem(); - const FS::luks* luksFs = dynamic_cast(&fsRef); + const FS::luks* luksFs = dynamic_cast(&p->fileSystem()); if (!luksFs) return false;