Changing from LVM o directory

Shadi Khosravi

New Member
Jul 31, 2019
3
0
1
33
Hello all,
I'm kinda new in proxmox. I installed it nearly 3 months ago using some tutorials and I made some VMs and using it ever since. Love the product. My problem is that I have 2 hard drives on my server one is near 60 Gb and the other one is 1.63 Tb. When I was installing it I chose the small one as my installation point (don't know why I did it!) and later on I added the other hard drive to be able to use it for my VMs as LVM (again for no specific reason, I just read it is better to add it as LVM). Now the problem is I need to schedule backups of my VMs in the same server but of course I can't use the LVM hard drive and the other hard drive is too small since only 16 Gb of it is covered in root and the rest is LVM thin! What I wanted to do was to shrink my second hard drive to lets say half (because my VMs are using it and I have nextcloud and gitlab running there so they need space for their files) and use the other half as a place to store my backups every night. But how can I do that without wiping out everything I configured so far?
I would really appreciate your help on this!
Regards
 
HI,
since you have a LVM, you could simply create a new LV named backup in the VG, format it with a file system of your choice and mount it on the host (maybe add an entry for it in the fstab to auto mount on boot). Then you can add it as directory based storage and preform backups to it.
But note that your backup strategy will not save you from disk failure if VM images and backups are on the same disk. An off site backup is recommended.
 
Thank you for the answer. Can you please give me a link that helps me through the steps? I found the following link myself but I just wanted to be sure I follow the correct steps.
https://pve.proxmox.com/wiki/Logical_Volume_Manager_(LVM)
You could follow the steps in section "Creating an extra LV for /var/lib/vz", but with another mount point instead of /var/lib/vz, e.g. /mnt/backup https://pve.proxmox.com/wiki/Logica...r_tt_span_class_monospaced_var_lib_vz_span_tt
For this to work you will have to adapt the LV name and VG/pool according to your wishes and setup as well.
 
Thank you very much for the help.
I was just wondering, can I add another proxmox node to my current one and create a cluster and then use the directory storage on the second one to back up the VMs on my first proxmox node?
 
Thank you very much for the help.
I was just wondering, can I add another proxmox node to my current one and create a cluster and then use the directory storage on the second one to back up the VMs on my first proxmox node?
For such a situation it might be better to setup a samba/NFS share on the host where you want to store the backups and use the corresponding storage backend PVE offers, see https://pve.proxmox.com/pve-docs/pve-admin-guide.html#storage_cifs
 

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!