LVM Snapshot script for shared storage LVM over iSCSI only

rustine22

New Member
Jun 9, 2024
1
0
1
Hi,

i have made a script to permit PVE users to do snapshots by SSH on VM node only for VM located on on shared storage LVM over iSCSI Storage (Tests on TrueNas).

What do you think of it ?

Usage: ./pve_iscsi_lvm_snapshot.sh <action> <vmid> [<snapshotname>]
action : Action à effectuer (list, create, delete, revert)
vmid : ID de la machine virtuelle
snapshotname : Nom du snapshot (obligatoire pour action create,delete,revert)


#list snapshot of VM 100
./pve_iscsi_lvm_snapshot.sh list 100

#create snapshot snap1 on VM100
./pve_iscsi_lvm_snapshot.sh create 100 snap1

#delete snapshot snap1 on VM 100 (forget it)
./pve_iscsi_lvm_snapshot.sh delete 100 snap1

#revert to snapshot snap1 on VM 100
./pve_iscsi_lvm_snapshot.sh revert 100 snap1

Best regards
 

Attachments

  • pve_iscsi_lvm_snapshot.zip
    2.7 KB · Views: 3

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!