[SOLVED] Adding USB storage to PVE to use it as a location for taking VM backups

fearz

New Member
Aug 7, 2024
5
0
1
Hi,

I need to mount my USB drive to use it as a destination to take VM backups, how to do that?

I can only see the USB drive if i'm passthrough(ing) to a VM (and I can mount it as well & see the disk drives when using fdisk-l) but I can't see that all on the node..how can I mount it on the PVE host /node itself?

root@muffin:~# lsusb
Bus 002 Device 003: ID 0bda:0415 Realtek Semiconductor Corp. 2-Port USB 3.0 Hub
Bus 002 Device 005: ID 0bc2:5131 Seagate RSS LLC FA GoFlex Pro
Bus 002 Device 004: ID 0bc2:5131 Seagate RSS LLC FA GoFlex Pro
Bus 002 Device 002: ID 0bda:0411 Realtek Semiconductor Corp. Hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 0bda:5415 Realtek Semiconductor Corp. 2-Port USB 2.0 Hub
Bus 001 Device 002: ID 0bda:5411 Realtek Semiconductor Corp. RTS5411 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root@muffin:~#

Thanks!
 
If you mounted your USB drive directly on Proxmox, you must and your USB drive as directory storage with the WebUI. After that it is important that you mark your directory as mountpoint.

Use EXT4 or other Linuxfilesystem for backups, not NTFS or FAT.

--is_mountpoint <string> (default = no)
Assume the given path is an externally managed mountpoint and consider the storage offline if it is not mounted. Using a boolean (yes/no) value serves as a shortcut to using the target path in this field.
 
If i pass through the USB to a VM, can i still have it as a directory for the host? Because i cant and thats why i didn't see the drive, its passed through to a VM.
No, host or VM. It is not possible to do both at the same time. But there are several workarounds.

You can create a share in the VM, and add this share via the storage configuration menu to host.
Or you add the USB drive directly to host and create a share what the VM can mount.
 
Well,

When it was VM exclusive, i added PBS as a VM on the same node, i used to get a lot of I/O errors during backups and i dont have any hardware failures or issues, not sure what caused those errors.

But i may try those workarounds, any links or guides on how to do that?
 
PBS is not built to run on the same host as a VM. However, you can install PBS in addition to Proxmox VE.
https://pbs.proxmox.com/docs/installation.html#install-proxmox-backup-server-on-proxmox-ve

But i may try those workarounds, any links or guides on how to do that?
Have a look at my links above. And this one: https://pve.proxmox.com/pve-docs/pve-admin-guide.html#_storage_types

To find the right solution in the first place, tell me how the whole thing is build. And what the goal should be. Why does this USB HDD have to be passed through to a VM? What is installed on the VM?
 
PBS is not built to run on the same host as a VM. However, you can install PBS in addition to Proxmox VE.
https://pbs.proxmox.com/docs/installation.html#install-proxmox-backup-server-on-proxmox-ve


Have a look at my links above. And this one: https://pve.proxmox.com/pve-docs/pve-admin-guide.html#_storage_types

To find the right solution in the first place, tell me how the whole thing is build. And what the goal should be. Why does this USB HDD have to be passed through to a VM? What is installed on the VM?

I have a VM with plex and other servers that require to have mu USB drive mapped to it, on that same drive i want to take backups of the VM so thats why i installed PBS as a separate VM, do you think its better to install PBS on the hypervisor as mention in the article? Also in the article they mention the PBS client, what is that?

The goal is to have incremental VM backups somewhere on my USB drive which should be used by both the hypervisor and a VM hosted on it.
 
Thanks for the info. Yes, I understand you now.

do you think its better to install PBS on the hypervisor as mention in the article?
Absolutely yes! Even better, of course, if you have your own server. ;)

Also in the article they mention the PBS client, what is that?
This could be used to back up files from machines that are not VMs. Have a look here:
https://pbs.proxmox.com/docs/faq.html#which-platforms-are-supported-as-a-backup-source-client
https://pbs.proxmox.com/docs/installation.html#proxmox-backup-client-only-repository
https://pbs.proxmox.com/docs/backup-client.html


Nevertheless, it would be strictly separated. A dedicated HDD for backups only. That's my recommendation to you. This also makes the whole thing easier to configure and, above all, less susceptible to errors. :cool:
 
Thank you @fireon for everything you provided, i managed to do the following:

- Create an NFS share on a different VM (a VM that I wont backup)
- Pass through the USB drive to it + pass through the same USB drive to the other VM (plex server, etc)
- Install PBS on the same node as PVE
- Add datastore to the NFS mount i created

That way I can backup all other VMs to that NFS -> USB drive mapped to the VM with no I/O errors :)

Thank you!
 
Last edited:

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!