Store VM application data locally vs in a NAS

nununo

New Member
Jul 24, 2019
10
0
1
51
Hello,

I'm new to Proxmox and am still confused on where to store each VM's application data.

I've read a lot of threads here but most of them focus on storing the actual VM files while I'm interested in where to store each application's specific data.

Example of the data I want to store:
  • DokuWiki's files
  • GitLab's content
  • NextCloud files
I run Proxmox on an Intel NUC with 1Tb SSD and also have a Synology NAS with 6Tb in RAID.

The options currently on my mind:

1. Create one shared folder per VM in Synology, mount it via NFS and configure the application to store its data in that mounted folder:
- All application data will be stored in Synology and automatically backed up when I backup Synology data;
- I will also have an NFS shared folder mounted at Proxomox host which I'll use for VM backup.

2. Have all application data stored locally:
- Each VM's installation is much simpler because I can use out-of-the-box Turnkey LXC unprivileged containers with their default configuration
- I will have to configure each application to somehow backup its data to a Synology backups shared folder
- I will still have an NFS shared folder mounted at Proxomox host which I'll use for VM backup.
- This is ok for most applications but for NextCloud... I probably would have to add extra local storage to my Proxmox server
- Since my Proxmox server has just one SSD drive... I won't be taking advantage of my NAS's RAID to protect my data (except for the VM backups of course)

I've been experimenting with the 1st approach but I'm not sure this is the right way to do it.
Also, I was told that I should consider using iSCSI but I don't know how that would fit the picture here.

Any suggestions, advice and links to enlighten me on this are welcome.

Thanks in advance,
Nuno
 
You can add your NFS share (from your NAS) as a storage in PVE, then place your VMs drives on there directly. A common setup would also be to just store your VMs locally (on the fast SSD), don't set up an "application data" backup at all and simply back up the entire VM regularly via a backup task. A PVE backup contains the entire disk image, thus also all application data like stored files in Nextcloud etc...
 
  • Like
Reactions: nununo
The way I have nextcloud configured is that it runs on a vm inside of proxmox using local node storage. I then setup a samba share on one of my NAS systems and then mounted said share directly in nextcloud. I have another NAS that holds the backup of the VM so should I need to restore it's easy to get the VM running again. I also have another NAS that holds a backup copy of the data share for nextcloud.
 
  • Like
Reactions: nununo
(...) don't set up an "application data" backup at all and simply back up the entire VM regularly via a backup task (...)

Hum... I see... but if I'd want to keep several versions (daily/weekly/monthly) versions of all my VMs I'd be using more space than I currently have, right?

And I think I'd be uncomfortable without having "application data" backups (maybe because using an hypervisor is still new to me).

Thanks,
Nuno
 
(...) I then setup a samba share on one of my NAS systems and then mounted said share directly in nextcloud. (...)

I tried that approach and at the time but the shared folder would be mounted bellow each users' root. This way, all users would share it alike, which is not what I want.

While I want that shared folder to be the global NextCloud root and then create one folder per user underneath it so that each user has his own private folder. Did you find a way to achieve this through the NextCloud UI?

Thanks,
Nuno
 
Hi all

Keep things simple.

If local PVE storage is SSD use it to run VM and application inside VM.
Connect the NAS with CIFS share to PVE as a backup destination to backup the VM’s
Backup VM > NAS share on a schedule
Set backup compression to save space.

Data lives in VM and VM is backed up - simple is always best.

You now have a simple viable workable VM > application > backup incase of DR solution in place.

The only reason i can see the file share access on a seperate NAS drive would be if the PVE storage was too small and you needed to connect the NAS file share to the VM as this is where the current data lives on the NAS.

Get a spread sheet and map it all out ;)

Anything out side the above scenario needs more input as to why you wish to do it the other way around as there are too many questions to ask and not enough answers.

Hope the above helps.

“”Cheers
G
 
  • Like
Reactions: nununo
Hi @velocity08, thanks for your answer. It makes sense and this is generally my approach. But the reason I need to store data in my NAS for some of my VMs is because I only have 1Tb SSD in my local storage and that is not enough. Namely for NextCloud and RoonServer.

You suggest CIFS but I heard NFS is more reliable. Any particular reason to use CIFS instead of NFS?

Thanks again,
Nuno
 
Hi nununo


NFS in my opinion is a better protocol than SMB 1 or 2 which is the default for a long time, but one draw back of NFS is that if the PVE initiator drops connection with NAS it will create queued up IO and eventually crash PVE trying to reconnect if there is a network issue.

CIFS/ Samba (SMB) is a little more elegant in that when it drops the connection it will just time out and the device is no longer connected for access.

If you are using multiple NIC from PVE > Switch > Multiple NIC on NAS then you can do either active/passive or active/ active connection for redundancy, throughput or both. (the correct protocol will depend on what your switch can handle.)

If using NFS on NAS it's file level and can have more locking issues, i have lots of experience with SAN’s and iSCSI which is connecting the storage device as block storage and formatting the block device as a local store on PVE i.e. ext4

Any solution will come with its own set of positives and negatives to manage.

I like to subscribe to KISS - Keep IT Simple Successful.

For a more elegant solution run the NextCloud VM on local storage in PVE then connect the NAS to NextCloud directly via a local IP and either an NFS or CIFS file share, you can use NextCloud ACL to manage permissions.

If there is a disconnect for what ever reason the VM will keep running, PVE will keep running and you know that troubleshooting the issue is just going to be file share related.

SMB 3 it's a much better protocol and is currently the best option i believe, performance on OSX is best with SMB3. - will need to check on NextCloud what file sharing protocols they are using they may heave SMB3 fastest at the moment.

If the NAS has slow disks then this will be your bottle neck in the setup as slow spinning disks will struggle to saturate a 1 GB connection.

Do a little more research between SMB 3 and NFS just for your own info as its always best to dig a little deeper before committing to one or the other.

If running an external firewall its' best to do deny all for all incoming ports apart from 443 which is all thats needed for NextCloud access if i remember correctly. An option do that and NAT the public IP > internally so would look a little like this.

Public Internet > NAT > Internel Subnet > NextCloud VM > NAS file share.
______

You can run the VM on the NAS but if its not SSD performance will be slow, NextCloud is pretty good at using memory as cache and will cache hot data from the NAS for quicker access.

do you have multiple network adaptors on NAS and PVE host?

Any hoo little bit of food for thought above :)

""Cheers
G
 

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!