Share folder between 2 cts

heldmar

Member
Nov 3, 2021
17
1
8
45
Hello, I am new to Proxmox and very anxious to start using it as my homelab. I have been reading and trying to do things, and right now I am trying to do something that has taken me quite some time reading and testing without any success.

Is is possible to share via NFS from one container to another container? or a VM to a container?

Basically, I only have one single hard disk with 750GB, I created 2 containers, one with 8GB in disk (intended for Plex) and another container with 100GB to hold video files. I wanted to simply do a NFS mount between them, but seems to be impossible? Both containers ARE privileged, and in both I have marked NFS as an option.

If CT to CT is not possible, will it be possible if I create a VM to hold all my video files and share it via NFS to the container? Any guide I can read for this?

Thanks in advance.

PS: both containers are Ubuntu 20.04.
 
What do you mean by "normal systems"? Also, can you share some guidance on any special considerations to have? I mean, I have simply done this:

1) created both CTs as privileged
2) added "NFS" as option for both
3) created folder /mnt/shares in target CT
4) created folder in /home/shares in source CT
5) edited /etc/fstab in target CT and added line:
192.168.1.10/home/shares /mnt/shares nfs 0 0
6) restarted both CTs

That didn't do the trick. What am I missing?
 
What do you mean by "normal systems"?
A standard stand-alone computer.

Your problem is either 1) issues with the OS configuration (which might be better served at a forum dedicated to the distro you're using, or 2) networking issues within Proxmox (which would be prime to ask about here).

Assuming your issue isn't #1, first eliminate Proxmox firewall by unsetting the firewall flag in both the CTs virtual network interface, as well as in the CTs Firewall section and restart the container for good measure (setting the "NFS" tick in features should have set up the FW correctly, but I've seen it occasionally hiccup there, so good to try... re-enable after you resolve and ensure it still works).

If it still doesn't work, the issue is probably #1 so the standard troubleshooting applies: confirm you can connect to a known working NFS server from each of your CTs, and assuming that works, confirm the opposite direction is true. My gut is it sounds like you may not have correctly setup the nfs server in the CT you're trying to share the storage out of, but that's just a guess. Good luck !
 
Thanks for your help @fiveangle, I was able to connect my container to an existing (physical) server on my network, so the connectivity as a client worked!

Now, I tried to interconnect the 2 CTs, and basically followed up the tutorial I found here: https://www.digitalocean.com/community/tutorials/how-to-set-up-an-nfs-mount-on-ubuntu-20-04, which is the same one I use on my physical servers where the NFS is already working but didn't work. When checking logs, I found this coming from the Host CT:

Code:
-- A start job for unit nfs-idmapd.service has finished with a failure.
--
-- The job identifier is 315 and the job result is dependency.
Nov 03 20:51:11 tvshows systemd[1]: nfs-idmapd.service: Job nfs-idmapd.service/start failed with result 'dependency'.
Nov 03 20:51:11 tvshows systemd[1]: nfs-server.service: Job nfs-server.service/start failed with result 'dependency'.
Nov 03 20:51:11 tvshows systemd[1]: nfs-mountd.service: Job nfs-mountd.service/start failed with result 'dependency'.
Nov 03 20:51:11 tvshows systemd[1]: nfs-config.service: Succeeded.
-- Subject: Unit succeeded
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- The unit nfs-config.service has successfully entered the 'dead' state.
Nov 03 20:51:11 tvshows systemd[1]: Finished Preprocess NFS configuration.
-- Subject: A start job for unit nfs-config.service has finished successfully
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit nfs-config.service has finished successfully.
--
-- The job identifier is 313.
Nov 03 20:51:11 tvshows systemd[1]: Condition check resulted in RPC security service for NFS client and server being skipped.
-- Subject: A start job for unit rpc-gssd.service has finished successfully
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit rpc-gssd.service has finished successfully.
--
-- The job identifier is 310.
Nov 03 20:51:11 tvshows systemd[1]: Condition check resulted in RPC security service for NFS server being skipped.
-- Subject: A start job for unit rpc-svcgssd.service has finished successfully
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit rpc-svcgssd.service has finished successfully.
--
-- The job identifier is 314.
Nov 03 20:51:11 tvshows sudo[422]: pam_unix(sudo:session): session closed for user root


I don't get what am I doing wrong, and definitely seems to be an issue related to the containers among them as one container could connect with no issues to a physical server outside of Proxmox.
 
Last edited:

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!