[SOLVED] NFS share that PVE can access, but PBS can't (EPERM: Operation not permitted)!

PapaGigas

Member
Mar 18, 2023
40
2
8
I've installed PBS in my PVE host.

I've got a NFS share that PVE can access, but when I try to set it as a datastore on PBS it gives out "EPERM: Operation not permitted".

How can I solve this issue?! :rolleyes:
 
I thought PBS USe not root AS user . it is backup i think. U must define permission.
no root squash could also be a problem. https://serverfault.com/questions/2...d-nfs-partition-gives-operation-not-permitted

I've set "Mapall User" and "Mapall Group" to "root" in TrueNAS, and still doesn't work in PBS! :/

When I backup from PVE to "/mnt/pve/backups" it works, but when I try to set it as a datastore in PBS it fails.

This are the folder permissions:

Code:
root@pve:/# ls -ld /mnt/pve/backups
drwxrw---- 3 0 0 3 Jun  6 17:44 /mnt/pve/backups

What am I doing wrong?! :rolleyes:
 
Last edited:

I've changed it from "(sec=sys,rw,anonuid=0,anongid=0,all_squash,no_subtree_check)" to "(sec=sys,rw,anonuid=0,anongid=0,no_root_squash,no_subtree_check)" and it worked! :D

Now when I check permissions this is what I get:

Code:
root@pve:~# ls -ld /mnt/pve/backups
drwxrw---- 4 backup backup 5 Jun  6 20:52 /mnt/pve/backups

Thank you!!! ;)

PS - I don't understand why, but when I restart the NFS service it gets back to "all_squash"... but it's still working! :rolleyes:
 
Last edited:
I've changed it from "(sec=sys,rw,anonuid=0,anongid=0,all_squash,no_subtree_check)" to "(sec=sys,rw,anonuid=0,anongid=0,no_root_squash,no_subtree_check)" and it worked! :D

Now when I check permissions this is what I get:

Code:
root@pve:~# ls -ld /mnt/pve/backups
drwxrw---- 4 backup backup 5 Jun  6 20:52 /mnt/pve/backups

Thank you!!! ;)

PS - I don't understand why, but when I restart the NFS service it gets back to "all_squash"... but it's still working! :rolleyes:
Hello, where did you change this options ? I'm facing the same proble, thanks!
 
Hello, where did you change this options ? I'm facing the same proble, thanks!
Shell or console into the TrueNAS server (I'm using CORE), file is /etc/exports, add the words (including parentheses) directly after the share you are trying to fix.

I'm not sure what suddenly worked for me, but here are a few things:

Initially I tried "user map all" to a group and user I created in TrueNAS called "backup", but they were assigned numbers of 100x - which is not what is required since it seems PBS looks for uid/gid of "backup:backup" or "34:34". LS -sl showed uid and gid as 100x:100x initially, so that probably wasn't it. However, I think the user mapping just makes it a bit easier to match the NFS to the relevant ACL under the Storage>Pools>[dataset]>ACL permissions.

I also tried chown backup:backup /mnt/Tank but all it did was assign 100x uid/gid, not sure if this made any difference but probably not.

But after adding PapaGigas' words to /etc/exports in TrueNAS, I was able to add the backup dataset in PBS, which then appeared to assign 34:34 to the mounted folder within PBS. This also mapped 34:34 within TrueNAS, which can be seen inStorage>Pools>[dataset]>Edit ACL. However, it shows an error "Could not find a user name for this user ID" but it now seems to work in PBS so I'm not going to change it...

I also noticed that the added words disappeared from /etc/exports, but everything still seems to work, even after reboots.

For background, I have been trying to get NFS shares to work since using CIFS/SMB connection (between my NAS and PBS) produces frequent file lock errors EDABF.
 

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!