Hello everyone,
I’m trying to solve something and I don’t know how. Can you please help me? I’ll try to explain everything:
TrueNAS Server #1 at Location #1:
This server has 20 TB of available storage.
I installed Tailscale and it’s connected to Tailnet A.
TrueNAS Server #2 at Location #2:
This server only has 2 TB of available storage.
I installed Tailscale and it’s connected to Tailnet A.
Windows PC at Location #2
This PC has 4 TB of data that needs to be uploaded to TrueNAS Server #1 at Location #1.
Here’s the problem. I can’t install Tailscale or any other software on this PC. The only thing I can do on this PC is add a Network Drive.
So I created a Dataset and a SMB share on TrueNAS Server #1 at Location #1 called “Root”.
On TrueNAS Server #2 at Location #2 I used fstab to mount the “Root” share from TrueNAS Server #1 at Location #1 using its Tailnet A IP address. The mount path /mnt/root
So now I have full access to the “Root” share on both TrueNAS Servers.
How can I “re-share” the “Root” share from TrueNAS Server #2 at Location #2 so that Windows PC at Location #2 can add it as a Network Drive?
Basically Location 2 wants to be able to access a Samba share located at Location 1 without installing additional software on the workstation.
I tried to add it using the Share tab on TrueNAS Server #2 at Location #2 but I got: KeyError ‘fstype’
Is there another way to do this?
Please keep in mind that I can’t install any other software on Windows PC at Location #2.
Thanks in advance!
Since it’s a mount I don’t think the TrueNAS middleware will allow the share…but other people far wiser than I may chime in with a solution.
If I were faced with this problem I think I would instead tackle it from the network angle and use Tailscale as a subnet router. Since you cannot actually install Tailscale in the client PC you may have to add routes to the router or at least the PC’s routing table.
Here’s some light reading on Tailscale site-to-site networking: Site-to-site networking · Tailscale Docs
The other option would be to setup some sort of sync between the two boxes, something like syncthing. This option also may be a non-starter depending the type of data being accessed and the usage patterns so really I wouldn’t recommend it for more than 1 or 2 users.
Looks like you hit a typo in our validation:
if this_mnt['fs_type'] != 'zfs':
verrors.add(schema, f'{this_mnt["fstype"]}: path is not a ZFS dataset')
We only allow shares of ZFS datasets. If you bypass this validation you may also hit internal validation in samba that willl assert and dump core if we unexpectedly get a non-ZFS filesystem. TL;DR, don’t do this.
Thank you for your suggestion.
I tried but it was too complicated so this is what I ended up doing.
-
I installed the Tailscale app on TrueNAS Server #1 at Location #1,* which gave me the option of having a private Tailscale IP (100.70.0.1)
-
I installed cifs-utils and Tailscale on a Debian VM at Location #2 and using fstab, I mounted on /mnt/root the SMB share of TrueNAS Server #1 at Location #1 using its Tailscale IP (100.70.0.1). Now both, TrueNAS Server #1 at Location #1 and the Debian VM at Location #2 are on the same Tailnet and can see each other.
-
On the Debian VM, I also installed Docker and installed the “Dockur Samba” container. I used it to “re-share” the /mnt/root folder which actually is the SMB share from TrueNAS Server #1 at Location #1.
-
I added on the Windows PC at Location #2 a Network Drive (Z) using the IP of the Debian VM (10.0.0.130) and the credentials from the “Dockur” container SMB share.
Now when I’m on Windows PC at Location #2 and I copy a file to that Network Drive (Z), it copies it directly into TrueNAS Server #1 at Location #1.
I tried to use TrueNAS for steps 2 and 3 but TrueNAS resets the fstab on every reboot. But that’s okay because I don’t have to expose that whole TrueNAS Server to Tailscale. I’m fine exposing the TrueNAS Server #1 at Location #1 because everything being copied there is encrypted.
While I know it would have been better to just install Tailscale on Windows PC at Location #2 so that it could be a more “direct” connection with TrueNAS Server #1 at Location #1, in this case I couldn’t since the owner of Windows PC at Location #2 didn’t want any additional software. It also makes that computer safer in case Tailscale has another vulnerability like the one posted on Tailscale’s blog on November 21, 2022.