Skip to content

Instantly share code, notes, and snippets.

@mrpeardotnet
mrpeardotnet / PVE-host-backup.md
Created December 17, 2019 18:03
Proxmox PVE Host Config Backup Script

Proxmox PVE Host Config Backup Script

This script can be used to backup essential configuration files from the Proxmox Virtual Enivronment (PVE) host.

The script will create backups using tar with specified backup prefix and date and time stamp in the file name. Script will also delete backups that are older then number of days specified.

Create backup script file

To create backup script that will be executed every day we can create backup script in /etc/cron.daily/ folder. We need to make it writeable by root (creator) only, but readable and executable by everyone:

touch /etc/cron.daily/pvehost-backup
@jazzl0ver
jazzl0ver / howto-gfs2-proxmox6.txt
Last active December 28, 2021 00:45
Setup GFS2 shared storage in Proxmox VE 6 on top of iSCSI LUN
#-- there're four proxmox boxes (vm-box-1..vm-box-4)
#-- all commands should be issued on one of the boxes
for i in $(seq 1 4); do ssh vm-box-$i apt install dlm-controld gfs2-utils -y; done
for i in $(seq 1 4); do ssh vm-box-$i 'echo DLM_CONTROLD_OPTS="--enable_fencing 0" >> /etc/default/dlm; systemctl restart dlm'; done
#-- check if /dev/misc folder exists. if not, run:
for i in $(seq 1 4); do ssh vm-box-$i "systemctl stop dlm; rmmod gfs2; rmmod dlm; sleep 3; systemctl restart udev; sleep 3; systemctl start dlm"; done
#-- add iscsi storage to proxmox (check shared)

Installing multipath tools on PVE Cluster with shared storage

This cheatsheet shows how to install and configure multipath tools on Proxmox PVE Cluster where multiple nodes share single storage with multipath configuration, for example SAN storage connected to each of the nodes by two independent paths.

Proxmox PVE version

This cheatsheet has been tested on Proxmox 5.x.

Note about sudo

I do not prepend sudo command to any of commands listed here, but keep in mind that nearly all commands requires su privileges, so use sudo if your account happen to not have root access.