Hi,
i'm trying to use snapshot on LVM Thick over ISCSi. The snapshot corretly work if the VM is powered OFF, if the VM is powered ON i recieve the following error
Then, if i try to take one other snapshot with the same name
So checking in the shell the img-info i have as output
To fix this i have to use
Then the lvs is still there
and i have to remove it with
The /etc/pve/storage.cfg
Am i missing something? I'm not able to snapshot powered ON VMs.
Thanks
i'm trying to use snapshot on LVM Thick over ISCSi. The snapshot corretly work if the VM is powered OFF, if the VM is powered ON i recieve the following error
Code:
snapshotting 'drive-scsi0' (OS-LVM:vm-111-disk-0.qcow2)
external qemu snapshot
Creating a new current volume with xx as backing snap
Renamed "vm-111-disk-0.qcow2" to "snap_vm-111-disk-0_xx.qcow2" in volume group "OS-LVM-G0"
Rounding up size to full physical extent <120.02 GiB
Logical volume "vm-111-disk-0.qcow2" created.
Formatting '/dev/OS-LVM-G0/vm-111-disk-0.qcow2', fmt=qcow2 cluster_size=131072 extended_l2=on preallocation=metadata compression_type=zlib size=128849018880 backing_file=snap_vm-111-disk-0_xx.qcow2 backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16
blockdev replace current by xx
snapshot create failed: starting cleanup
TASK ERROR: VM 111 qmp command 'blockdev-reopen' failed - Failed to find node with node-name='drive-scsi0'
Then, if i try to take one other snapshot with the same name
Code:
snapshotting 'drive-scsi0' (OS-LVM:vm-111-disk-0.qcow2)
snapshot create failed: starting cleanup
TASK ERROR: error rename vm-111-disk-0.qcow2 to xx - target volume 'snap_vm-111-disk-0_xx.qcow2' already exists
So checking in the shell the img-info i have as output
Code:
root@pve02:~# qemu-img info /dev/OS-LVM-G0/vm-111-disk-0.qcow2
image: /dev/OS-LVM-G0/vm-111-disk-0.qcow2
file format: qcow2
virtual size: 120 GiB (128849018880 bytes)
disk size: 0 B
cluster_size: 131072
backing file: snap_vm-111-disk-0_xx.qcow2 (actual path: /dev/OS-LVM-G0/snap_vm-111-disk-0_xx.qcow2)
backing file format: qcow2
Format specific information:
compat: 1.1
compression type: zlib
lazy refcounts: false
refcount bits: 16
corrupt: false
extended l2: true
Child node '/file':
filename: /dev/OS-LVM-G0/vm-111-disk-0.qcow2
protocol type: host_device
file length: 120 GiB (128869990400 bytes)
disk size: 0 B
To fix this i have to use
Code:
qemu-img rebase -f qcow2 -b "" /dev/OS-LVM-G0/vm-111-disk-0.qcow2
Then the lvs is still there
Code:
lvs | grep snap_vm-111-disk-0
snap_vm-111-disk-0_xx.qcow2 OS-LVM-G0 -wi-a----- <120,02g
and i have to remove it with
Code:
lvremove OS-LVM-G0/snap_vm-111-disk-0_xx.qcow2
Do you really want to remove active logical volume OS-LVM-G0/snap_vm-111-disk-0_xx.qcow2? [y/n]: y
Logical volume "snap_vm-111-disk-0_xx.qcow2" successfully removed.
The /etc/pve/storage.cfg
Code:
lvm: OS-LVM
vgname OS-LVM-G0
base OceanStor:0.0.1.scsi-SHUAWEI_XSG1_2102354CMHTUN29100040001
content rootdir,images
saferemove 0
shared 1
snapshot-as-volume-chain 1
Am i missing something? I'm not able to snapshot powered ON VMs.
Thanks
Last edited: