LVM Snapshot script for shared storage LVM over iSCSI only

Thanks for sharing as it may be useful for anybody (we don't use iscsi yet).
 
@rustine22 a comment and a question for you.. first off thank you very much for an English version of the script, i say that as when i tried to use the original script that was created, i tried to do a translation of that script into English and for some reason when i did that it messed up something in the script so when i ran it it caused an error. when i ran the new version with the translation it worked like it was suppose too. that brings me to my question. where does this script "save" the snapshots? on the local machine or on the ISCSI share?

TIA
 
Hi, the snapshot is stored on the iscsi share. In fact, this is the snapshot feature of lvm, and lvm is over iscsi.
 
is there a place to view them in the GUI so that if i need to revert to that snapshot i can do so? or is this just for the command line?
 
No sorry, it's just a proof of concept. I don't know pve enough to integrate this feature in gui.
 
this script is unfortunately rather dangerous, as it has no guards whatsoever against
- concurrent modifications of the VG on other cluster nodes
- concurrent actions on the VM itself (migration, backup, config changes)

both could lead to issues such as data loss, failed PVE tasks/actions and leftover volumes
 
this script is unfortunately rather dangerous, as it has no guards whatsoever against
- concurrent modifications of the VG on other cluster nodes
- concurrent actions on the VM itself (migration, backup, config changes)

both could lead to issues such as data loss, failed PVE tasks/actions and leftover volumes

Any plans on introducing a cluster aware iSCSI implementation?
 
  • Like
Reactions: Johannes S
you can already use iSCSI in different forms, but snapshots currently require a storage plugin that can talk to the iscsi box to do the snapshots there (like our own zfs-over-iscsi plugins, or some external ones).
 
  • Like
Reactions: Johannes S
this script is unfortunately rather dangerous, as it has no guards whatsoever against
- concurrent modifications of the VG on other cluster nodes
- concurrent actions on the VM itself (migration, backup, config changes)

both could lead to issues such as data loss, failed PVE tasks/actions and leftover volumes
I Fabian,

I have about the same need: I would like to be able to make snapshots of VMs stored on an shared LVM volume hosted on an NVME-of appliance.

I'm not sure to understand why it would be so dangerous to use LVM snapshots: you're talking about simultaneous changes to the VG, but this is already the case, for example, when two nodes create VM on the same LVM shared storage, isn't it?
Could you clarify this for me?

Regards,
Freddy
 
I Fabian,

I have about the same need: I would like to be able to make snapshots of VMs stored on an shared LVM volume hosted on an NVME-of appliance.

I'm not sure to understand why it would be so dangerous to use LVM snapshots: you're talking about simultaneous changes to the VG, but this is already the case, for example, when two nodes create VM on the same LVM shared storage, isn't it?
Could you clarify this for me?

Regards,
Freddy

for volume allocations (and similar actions), PVE takes care via locking that only one such action takes place across the cluster at any given time, and that works in practice, since those actions don't block guest I/O like snapshot handling would need to.