ls -ld
gives me the information that the folder is owned by user nobody and user nogroup.Hi everyone. I'm quite new to Proxmox and maybe need some advice.
Mounting itself works fine with the tutorial, but no matter what I try, I get some permission errors when handing over the NFS shares to the LXC.
My mount options in OpenMediaVault contain anongid=101000,anonuid=101000, as I have a user inside the LXC with uid=1000(myuser) gid=1000(myuser).
Checking the mounted folder and its content withls -ld
gives me the information that the folder is owned by user nobody and user nogroup.
Maybe someone can give me a hint what I may have missed.
Thanks![]()
root@pve:~# ls -l /mnt
total 32
drwxrwxrwx 7 1005 1005 4096 Aug 19 23:22 nfs_nas_data
drwxrwxrwx 7 1005 1005 4096 Aug 21 14:22 nfs_nas_downloads
drwxrwxrwx 7 1005 1005 4096 Aug 20 19:35 nfs_nas_media
root@jellyfin:~# ls -l /mnt
total 24
d--------- 7 nobody nogroup 4096 Aug 19 20:22 data
d--------- 7 nobody nogroup 4096 Aug 21 11:22 downloads
d--------- 7 nobody nogroup 4096 Aug 20 16:35 media
Hello, does anybody know the reason why this setup hinders snapshoting functionality?Very cool but only problem is you can't take snapshots of the lxcs because of the mounts unfortunately.
AFAIK the short of it is:Hello, does anybody know the reason why this setup hinders snapshoting functionality?
I would love to have a) unprivileged CT with b) NFS share bind-mounted from the host and c) snapshot functionality for daily CT backups to PBS
So far it seems like keep dreaming...
Thanks in advance for any kind of hint or explanation.
Thanks for this. Finally got my NFS share usable in my LXC.I was getting a 'Permission Denied' error in the LXC containers.
The solution was to add 'all_squash' to the NFS share configuration on the NAS.
groupmod -g 1001 gnas
cat /etc/group | grep gnas
all_squash,anongid=1001
subtree_check,insecure,all_squash,anongid=1001
groupadd -g 1001 gnas
usermod -aG <your-username> gnas
groups <your-username>
sudo mount -t nfs4 -o nfsvers=4.2 <your-ip>:/nasnfs ~/nas
touch ~/nas/from_laptop
ls -la ~/nas
groupadd -g 1001 gnas
usermod -aG root gnas
groups root
sudo mount -t nfs4 -o nfsvers=4.2 <your-ip>:/nasnfs /nas
touch /nas/from_proxmox
ls -la /nas
pct set <lxc-container-id> -mp0 /nas,mp=/mnt/nasnfs
groupadd -g 1001 gnas
usermod -aG root gnas
touch /mnt/nasnfs/from_lxc
ls -la /mnt/nasnfs
Thank you for the follow-up. This was the final piece for me to have my Synology NAS going into calibre-web in an LXC.Found it. The problem was the squash option in the NFS permissions for the Synology shared folder. I had to change it to "map all users to admin"
This worked for me as well when getting the "Permission denied" issue.Found it. The problem was the squash option in the NFS permissions for the Synology shared folder. I had to change it to "map all users to admin"
This post was inspired by this guide created by @TheHellSite.
Thanks for that great tutorial. Option 3 is the bomb!This post was inspired by this guide created by @TheHellSite.
My goal is to set up a torrent LXC such that it would torrent an Ubuntu iso to an Unraid share.
It seems that there are many ways to approach this, but I struggled to find a guide that fit my needs. Having finally found a solution, I felt it appropriate to post my process in hopes that it helps others.
The Setup
Note: IP addresses, folder names, etc are just examples. Substitute as needed.
- Proxmox is installed on Computer 1
- Has the static IP
192.168.1.10
- Contains a torrent LXC with an ID of
101
- Unraid is installed on Computer 2
- Has the static IP
192.168.1.20
- Contains a share called
downloads
- The share allows NFS and has granted read/write permission to
192.168.1.10
(Computer 1)
Option 1
The goal can be accomplished by adding the NFS share to your Datacenter in Proxmox. You can then mount the new storage device to the torrent LXC, however the LXC must be privileged and have the NFS feature turned on.
While this does work, Proxmox will automatically create folders based on theContent
types you enabled when adding the storage device. This may be reasonable in certain situations, but none of the content types fit my use-case. I attempted to delete the directories, but they would regenerate.
Additionally, the use of a privileged LXC seems to be undesirable.
With those issues in mind, I chose to explore other options.
Option 2
I followed the instructions posted by @TheHellSite in the above thread. I had no problems with the setup process, but I unfortunately experienced poor torrenting speeds.
I'm not intimately familiar with the implementation details of SMB/CIFS or torrents, but my rough understanding is that:
- SMB is not very performant when dealing with many small files
- Torrenting downloads many small chunks of the desired content in parallel
This could explain the poor performance, but that is just a guess. In any case, this option does not suit my needs.
Option 3 (my solution)
Having learned a lot from Option 2, I decided to attempt to mount an NFS share without the Proxmox GUI.
This seems to mount the NFS share without creating extra files and the download speeds are great. The Ubuntu iso torrent peaked at 85 MB/s. I am satisfied.
- Access your nodes shell
- Proxmox > Your Node > Shell
- Create a mounting point for the share
mkdir /mnt/computer2/downloads
- Edit
fstab
so that the share mounts automatically on reboot
- Open:
nano /etc/fstab
- Add:
192.168.1.20:/mnt/user/downloads/ /mnt/computer2/downloads nfs defaults 0 0
- Save
- Mount the share
- Reload systemd:
systemctl daemon-reload
- Mount shares:
mount -a
- Add the pointing point to your LXC
- Open:
nano /etc/pve/lxc/101.conf
- Add:
mp0: /mnt/computer2/downloads/,mp=/downloads
- Save
- Start the LXC
- Update the LXC user's permissions
groupadd -g 10000 lxc_shares
- Note: I think you can use whatever group name you want as long as you use again in the next step.
usermod -aG lxc_shares root
- Note: Your username is probably root, but substitute for whatever user you want to configure permissions for.
- Reboot the LXC
- Verify permissions
- Create a file in your mountpoint:
touch foobar
- Attempt to delete
foobar
from another machine.- If successful, you should be done.
Closing
This goal provided me with a good learning opportunity and I'm appreciative of the vast amounts of community discussion on here, Reddit, blog posts, etc. I hope this post helps others as much as the other discussions helped me.
Also - I'm very new to Proxmox and, while I have some experience with Linux CLI, I'd hardly say that I'm experienced. If you find any issues in my solution, please let me know and I will try to make edits when appropriate.
Edits
- Added permission configuration to Option 3.
- Context: I deleted by torrent LXC after concluding a test, but forgot to delete the Ubuntu ISO first. I attempted to delete the file from my personal computer, but was unable to because of permission issues. I ended up needing to format the NAS (though fortunately nothing else was on it).
- Removed
uid=100000,gid=110000
from the NFS configuration in Step 3.
- Context: uid and gid are not valid settings for NFS. So far as I can tell, this isn't really an issue. I speculate that it may be a pain if you want to manage the files directly from your node's shell, but I think you just as easily create a user with the appropriate UID and GID.
We use essential cookies to make this site work, and optional cookies to enhance your experience.