NFS share to VM

jaykavathe

Member
Feb 25, 2021
36
2
13
42
Using this video, I was able to add Truenas NFS storge from another server onto my proxmox host/datacenter. https://www.youtube.com/watch?v=txx0z-4HlSQ
Though I am having issue trying to get it mounted to VM. There are tons of threads on bind mounts for privileged LXC by editing conf file but not seeing something that works for VM. How do you go on about -

1) Mounting NFS share onto Alpine VM. When I enter following command, I get permission error.
sudo mount -t nfs 192.168.1.139:/mnt/mystpool_6x/pvedata /mnt/nfs

2) Since the share is already mounted on the host, how do I get it to VM. Is there issue with speed/performance mounting it from the host vs mounting it directly?

3) How do you mount host NFS share to unprivileged LXC?

I do see an option to "add a hard disk" in Node->VM->Options but then it asks me to specify a size. Is that the right way? I thought I dont have to specify size to mount NFS share and can have it open ended.
 
1) how does your VM connect to the network? Generally Truenas doesn’t know or care whether the client is a VM in a hypervisor or something running on bare metal. Check permission in truenas and ensure you’ve installed all the NFS client libraries in your VM.

2) connect direct from the VM i.e. don’t “reuse” Proxmox’s connection.

3) in contrast to (2)… don’t connect directly from the LXC but rather mount Proxmox’s connection as a bind mount in the LXC. See https://pve.proxmox.com/wiki/Unprivileged_LXC_containers
 
Appreciate your response, thanks.

I was able to resolve this and there were 2 parts. First I had put wrong host network in allowed networks. That was stupid and half the issue.
Second was permissions and I just ended up giving root/wheel to my nfs share and then I was able to play with the folder persmissions in proxmox.
 

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!