L
lechup
Guest
I'm trying to overcome I/O performance problems when backup and image store is on the same PV (I guess snapshot LV is a problem). I've created LV in ramdisk, and use such crontabbed script to backup image files saved on /dev/pve/data:
Now I do not have performance I/O issues while backuping, but I would rather to use vzdump tool.
I didin't find simple way to set details of how to create snapshot LVs - Am I missing something obvious?
Maybe hook script is the right place to look at? I've skimmed it just once but found bash/rsync way simpler to implement for now...
Code:
# setup PV and LV
vgextend pve /dev/ram0
vgextend pve /dev/ram1
lvcreate -L 984MB -s pve/data -n ramsnap /dev/ram0 /dev/ram1
mount /dev/pve/ramsnap /backup/ramsnap
# backup
mkdir /backup/vm/$BACKUP_ID
rsync -rv /backup/ramsnap/ /backup/vm/$BACKUP_ID/
# clear
umount /backup/ramsnap
lvremove /dev/pve/ramsnap -f
Now I do not have performance I/O issues while backuping, but I would rather to use vzdump tool.
I didin't find simple way to set details of how to create snapshot LVs - Am I missing something obvious?
Maybe hook script is the right place to look at? I've skimmed it just once but found bash/rsync way simpler to implement for now...