Storage, Backups and Shares

Chieflewus

New Member
Aug 23, 2023
11
1
3
A little background of my setup. Ive got two physical servers…. Proxmox and Truenas. My pve server has an smb share from truenas mounted. I’ve mounted that shared storage in a couple containers and vm’s and don’t have any issues.

The issue I do have is mainly just a concern… if I had to start from scratch would I be able to mount the share to my new pve host, restore vm/container from pbs and everything would be as it was on original host?

This concern comes from something I experienced when I first started out. I had to redo the entire host, restored from pbs backups but when I attached my smb share that had some vm data the vm could not see the data. I believe looking back it was a user issue honestly but I can’t remember exactly what I did or didn’t do correctly in that instance and it’s had me concerned ever since. I think the way I have it configured now I will be safe it would like to get the groups input.

My other question is about backups. I’ve got pbs running in a vm on truenas which in turn syncs to a small little nuc I have. The containers that I have my smb share mounted to failed when I had the box checked to Include the mount in the pbs backup… little research I seen it had to be in suspend mode or stop mode to work.

I believe suspend would be the route to go but I get a failed backup because I’m assuming my tmp folder is not big enough to hold the rsync copy. How can I point that folder to a larger storage location? I have local-ssd (240 GB) and local-zfs (8 TB). I think my temp folder now is pointed to the ssd pool as it has the host installation on it.

Is it even worth including the smb mount point in pbs backups if I have snapshots, cloud backup, etc enabled on the truenas host?
 
> This concern comes from something I experienced when I first started out. I had to redo the entire host, restored from pbs backups but when I attached my smb share that had some vm data the vm could not see the data

Could have been user/file permissions. It's generally a good idea to keep things on the same host as much as possible rather than scattered around all over the place, especially when it comes to network mounts. Keep It Simple.

If you're at all concerned, start documenting and testing your DR procedures before something fails. You should always have something to restore from, and the ability to reproduce a given environment reliably (and hopefully within a certain ETA.)

You may have to invest in a bit more storage, but try restoring your PVE host to a VM. If it's LVM+ext4 root, I have scripts for bare-metal backup and restore. Feel free to provide feedback. (You'll still need the Proxmox installer ISO to recreate the boot disk and LVM setup.)

https://github.com/kneutron/ansitest/tree/master/proxmox
 
if I had to start from scratch would I be able to mount the share to my new pve host, restore vm/container from pbs and everything would be as it was on original host?
if you have everything on pbs, the state of the original host really doesnt matter.

if you wanted to connect your existing datastore, all you'd need to do is to keep a copy of /etc/pve/qemu-server/* as well to be fully redeployable without pbs in the first place; you might need to make some changes to the configurations if the names of the stores/interfaces arent exactly the same.
This concern comes from something I experienced when I first started out. I had to redo the entire host, restored from pbs backups but when I attached my smb share that had some vm data the vm could not see the data.
if you're using your smb shares inside the guest, its not a matter for proxmox; otherwise, its likely just the second comment above.

Is it even worth including the smb mount point in pbs backups if I have snapshots, cloud backup, etc enabled on the truenas host?

hard to answer. what are you using to run pbs? where does it store the backups?
 
> This concern comes from something I experienced when I first started out. I had to redo the entire host, restored from pbs backups but when I attached my smb share that had some vm data the vm could not see the data

Could have been user/file permissions. It's generally a good idea to keep things on the same host as much as possible rather than scattered around all over the place, especially when it comes to network mounts. Keep It Simple.
I don't really have the means to increase space on my PVE server. That's why I was using an SMB share from my separate Truenas server. I can see how that adds some complexity and increased chance of mishap however
If you're at all concerned, start documenting and testing your DR procedures before something fails. You should always have something to restore from, and the ability to reproduce a given environment reliably (and hopefully within a certain ETA.)
I have started documenting much more since this happened. So hopefully I have that covered
You may have to invest in a bit more storage, but try restoring your PVE host to a VM. If it's LVM+ext4 root, I have scripts for bare-metal backup and restore. Feel free to provide feedback. (You'll still need the Proxmox installer ISO to recreate the boot disk and LVM setup.)

https://github.com/kneutron/ansitest/tree/master/proxmox
I will have to give that a try and see how it goes! Thank you!
 
  • Like
Reactions: Kingneutron
if you have everything on pbs, the state of the original host really doesnt matter.

if you wanted to connect your existing datastore, all you'd need to do is to keep a copy of /etc/pve/qemu-server/* as well to be fully redeployable without pbs in the first place; you might need to make some changes to the configurations if the names of the stores/interfaces arent exactly the same.
So If I keep a copy saved somewhere of /etc/pve/qemu-server I should be fine if I had to reinstall the host from scratch? I can understand some configs needing changed as well.
if you're using your smb shares inside the guest, its not a matter for proxmox; otherwise, its likely just the second comment above.



hard to answer. what are you using to run pbs? where does it store the backups?
The smb share is coming from my baremetal truenas server and just attached as a storage device in my proxmox server. As for my PBS I have it running in a VM on my truenas server and it also syncs to a remote pbs installation which I have on a nuc.
 
So If I keep a copy saved somewhere of /etc/pve/qemu-server I should be fine if I had to reinstall the host from scratch?
As long as the original store is added back to PVE, yes.

The smb share is coming from my baremetal truenas server and just attached as a storage device in my proxmox server. As for my PBS I have it running in a VM on my truenas server and it also syncs to a remote pbs installation which I have on a nuc.
If you are presenting PBS to your PVE host as a PBS datastore, whats the purpose of presenting it as an smb share as well?
 
As long as the original store is added back to PVE, yes.


If you are presenting PBS to your PVE host as a PBS datastore, whats the purpose of presenting it as an smb share as well?
I think there is some confusion and I didn't do a very good job of explaining. My smb share is just a shared storage for me to mount to containers and vm's. I'm using it for the couple lxc's and vm's that I need more storage then my pve host has available to it. So I install the os for the lxc/vm on to the pve storage and then mount or attach the shared smb to it either via the gui or cli. I'm not storing any backups on it.

My question/concern was

a) If I needed to restore my pve server from scratch, I would of course restore what I have on my pbs server, re-mount the smb share in the pve gui and then I would be good to go? All data that I had saved on the smb share would be able to be seen/found by the respective vm or lxc?

b) On lxc's that I have that smb mounted to, Should I include it in the pbs backup job? Because when I try to include it the backup fails, Which I think is due to snapshot mode not being able to work under that scenario. I think I need suspend mode, Which that also fails but I believe is because my /tmp directory on my host is not large enough to hold the rsync during the backup. I was curious how best to fix that or if I really needed to include the mount point in the backup as my truenas server is holding a snapshot of it and it's also synced to a cloud storage.
 
a. yes.
b. if you mean to backup your containers AND their network attached content, that isnt an option. your backup task will fail if you try. you need to exclude the directory your remote filesystem is mounted to.
 
a. yes.
b. if you mean to backup your containers AND their network attached content, that isnt an option. your backup task will fail if you try. you need to exclude the directory your remote filesystem is mounted to.
I appreciate your help! I must of read the documentation wrong on the stop/suspend modes for lxc's.
 

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!