Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Snapshots copy from Linstor to NFS fail

未关闭
#14,011 4 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

@rp- 已经在做这个了。

开始于 2026年8月31日。

  • #14066 来自 @rp- —— 未关闭

评估

这个 Issue 还没有评估数据。

描述

component:kvm type:bug
ISSUE TYPE
  • Bug Report
COMPONENT NAME
Storage - Linstor snapshot
CLOUDSTACK VERSION
4.22.1.0
CONFIGURATION

N/A

OS / ENVIRONMENT
  • Cloudstack 4.22.1.0
  • Hypervisor KVM
  • AlmaLinux 9.8
  • Primary storage: Linstor (LVM-thin)
  • Secondary storage: NFS
SUMMARY

createSnapshot on any volume backed by a Linstor primary storage pool fails 100% of the time with: Failed to create Snapshot due to an internal error creating Snapshot for volume <volume-uuid>.

The failure is deterministic and reproducible on every attempt, regardless of volume, VM, or snapshot name.

First the snapshot is created succesfully on the Linstor backend, but then the copy to NFS (secundairy storage) fails as CloudStack's KVM agent invokes qemu-img convert against a /dev/mapper/... device path that does not match the path the kernel actually created.

Actual device location: /dev/mapper/linstor_pool-lv--thin-cs--12fc4055--3985--4025--8eb5--d6fd53effe37_00000
Path CloudStack looks for: /dev/mapper/linstor_pool-lvm-thin-cs--12fc4055--3985--4025--8eb5--d6fd53effe37_00000_cs--d7aea646--5f40--46a2--b9dc--77e41ea29336

Notice the missing dashes in the linstor_pool-lv--thin-cs-name.

STEPS TO REPRODUCE

Create disk snapshot on a Linstor volume with NFS as secundairy storage and observe the error message.

EXPECTED RESULTS

Snapshot is created on the Linstor backend and successfully copied to secondary (NFS) storage.

ACTUAL RESULTS

The error logged in management-server.log:

ERROR [o.a.c.a.c.u.s.CreateSnapshotCmd] Failed to create Snapshot due to an internal error creating Snapshot for volume 12fc4055-3985-4025-8eb5-d6fd53effe37 java.lang.RuntimeException: Unexpected exception
	at com.cloud.storage.VolumeApiServiceImpl.takeSnapshotInternal(VolumeApiServiceImpl.java:3999)
	at com.cloud.storage.VolumeApiServiceImpl.takeSnapshot(VolumeApiServiceImpl.java:3910)
	...
Caused by: com.cloud.utils.exception.CloudRuntimeException: Exception: org.apache.cloudstack.utils.qemu.QemuImgException
Message: qemu-img: Could not open '/dev/mapper/linstor_pool-lvm-thin-cs--12fc4055--3985--4025--8eb5--d6fd53effe37_00000_cs--d7aea646--5f40--46a2--b9dc--77e41ea29336': Could not open '/dev/mapper/linstor_pool-lvm-thin-cs--12fc4055--3985--4025--8eb5--d6fd53effe37_00000_cs--d7aea646--5f40--46a2--b9dc--77e41ea29336': No such file or directory
Stack: org.apache.cloudstack.utils.qemu.QemuImgException: ...
	at org.apache.cloudstack.utils.qemu.QemuImg.convert(QemuImg.java:495)
	...
	at com.cloud.hypervisor.kvm.resource.wrapper.LinstorBackupSnapshotCommandWrapper.convertImageToQCow2(LinstorBackupSnapshotCommandWrapper.java:99)
	at com.cloud.hypervisor.kvm.resource.wrapper.LinstorBackupSnapshotCommandWrapper.execute(LinstorBackupSnapshotCommandWrapper.java:156)
	...

	at org.apache.cloudstack.storage.snapshot.SnapshotServiceImpl.backupSnapshot(SnapshotServiceImpl.java:475)
	at org.apache.cloudstack.storage.snapshot.DefaultSnapshotStrategy.backupSnapshot(DefaultSnapshotStrategy.java:204)
	at com.cloud.storage.snapshot.SnapshotManagerImpl.backupSnapshotToSecondary(SnapshotManagerImpl.java:1787)
	at com.cloud.storage.snapshot.SnapshotManagerImpl.takeSnapshot(SnapshotManagerImpl.java:1660)
	...

Suggested fix: apply LVM's standard dash-doubling escape to the volume-group name the same way it's already correctly applied to the cs--<uuid> logical-volume/snapshot name portion.

主要语言
Java
星标
3.1k
派生
1.4k
平均合并
6 天 20 小时
30 天内合并 PR
27

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

apache/cloudstack 的其他 Issue

查看 apache/cloudstack 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。