Skip to content

Instantly share code, notes, and snippets.

View maunicmer's full-sized avatar

Mauro Mercuri maunicmer

  • Buenos Aires, Argentina
View GitHub Profile
openssl x509 -in fullchain.pem -text
#!/bin/bash
DOMAIN="test"
TIMESTAMP=`date +%s`
SNAPSHOT_NAME=$TIMESTAMP
VM_FOLDER="/path/to/vms"
SNAPSHOT_FOLDER="`echo $VM_FOLDER`/`echo $DOMAIN`/snapshots/`echo $TIMESTAMP`"
mkdir -p $SNAPSHOT_FOLDER
MEM_FILE="`echo $SNAPSHOT_FOLDER`/mem.qcow2"
# Check disk space before
df -h
# Delete local-lvm storage in gui
lvremove /dev/pve/data
lvresize -l +100%FREE /dev/pve/root
resize2fs /dev/mapper/pve-root