NFS backup to Truenas

ac21

New Member
Jul 27, 2024
11
0
1
When I try to back up to my truenas I get a "permission denied" on a folder/file on proxmox. I can understand if it was on the folder on truenas.

Screenshot 2024-08-04 134303.png
 
/mnt/ is "mount", aka the point on your local server where it linked to all external servers, so while it looks to be "on proxmox", unless something is VERY wrong, it's ectually on the NAS.
If you're used to windows, think of it like the network-drive, you might have it attached to Z:, which just like C: and D: might be/look like a local drive, but it links to a network-share.
 
/mnt/ is "mount", aka the point on your local server where it linked to all external servers, so while it looks to be "on proxmox", unless something is VERY wrong, it's ectually on the NAS.
If you're used to windows, think of it like the network-drive, you might have it attached to Z:, which just like C: and D: might be/look like a local drive, but it links to a network-share.
I see, I was thinking it was on PVE because I dont have a /mnt/pve/ on truenas but I do on PVE

Screenshot 2024-08-04 141318.png

Looks like I need to make some changes with Maproot User and maybe Group?
Do I need to create another user in truenas? login info on both are the same
 
The path on the nas and on proxmox don't really matter all too much, since that is just the on-system path.
You made the storage-ID of your NFS-setup as "truenas" and didn't set a manual path, so it set it to /mnt/pve/truenas (see docs below)

What have you set as your storage-settings for your NFS share on proxmox?
Also on the truenas, has it made the "dump" folder inside of the Proxmox folder you made there?

https://pve.proxmox.com/pve-docs/chapter-pvesm.html#storage_nfs
1722802015019.png
 
The path on the nas and on proxmox don't really matter all too much, since that is just the on-system path.
You made the storage-ID of your NFS-setup as "truenas" and didn't set a manual path, so it set it to /mnt/pve/truenas (see docs below)

What have you set as your storage-settings for your NFS share on proxmox?
Also on the truenas, has it made the "dump" folder inside of the Proxmox folder you made there?

https://pve.proxmox.com/pve-docs/chapter-pvesm.html#storage_nfs
View attachment 72408
Yes there is a "dump folder"

Last log:
2024-08-04 14:11:36 INFO: Starting Backup of VM 100 (lxc)
2024-08-04 14:11:36 INFO: status = running
2024-08-04 14:11:36 INFO: CT Name: nginxproxymanager
2024-08-04 14:11:36 INFO: including mount point rootfs ('/') in backup
2024-08-04 14:11:36 INFO: backup mode: snapshot
2024-08-04 14:11:36 INFO: ionice priority: 7
2024-08-04 14:11:36 INFO: create storage snapshot 'vzdump'
2024-08-04 14:11:37 INFO: creating vzdump archive '/mnt/pve/truenas/dump/vzdump-lxc-100-2024_08_04-14_11_36.tar.zst'
2024-08-04 14:11:37 INFO: tar: /mnt/pve/truenas/dump/vzdump-lxc-100-2024_08_04-14_11_36.tmp: Cannot open: Permission denied
2024-08-04 14:11:37 INFO: tar: Error is not recoverable: exiting now
2024-08-04 14:11:37 INFO: cleanup temporary 'vzdump' snapshot
2024-08-04 14:11:37 ERROR: Backup of VM 100 failed - command 'set -o pipefail && lxc-usernsexec -m u:0:100000:65536 -m g:0:100000:65536 -- tar cpf - --totals --one-file-system -p --sparse --numeric-owner --acls --xattrs '--xattrs-include=user.*' '--xattrs-include=security.capability' '--warning=no-file-ignored' '--warning=no-xattr-write' --one-file-system '--warning=no-file-ignored' '--directory=/mnt/pve/truenas/dump/vzdump-lxc-100-2024_08_04-14_11_36.tmp' ./etc/vzdump/pct.conf ./etc/vzdump/pct.fw '--directory=/mnt/vzsnap0' --no-anchored '--exclude=lost+found' --anchored '--exclude=./tmp/?*' '--exclude=./var/tmp/?*' '--exclude=./var/run/?*.pid' ./ | zstd '--threads=1' >/mnt/pve/truenas/dump/vzdump-lxc-100-2024_08_04-14_11_36.tar.dat' failed: exit code 2

Screenshot 2024-08-04 172908.png

Screenshot 2024-08-04 173101.png
 
Last edited:
Ok, so, during creation at least it had permission to create the folders at least, and it did create something in the dump-folder, given the changed-date...
You could try changing the preallocation setting to one of the other states, see if that works for you, try "off" first.
Other then that, if you, in Content, disable the backup option, and on the nas you rename the dump-folder to dump_old, and then re-select the backup option, does it then properly re-create the folder?

Other then that I'm probably out of options and you'll have to wait for someone with more NFS/Backup experience to chime in.
 
Ok, so, during creation at least it had permission to create the folders at least, and it did create something in the dump-folder, given the changed-date...
You could try changing the preallocation setting to one of the other states, see if that works for you, try "off" first.
Other then that, if you, in Content, disable the backup option, and on the nas you rename the dump-folder to dump_old, and then re-select the backup option, does it then properly re-create the folder?

Other then that I'm probably out of options and you'll have to wait for someone with more NFS/Backup experience to chime in.

I tried turning preallocation off, when deleting "Dump" it recreates it. Thank you for help. I'll keep playing with.


edit:

Success!

Found this thread with someone with similar issue.

In Truenas I changed
"Mapall User" = Root and "Mapall Group" = Root.

Screenshot 2024-08-06 212312.png
 
Last edited:
Your dataset probably has the default permissions for user root and group root to have rw access.

By using "Mapall Users" you just tell TrueNAS to use the user root no matter what the connecting client uses as a user.
You could have also done that setting on the Proxmox side, but it is simpler here.
The group set is not really needed here, since you get rw permissions by the user already.

Since it is not secure if the connecting user can just say what user it is, NFS4 switched to Kerberos.
But you can set NFS4 to use NFS3 permissions on TrueNAS.
And then you can set the NFS version to 4.2 on 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!