Y'all are trans, and I know how much you trans Zoomers code (no idea if that's a Linux thing or not tho), so I thought I might try Hexbear for some tech help. I'm fried, I've watched so damn many tutorials and read so many threads on this but I can't seem to work it out. I barely know a few basic commands in the console, and the alphabet soup of different directories, programs, and the very language that's used to discuss Linux is too much for me to process. I've learned a lot, but I need some help.

I've built a pretty nice server that's not doing much right now besides NAS storage. I'm running a TrueNAS scale VM on Proxmox, I'm filling it up with all my pirate booty, and I want to watch it through Jellyfin, which I have installed to an LXC container (unprivileged for security, tried it both ways and I can't get it). The problem is, how do I get jelly to see the NAS drive? I don't know how to map it one way or another. I'm running the storage through an HBA in ZFS mirror with an SMB data set that I can see just fine and access in Windows, but jelly seems to just be stuck in it's own little world.

I've seen things about creating users within jelly, which I tried, and it just tells me that the user I supposedly created with SMB credentials doesn't exist. Tried using the GUI to find the NAS via IP, no dice. I'm fucking tired, I've been at it for a week or so now, I just want to watch a movie this weekend.

  • YearOfTheCommieDesktop [they/them]
    ·
    edit-2
    1 year ago

    I'm assuming this is (one of) the threads you were looking at? https://forum.proxmox.com/threads/tutorial-unprivileged-lxcs-mount-cifs-shares.101795/

    I know little about proxmox/LXC but lots about linux and containers in general so I might be able to help

    Seems like you should be able to go into the LXC container and run (as root user, or with sudo):

    groupadd -g 10000 lxc_shares

    usermod -aG lxc_shares jellyfin

    then shut down the LXC

    And then on the proxmox host run (also all with root):

    mkdir -p /mnt/lxc_shares/nas_rwx

    echo '//NAS/nas/ /mnt/lxc_shares/nas_rwx cifs _netdev,x-systemd.automount,noatime,uid=100000,gid=110000,dir_mode=0770,file_mode=0770,user=smb_username,pass=smb_password 0 0' | tee -a /etc/fstab

    Where //NAS/nas is the IP or hostname of the share (possibly localhost?) followed by the share folder name, and the username and password are set appropriately

    mount /mnt/lxc_shares/nas_rwx

    and if that succeeds,

    echo 'mp0: /mnt/lxc_shares/nas_rwx/,mp=/mnt/nas' | tee -a /etc/pve/lxc/LXC_ID.conf

    replacing LXC_ID with the VM ID of the LXC container (not sure how you get this but if you only have the one you could probably ls /etc/pve/lxc and see what options are there

    Then you should be able to start the LXC back up, and when you get to the point in jellfyfin of setting the media folder, just type /mnt/nas and press enter (or a subdir of it ig) and it should find it

    if you did all that and it didn't work then would need more info to help troubleshoot

    • tactical_trans_karen [she/her, comrade/them]
      hexagon
      ·
      1 year ago

      Yes, that was one of them that I looked at. Got to the point of adding a user (second command) and it didn't work. Also, I don't understand commands very well, the short hand for what you're telling it to do and the labels of files is confusing af to me.

      • YearOfTheCommieDesktop [they/them]
        ·
        edit-2
        1 year ago

        usermod modifies a user. In this case -aG means it is appending to the list of groups that a user is in (in this case so that said user can access files owned by that group). So you're adding the jellyfin user to the lxc_shares group that was just created in command #1. If it failed, my first guess would be that the jellyfin user doesn't exist. without the error message the command spit out, or more details on the setup of the jellyfin LXC, it's hard to say

        I could go into more detail but likely some troubleshooting back and forth would be needed to get it working

        • tactical_trans_karen [she/her, comrade/them]
          hexagon
          ·
          edit-2
          1 year ago

          Good to go: here's what I got so far. I was able to do the first two commands without error so I moved on to the PVE host and started plugging away.

          root@pve:~# mkdir -p /mnt/lxc_shares/nas_rwx root@pve:~# echo '//NAS/nas/ /mnt/lxc_shares/nas_rwx cifs _netdev,x-systemd.automount,noatime,uid=100000,gid=110000,dir_mode=0770,file_mode=0770,user=smb_username,pass=smb_password 0 0' | tee -a /etc/fstab //NAS/nas/ /mnt/lxc_shares/nas_rwx cifs _netdev,x-systemd.automount,noatime,uid=100000,gid=110000,dir_mode=0770,file_mode=0770,user=smb_username,pass=smb_password 0 0 root@pve:~# mount /mnt/lxc_shares/nas_rwx

          mount error: could not resolve address for NAS: Unknown error mount: (hint) your fstab has been modified, but systemd still uses the old version; use 'systemctl daemon-reload' to reload.

          Edit: if it's relevant, I used a helper script to install JF from this site: https://tteck.github.io/Proxmox/

          • YearOfTheCommieDesktop [they/them]
            ·
            edit-2
            1 year ago

            Okay!

            so, where it says //NAS/nas that should be replaced by the IP address (or hostname) of the NAS that you've been using to mount the SMB share on other computers, followed by the folder you want to mount. e.g. //192.168.0.5/mypiratedshit You ought to be able to get this from the windows clients you've successfully mounted it on I would think

            And where it says smb_username and smb_password those should be replaced with the username and password for the SMB share (feel free to redact them if you post here of course just make sure they're filled out right)

            do you have a text editor installed you can use on the PVE host? nano is relatively easy to use if it has it installed... The "echo ... | tee ..." thing the original command is doing will append a line to the /etc/fstab file but since you want to edit a line that's now already there you should use a text editor instead.

            try running nano /etc/fstab (also as root on the pve host). if it doesn't complain that it doesn't exist, go down to the line that starts with //NAS/nas, and change the parts mentioned above to the correct details for your SMB share. Then press Ctrl-X to quit, y to save changed, and then Enter to save at the same filename you loaded it from.

            (and yeah, nano is clunky but it's more user friendly than other options in that you don't have to remember the shortcuts to do different things, they're displayed on screen)

            then once you've got the /etc/fstab line fixed (if you aren't sure if it saved correctly you can always print the contents of the file with cat /etc/fstab), you can try the mount /mnt/lxc_shares/nas_rwx command again

            • tactical_trans_karen [she/her, comrade/them]
              hexagon
              ·
              1 year ago

              Okay, so it's giving me an error:

              root@pve:~# mount /mnt/lxc_shares/nas_rwx mount: /etc/fstab: parse error at line 3 -- ignored mount: /mnt/lxc_shares/nas_rwx: can't find in /etc/fstab. mount: (hint) your fstab has been modified, but systemd still uses the old version; use 'systemctl daemon-reload' to reload.

              I edited the /fstab file like you said and this is the printout:

              proc /proc proc defaults 0 0 //192.168.X.XXX/mnt/XXXX/XXXX /mnt/lxc_shares/nas_rwx cifs _netdev,x-systemd.automount,noatime,uid=100000,gid=110000,dir_mode=0770,file_mode=0770,user=XXXX,pass=XXXX 0 0

              If I then enter the echo command, this is what I get:

              root@pve:~# echo 'mp0: /mnt/lxc_shares/nas_rwx/,mp=/mnt/nas' | tee -a /etc/pve/lxc/100.conf mp0: /mnt/lxc_shares/nas_rwx/,mp=/mnt/nas

              Looks okay?

              I was able to then go on to jelly and the only directory option it gives me to map is "/mnt/nas" and that's not working.

              What do?

              • YearOfTheCommieDesktop [they/them]
                ·
                edit-2
                1 year ago

                hmm okay...

                the parse error is a bit odd. do any of the values substituted for XXXX contain spaces by any chance. /etc/fstab uses spaces to separate the 6 different config parameters, so if any of them contain a space (including the folder names) it messes things up.

                If that's the issue, try substituting the space with \040 i.e. //192.168.1.1/My\040Folder/otherfolder /mnt/lxc_shares/nas_rwx cifs _netdev,x-systemd.automount,noatime,uid=100000,gid=110000,dir_mode=0770,file_mode=0770,user=XXXX,pass=XXXX 0 0

                you might also need to run systemctl daemon-reload and try the mount again like the message suggests, honestly don't recall how that interaction works...

                • tactical_trans_karen [she/her, comrade/them]
                  hexagon
                  ·
                  1 year ago

                  Okay, so I did that. My directory is [IP]/mnt/M14 - Media/Media, so I changed it to /mnt/M14\040-\040Media/Media. Is that correct? it hasn't worked yet, getting this error:

                  mount /mnt/lxc_shares/nas_rwx mount error(2): No such file or directory Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg) mount: (hint) your fstab has been modified, but systemd still uses the old version; use 'systemctl daemon-reload' to reload.

                  • YearOfTheCommieDesktop [they/them]
                    ·
                    1 year ago

                    okay that took care of the space issue at least judging by the different error!

                    https://unix.stackexchange.com/a/154465/162315 this seems to indicate that for CIFS No such file or directory errors could be caused by a variety of non-obvious issues. if you ran the mkdir command the mount point /mnt/lxc_shares/nas_rwx should exist so I'm going to leave that aside.

                    This post seems like a more plausible issue. Is the name of your smb share really "mnt", or is that just the start of the path to the dir you've shared?

                    If that is the actual SMB share name, then maybe it is an issue with subdirectories... In that case I would try mounting the base level share directly, and if that works, then you can change the /etc/pve/lxc/ configuration to only bind mount the subdirectory you want into the jellyfin container.