Best Way to Use a USB SSD for Proxmox Backups and Network Storage?

Noobie

Member
Aug 4, 2023
32
2
13
Hi everyone,

I have a 2 TB USB SSD that I’d like to use in my Proxmox 9 setup. The goal is to make the SSD available as an network drive via an LXC container, so that:
  • Other LXC containers and virtual machines can access it via SMB and store data,
  • Proxmox backups of containers and VMs are saved directly to this SSD,
  • And in the worst-case scenario (e.g., if Proxmox or the LXC container running the SMB server fails), the SSD can be unplugged and read on a Windows PC.

My questions:
  1. How can I properly mount the USB SSD in Proxmox so it works as a network drive?
  2. What file system should I use to ensure both Proxmox and Windows can access the data in case of emergency (exFAT?)?
  3. Is it a good idea to serve the SSD via SMB from an LXC container, or are there better alternatives?
  4. What do I need to consider, ensuring Proxmox backups are automatically stored on this SSD?

I’d appreciate any tips, best practices, or a step-by-step guide!

Thanks in advance
 
do you have any ideas?
Well..., I probably have nothing you want to hear. But here we go:

  1. How can I properly mount the USB SSD in Proxmox so it works as a network drive?
You don't. PVE is not a generic file server!

There are "hacks" for this. As PVE is Debian you can install any file sharing software you want, e.g. Samba. But again: this is not a task PVE is meant to be used for. And you are leaving a well supported ground for some "unusual" features (on the host) --> getting help gets harder. My recommendation is not to touch the host OS, definitely not as a beginner.

Look for separate products like OpenMediaVault (there are dozens similar out there) and put them into a VM.

  1. What file system should I use to ensure both Proxmox and Windows can access the data in case of emergency (exFAT?)?
Sure, you can use exFAT. Probably I would go for NTFS, if Windows is being used for more than just file transfer. (And I have to mention that there is also https://github.com/openzfsonwindows/openzfs. )

  1. Is it a good idea to serve the SSD via SMB from an LXC container, or are there better alternatives?
There are several options, so this is just an example for a Container: look at https://github.com/bashclub . They offer a bash script to create a Container, install Samba and prepare several things like Snapshots. Those are visible as "Previous versions" from inside Windows.

  1. What do I need to consider, ensuring Proxmox backups are automatically stored on this SSD?
From my pov a physical media may contain data or backups. Not both.

If you do not want to build a PBS (which is definitely my recommendation) then use some (= more than one!) used harddisks and run vzdump-based backups in a round-robin fashion. (For that approach rotating rust is fast enough; for a PBS it is not.)


All of the above may or may not fit to your situation, it really depends on what you want to achieve, how reliable it needs to be (ZFS with redundancy, a cluster instead of a single node, multiple PBS's, ...) and how much effort you are willing to spend - both monetary and time wise.

The most important bit: know your expectation and have fun! :)
 
  • Like
Reactions: news
Hi @UdoB

Thank you very much for your detailed message.

Perhaps I didn't express myself quite correctly. My idea is to create an LXC to which the USB SSD is connected. The USB SSD should be shared via Samba.

When a backup is created from containers or virtual machines, it should be stored on this USB SSD. In other words, the network hard drive would be integrated into the hard drives in Proxmox as a network drive.

Will that work?
 
My idea is to create an LXC to which the USB SSD is connected. The USB SSD should be shared via Samba.

When a backup is created from containers or virtual machines, it should be stored on this USB SSD. In other words, the network hard drive would be integrated into the hard drives in Proxmox as a network drive.

Will that work?
Sure, why not?

I have no finished cookbook/recipe for you, there are way too many possibilities. Incomplete steps may include:
  • mount the SSD "somewhere", make sure it is persistent
  • integrate its mountpoint as a normal Storage via Datacenter --> Storage --> Add Directory; make sure to select "Container" (I believe) for the Content type
  • build an LXC with Samba
  • add a fresh mountpoint to it, using the newly established datastore
  • configure Samba
  • add another Datastore via Datacenter --> Storage --> Add SMB/CIFS; make sure to select "Backup" for the Content type
  • create Backup jobs...
Disclaimer: maybe the steps are wrong or maybe I am oversimplifying - I have zero constructions of this kind - but I have four PBS ;-)

To create backups you could skip the network part, it just complicates the architecture and slows down things. A Directory can store "Content: Backup"!

But hey, you can build what you want :-)
 
Last edited:
Sure, why not?

I have no finished cookbook/recipe for you, there are way too many possibilities. Incomplete steps may include:
  • mount the SSD "somewhere", make sure it is persistent
  • integrate its mountpoint as a normal Storage via Datacenter --> Storage --> Add Directory; make sure to select "Container" (I believe) for the Content type
  • build an LXC with Samba
  • add a fresh mountpoint to it, using the newly established datastore
  • configure Samba
  • add another Datastore via Datacenter --> Storage --> Add SMB/CIFS; make sure to select "Backup" for the Content type
  • create Backup jobs...
Yes, that's what I had in mind.


To create backups you could skip the network part, it just complicates the architecture and slows down things. A Directory can store "Content: Backup"!

But hey, you can build what you want :-)
What exactly do you mean? Should it be a partition on the USB SSD? In simple terms, that you have two partitions on the USB SSD (one for Samba and one for backup)? It's important to me that, in the worst case scenario, you can remove the USB SSD and read it on a Windows computer.
 
What exactly do you mean? Should it be a partition on the USB SSD?
There is no mentioning of partitioning from my side in this discussion. We mentioned already an existing filesystem, be it exFAT/NTFS/ZFS/whatever. You need to mount that filesystem somewhere.

My second bullet point is "...via Datacenter --> Storage --> Add Directory". You can select "Content: Backup" in this very dialog. Then you can store... backups there - without the need of a network filesystem.

Just try it! Learning by doing might be quicker than formulating questions which require work on so many levels at the same time - from hardware HDDS/SSD to filesystems to mounting to integrating into PVE to using it. And then there is the chance that the reader (me!) misinterprets things ;-)

In any case: have fun!