imjustleaving / trueNAS

63 stars 3 forks source link

Failes to modify some folders and files, can't get API keys #5

Closed somealbino closed 11 months ago

somealbino commented 1 year ago

I too am new and don't know where I'm going wrong.

It gets through half the script and then starts getting denied permissions. I've tried having the vm created outside and inside the NFS, I've had the data pool as the root and as the sup directory where it should exist I can sometimes get a radarr key bit never a sonarr

Attached my script with wireguard info recaged, as well as the putty output of a failing script As well as Truenas settings

image Media permissions image Config permissions image

failed vm.docx Script1 failed.docx

imjustleaving commented 1 year ago

You're not doing anything wrong - there is an issue right now where trying to write to a mounted folder creates issues. Read the list of Bugs at the bottom.

This script works if its used only for a local machine - ie, you are not using your truenas machine to host anything. If you leave the truenas IP variable blank, it will install everything on the VM. Of course, this is bad because the VM probably doesnt have much hard drive storage available to it. I'm working on a solution now for figuring out how to allow the VM to have write access to a mounted share from truenas. The main issue is every time I try to have either the script or portainer write something to the nfs share, the user/group it writes with is nobody/nogroup and then when the containers (which are run with user/group app) tries to write to it you get a "permission denied" message.

Its a work in progress....

somealbino commented 1 year ago

Ah, I was reading the bug wrong and though it meant that if it was mounted in the NFS share.

Thank you for taking the time

imjustleaving commented 1 year ago

I have updated the script. Please read the new instructions and try again. This should work for you this time. If not, please report the error and I will get to it as soon as I can.

imjustleaving commented 11 months ago

You were getting an error trying to write to one of the folders. I have updated the script to compensate for this - please use the new script and follow the new instructions.

Also, I see there is an error trying to mount your truenas nfs share. What settings are you using to share your pool?

imjustleaving commented 11 months ago

some things:

  1. on the page where u configure the nfs service, remove the bind IP and check the box for "Enable NFSv4" image after you do this, restart the NFS service.

  2. your directory structure needs to be modified a little. the newest script keeps the configs on the VM, so your pool should be

the permissions you have for media is fine, but also make sure all the sub folders have the same permissions.

make these changes and retry.

imjustleaving commented 11 months ago

I can see from the most recent file you sent, the mount still is not mounting correctly. This needs to be your first step - before running the script, ensure you can mount your truenas nfs share to your virtual machine. once you can get a successful mount, then try to run the script.

somealbino commented 11 months ago

If I miunt the nfs via sudo mount example.hostname.com:/srv /opt/example then run a mount -l | grep nfs

I get this nfs test

which I believe shows that it can mount, but the script isn't doing it

I did rearrange some crap so new screenshots

Maybe something formatted wrong with my ip and pool name? screenshots (1).docx

imjustleaving commented 11 months ago

Try actually mounting the drive:

sudo mount -t nfs 192.168.1.113:/mnt/storage/oracle/media /mnt

If that works, let me know and I'll run some tests

imjustleaving commented 11 months ago

Yes, the mount is definitely working! However, I noticed in the last attempt, the output was

mount.nfs: mounting 192.168.1.113:/mnt/mnt/storage/oracle failed, reason given by server: No such file or directory

you'll notice /mnt is listed twice. Try doing the exact same thing again, except when you enter the location of the truenas pool it should be listed as /Storage/Oracle. the /mnt is supplied by the script and you should not add it yourself.

somealbino commented 11 months ago

I have tried that, similar result. In fact when I mount the NFS manually, I don't get the either the Sonarr or Radarr apks

imjustleaving commented 11 months ago

I would suggest this then:

Go to the code repo and use the arr-stack-with-variables.yaml along with the variables.env on your VM after you have mounted your truenas, since you know you can mount that manually. The only thing you should change in the variables.env is add your discord webhook. After you have that up, run post-stack-deploy.sh.

Basically those are the steps of script1.sh broken out. It should work since for some reason the script wont mount your drive automatically.

somealbino commented 11 months ago

We're now pretty out of my depth.

I did also try to manually input the mount in the script instead of the calls but that didn't work either.