QNAP TS-877 Truenas Journal

linux crash course

had to delete a directory and contents i was using for archiving backup of old docker containers but it got messed up.

so went to truenas shell, jlmkr shell docker

cd to the directory then rm -r thefolder

and sure enough it worked.

my acls must not be right because i couldn’t do this from samba. i will need to study more on this. i’m still left wondering why is netdata sometimes being assigned as owner for some file creations. don’t know whats going on with that.

the current progress

  1. basic nas stuff all sorted out. data all restored/accessible and backed up

  2. most of the docker containers restored and working.

  3. switched from portainer to dockge. getting used to it. what i liked most is how they manage your stacks to save compose and .env making backing up and restoring easier.

  4. switched from qts container station to truenas jailmaker. i much prefer jailmaker because i can install a jail as my playground on the fly. with qnap container station it’s either take it or leave it. with jailmaker you can install whatever version of docker you want.

  5. i said most containers were restored, but 2 major ones i had used i couldn’t restore/get to work.

traefik which was my previous reverse proxy couldn’t get it to work. my issue was in regards to the cert if not mistaken. or could be something else not sure. but not much of an issue because nginx proxy manager got the job done, and also managed to setup valid https certs wihich my previous setup when using traefik didn’t have.

the other important container was authentik. i got it installed, i can configure it. But, i couldn’t get it and nginx proxy manager to work together. still figuring this one out. i’m running a homelab on lan with vlans, so i don’t need this urgently. just sux i don’t have this setup.

  1. need to take another look at acls. Don’t want to mess with jailmaker dataset (the instructions said not to try implement any truenas acl with jailmaker dataset after your initial setup based on the guide or it will mess things up)

  2. optimize jailmaker config. move it to the correct place which should be somewhere in jailmaker dataset. i want to get the nvidia graphics card to work so may need to edit the config and run it again. It’s simply more flexible in adding/subtracting or upgrading/downgrading depending on your requirements.

jlmkr shell docker

sudo apt install nano wget curl git

Common tweaks

Update repository list

sudo apt update

Install common services

sudo apt install nano wget curl git

i’ve tried nano before. it’s some sort of commandline editor. so i can login as a root user, then make a file then edit it with nano. time to brush up i guess. also these other tools :smiling_face_with_tear:

:thinking:

this is another reason why we prefer jailmaker. just look at the efficiency compared to the alternative setup

seems that nvidia graphics has some sort of issue with jailmaker

ok i see what you mean now ty :pray:

this is the fix i plan to do for the docker config in jailmaker

yikes, that didn’t go well

root@xxxxx[~]# jlmkr edit docker

Restart the jail for edits to apply (if you made any).
root@xxxxx[~]# jlmkr restart docker
Wait for docker to stop...................
Starting jail docker with the following command:

systemd-run --property=KillMode=mixed --property=Type=notify --property=RestartForceExitStatus=133 --property=SuccessExitStatus=133 --property=Delegate=yes --property=TasksMax=infinity --collect --setenv=SYSTEMD_NSPAWN_LOCK=0 --unit=jlmkr-docker --working-directory=./jails/docker '--description=My nspawn jail docker [created with jailmaker]' --property=ExecStartPre=/mnt/xxxxx/jailmaker/jails/docker/.ExecStartPre -- systemd-nspawn --keep-unit --quiet --boot --bind-ro=/sys/module --inaccessible=/sys/module/apparmor --machine=docker --directory=rootfs --network-bridge=br1 --resolv-conf=bind-host '--system-call-filter=add_key keyctl bpf' --bind=/mnt/xxxxx/docker/:/mnt/docker --bind=/mnt/xxxxx/docker/data/:/mnt/data --bind=/mnt/xxxxx/docker/compose/:/mnt/compose --bind-ro=/mnt/xxxxx2/Storage:/mnt/Storage --bind-ro=/mnt/xxxxx2//Storage2:/mnt/Storage2 --bind-ro=/mnt/xxxxx2//Storage3:/mnt/Storage3 --bind-ro=/mnt/xxxxx2/Storage4:/mnt/Storage4 --bind-ro=/mnt/xxxxx2//Storage5:/mnt/Storage5 --bind=/mnt/xxxxx2//test/:/mnt/test --capability=SYS_RAWIO,SYS_ADMIN

Failed to start transient service unit: Unit jlmkr-docker.service was already loaded or has a fragment file.

Failed to start jail docker...
In case of a config error, you may fix it with:
jlmkr edit do

This was the line i added
--capability=SYS_RAWIO,SYS_ADMIN

guess it didn’t like that :sweat_smile:


Undoing that, save, restart docker jail made it work again

did a jlmkr status docker

then also went to my dockge and could see all my docker containers up and running fine.

so yes you can play around with the config to make edits, *write, then restart to apply them. If it fails, just edit. Make sure you saved a copy of the working config before you edit.

otherwise worse case scenario you have to delete the docker jail and make it again. what that entails is installing back dockge using compose, then from there deploying all the containers again.

getting it back up and running isn’t that hard, but the previous method of undoing what broke the config, then restarting it is way faster and convenient by comparison.

Well. You could learn vi.

Press “i” to enter insert mode.

Esc, to go back to command mode.

Esc, shift-Z-Z to save and exit

No point learning eMacs… :firecracker:

1 Like

these are some of the changes i did to docker config

gpu_passthrough_nvidia=1

then under systemd_nspawn_user_args=
--bind-ro=/usr/lib/x86_64-linux-gnu/nvidia/current

Source

so these fixes were for me to fix

  1. nvidia graphics card
  2. to get scrutiny to work

when i tried the scrutiny fix i couldn’t get to work must have done wrong. for nvidia still testing.

hm :thinking:

https://www.quora.com/Does-Nvidia’s-GT-1030-support-CUDA-programming

went to truenas shell did a
lspci

VGA compatible controller: NVIDIA Corporation GP107 [GeForce GTX 1050] (rev a1)

ok apparently i had the 1050GTX

this one to be precise
https://www.msi.com/Graphics-Card/GeForce-GTX-1050-AERO-ITX-2G-OC/Specification

sauce

for the acceleration (not gaming)

yes it’s on the cuda list

Immich requirements

Supported Backends

GeForce GTX 1050 = 6.1

BTW, I finished my Jailmaker tute. Now to workout how to upload it to YouTube :wink:

1 Like

i will check it out and provide feedback :smiling_face_with_three_hearts:

well if you are making a video you can use obs if you are recording from your screen. if you are using a cam you can get a screen to make it more professional :sweat_smile: like all the other tech youtubers.

then just have a youtube account, create the channel then upload.

i initially thought you meant a blog type guide or something xd

1 Like

for scrutiny i further modified the docker config to add this

        --bind-ro=/dev/sda
        --bind-ro=/dev/sdb
        --bind-ro=/dev/sdc
        --bind-ro=/dev/sdd
        --bind-ro=/dev/sde
        --bind-ro=/dev/sdf
        --bind-ro=/dev/sdg

Ok good news scrutiny works now


:sunglasses:

note:

The docker_compatible=1 option is deprecated will be removed. I suggest you find an alternative solution.

myself i was just testing and will stop the container soon. i was just testing if it worked or not. the jailmaker dev said he had plans for these things, but how it will work out we will have to wait and see. but what he is saying is, this setting might not work soon because it’s being deprecated. so you would have to undo the

docker_compatible=1

and probly stop container until a new solution comes about

testing graphics card for immich machine learning. ran into a problem, trying to troubleshoot

:thinking:

someone posted this as a fan solution tested on a ts-253D

i’m ok with my current configuration for now ^^;

Way earlier in this thread i speculated what may have been the dom, and from what i could tell it wasn’t gonna be coming off easy so i left it.

apparently i was right. this is how you’re supposed to remove it if you insist

personally for myself i don’t think it’s worth the effort xd.

2 Likes

ran speed test



not sure why there is such a big difference. i ran them not far apart from one another :thinking:

just the other day openspeedtest was 700+ both ways.

only change recently was deploying some docker containers

wow

:grimacing: