Accessing NFS files from outside

Tamadite

Member
May 20, 2022
8
0
6
I have connected a LXC to an external NAS storage by creating a NFS Storage in Proxmox and mounted it on the corresponding LXC VM as a mount point. However, I need to get access to these files in the NAS storage from outside the VM. I see the raw mount file in the NAS.

Reason: I want to create daily backups of the files generated by the VM and saved in the NFS/NAS storage.

What do you suggest?
 
Last edited:
My first thought was to do it as it is done with Containers that is, make use of the volume switch to mount an internal folder onto a host folder but it seems this is not possible in Proxmox.
can u translate it in good english?
 
This is how I solved it:

In the VM (guest):
Code:
mkdir /mnt/foo

In the host
Code:
mkdir /mnt/remoteshare
mount -t cifs -o username=[username],password=[password] //[remoteServer]/[remoteShareName] /mnt/remoteshare

Then edit the VM configuration file, e.g.
Code:
nano /etc/pve/lxc/109.conf

and add the following:
Code:
mp0: /mnt/remoteshare,mp=/mnt/foo

My VM is now to produce files into guest folder /mnt/foo. These files are to be available on the remote server in the shared folder.

This solution assumes:
  1. there is no other mount in the configuration file therefore m0, otherwise change it accordingly e.g. m1.
  2. A share in the remote server is available for the given username.
 

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!