If you have not already, we suggest setting your Plex username to something else rather than email which is displayed on your posts in forum. You can change the username at https://app.plex.tv/desktop#!/account
Welcome to our forums! Please take a few moments to read through our Community Guidelines (also conveniently linked in the header at the top of each page). There, you'll find guidelines on conduct, tips on getting the help you may be searching for, and more!

Can't browse to root folder in "Add Folder"

orcuttgorcuttg Posts: 47Members, Plex Pass Plex Pass

I used to be able to do this, on a previous version of Plex Media Server, but now that I re-installed PMS the "right" way (i.e. so service plexmediaserver start works) this has STOPPED working.

The attached image shows a user who can browse to root to find their media folder. Mine, in the FreeBSD jail, lives at /media which is exactly where I want it.
However, when I want to add a folder to a library, I see this:

No option to browse to /media

Now, /media IS there; I can tell when I'm ssh'd to the server. And it IS accessible to the Plex user. In fact, if I hard type /media in the textbox at the top of the "add folder" dialog it finds my movies and adds them no problem.

But (for various reasons) I need that button to browse me to / back.

Any ideas?

Best Answer

Answers

  • orcuttgorcuttg Posts: 47Members, Plex Pass Plex Pass

    one clarification: "Media" in the second screenshot above (which is my server) is NOT where I want to go. That's down the filesystem from /media.

  • gbooker02gbooker02 Posts: 605Members, Plex Employee, Plex Pass, Plex Ninja Plex Employee
    edited June 7

    There appears to be an option with jail creation that interferes with the operation of the getfsstat syscall. Can you try running this in the jail to see which mounts it displays:

    #include <sys/param.h>
    #include <sys/ucred.h>
    #include <sys/mount.h>
    
    #include <stdio.h>
    #include <stdlib.h>
    
    int main(int argc, char *argv[])
    {
      struct statfs *mntbuf = 0;
      int fssize = getfsstat(NULL, 0, 0);
    
      if (fssize)
      {
        mntbuf = (struct statfs* )malloc(fssize * sizeof(struct statfs));
        fssize = getfsstat(mntbuf, fssize * sizeof(struct statfs), MNT_WAIT);
      }
    
      if (fssize)
      {
        for (int i = 0; i < fssize; i ++)
          printf("Found %s\n", mntbuf[i].f_mntonname);
      }
    
      free(mntbuf);
    
      return 0;
    }
    

    Put that in a file, such as test.c, run cc test.c and then ./a.out. Your jail may not have a compiler installed by default so you may want to either install one beforehand with pkg or do this in a separate jail (created similarly to the one giving you issues). It should print out all the mount points it finds.

    For reference, my jails do not exhibit any issues so I cannot reproduce this.

  • ahughes03ahughes03 Posts: 153Members, Plex Pass Plex Pass

    @gbooker02
    I created a test folder in my Plex jail, added the test.c file with the code you gave, ran cc test.c and the ./a.out. My output was nothing, my terminal prompt just went to the next line (just as if you'd pressed enter with no command).

    What's weird is that the jail has the proper mounts, and the jail is accessing them currently. All of my media is mounted outside the jail, as is my actual plex dataset, and I am listening to music via plex while typing this, and recently added new media to the server which shows correctly via the database.

    The issue really only seems to effect adding new folders or libraries... For some reason Plex can't seem to see outside of it's database...

    My Plex Server: https://pcpartpicker.com/b/qbJV3C
    My Plex Clients: 3x Odroid C-2 and OpenPHT, a few phones and tablets, etc..
    Setting up a Plex Server on FreeNAS "the right way"
    Setting up your Plex Dataset on FreeNAS "the right way"

  • gbooker02gbooker02 Posts: 605Members, Plex Employee, Plex Pass, Plex Ninja Plex Employee

    No output is what I was expecting given your previous descriptions. What is happening is Plex is populating the left-hand side of the add folder dialog with the list of the mounts. However, the above code indicates that within the jail, it is told about 0 mounts. This appears to be a jail option according to https://www.freebsd.org/cgi/man.cgi?query=jail&sektion=&n=1 (see enforce_statfs). This does not affect visibility of media or anything on the filesystem; only which mountpoints the jail is told about.

    One would normally expect / to be a mounted disk somewhere, but it is not in the list. For reference in my jail it outputted:

    Found /
    
  • ahughes03ahughes03 Posts: 153Members, Plex Pass Plex Pass

    Thanks for the clarification- and I would agree that the expected output would be what you just tagged above.

    I've updated the bug report for FreeNAS here: https://bugs.freenas.org/issues/24082

    @gbooker02 - side question, you'd mentioned that you'd dumped jails. Did you switch over to iohyve?

    My Plex Server: https://pcpartpicker.com/b/qbJV3C
    My Plex Clients: 3x Odroid C-2 and OpenPHT, a few phones and tablets, etc..
    Setting up a Plex Server on FreeNAS "the right way"
    Setting up your Plex Dataset on FreeNAS "the right way"

  • gbooker02gbooker02 Posts: 605Members, Plex Employee, Plex Pass, Plex Ninja Plex Employee

    @gbooker02 - side question, you'd mentioned that you'd dumped jails. Did you switch over to iohyve?

    Yep. I got frustrated with maintaining jails, pkg being painful and out of date, and other issues. So I'm running docker on top of Ubuntu 16.04 inside iohyve. I wrote up my initial work as well as when I changed to running the config dirs inside the VM under ZFS with zfs send/recv backups. I have several containers running there, but the UniFi container made all that work worth it on its own. It is such a pain to get UniFi working in a jail as well as updating it that when it had a critical update, it prompted me to investigate doing this rather than try to coax the new version to run in a jail again.

  • orcuttgorcuttg Posts: 47Members, Plex Pass Plex Pass

    Thanks everyone for your help on this.
    I was starting to despair that anyone would agree that this is a problem. Hopefully Freenas will fix this in a future update.

  • thedarkflame00thedarkflame00 Posts: 1Members, Plex Pass Plex Pass

    i have the same problem i have installed freenas and my jail from scratch but i cant seem to get this fixed.
    i am thinking of revering to a previous version of freenas and using my backup to repopulate my upgraded zfs1 array
    all the fixes talked in this thread is above my capabilities. i have been working on this for 3 days
    i created some new problems along the way so i am frustrated to the bone

  • mikammermikammer Posts: 4Members, Plex Pass Plex Pass

    I just added another ticket on FreeNAS regarding this issue.
    I installed a new FreeNAS system using version 11 on an Asus A68HM F2+ mobo with 8GB and 4 x 6TB drives.
    I am booting up on dual 16GB Kingston sticks.
    I have been seeing this on version 11 and was only able to get the ENTIRE data blob on one media type if I selected / for the media source.
    Any attempts to drop down to /video, /movies /television/, /music etc will not work and the system just spins for a second and indicates no libraries are found.

    I am not able to manually go up and down the directory tree as I was able to using FreeNAS 9.
    It looks like FreeNAS 9 has disappeared from the download area.

    Is it possible to go back easily from 11 to 9? (IF I find an ISO)?

  • ahughes03ahughes03 Posts: 153Members, Plex Pass Plex Pass
    edited July 17

    For the record, @mikammer's bug report was filed about this issue, and Kris closed the ticket with the following comment:

    Updated by Kris Moore 5 days ago

    Status changed from Unscreened to Closed: Not To Be Fixed

    • Plugins and Jails are undergoing an overhaul for 11.1 which should superseded this issue.

    My Plex Server: https://pcpartpicker.com/b/qbJV3C
    My Plex Clients: 3x Odroid C-2 and OpenPHT, a few phones and tablets, etc..
    Setting up a Plex Server on FreeNAS "the right way"
    Setting up your Plex Dataset on FreeNAS "the right way"

  • clplexsclplexs Posts: 4Members, Plex Pass Plex Pass

    Solved - I had the exact same issue - Solved the problem by reverting from FreeNAS-11.0-U1 back to FreeNAS-9.10.2-U5.
    Fortunately found a FreeNAS-9.10.2-U2.iso lying around in my download directory
    Thanks

  • unashamedunashamed Posts: 1Members, Plex Pass Plex Pass

    Im running into this same issue, however have a lot into my FN11 install. Any possible solutions on the horizon?

  • Kingtut18Kingtut18 Posts: 5Members, Plex Pass Plex Pass

    I just installed 11.0 on a new server (upgraded Mobo, CPU, memory, etc)
    ran into this issue.
    I found a workaround, where it shows your relative path (photo from above /usr/something/something) change that by manually typing in your path.
    for me /media/TV for my TV shows, etc worked just fine.

  • orcuttgorcuttg Posts: 47Members, Plex Pass Plex Pass

    Thanks Kingtut. I know about that workaround. I'd still like to browse. It's less work and I'm lazy.

Sign In or Register to comment.