Plex Media Server plugin filling main boot partition

  • A couple months back, I installed OMV on my RPi3 and everything worked smoothly for quite a while. I had Plex, SMB, VPN, and other plugins working beautifully. Something happened to nuke it all and I started from scratch. This is where I started to run into trouble. My 8gb sd card started to fill up rapidly, locking me out of the web portal. So I tried going to a bigger card. Still no dice. I tried different configurations. I googled up and down trying to figure out what was going on, to no avail.


    I've finally narrowed it down to Plex. Right now, its the only non-preinstalled plugin running, and it filled up the 3gb partition in no time. I shut down Plex, and it stopped filling up. So, clearly something is going on. The only thing I can think is that my database folder is somehow filling it up, but I don't know how to find it. According to the Plex plugin, it should be going to the external hard drive. So, right now, I'm at an impasse and I don't know what to do. Any suggestions?


    PS -
    My level of knowledge of linux is fairly low. I get how it works but sometimes need to be walked thru like an idiot, sometimes not. So, be gentle with your instructions :)

    • Offizieller Beitrag

    OK, first, what do you mean by adding a "bigger" card? Second, how did you copy OMV onto the bigger card?


    What I'm getting at is, if you used a disk imager (like Win32DiskImager) you could "read" the disk image from your old card (assuming that it was the 8GB card) and "write" the image to the larger card. If that's what you did, and all you did, the new larger card is doing nothing for you.


    You'd have to use Gparted (or something like it) to enlarge the partitions on the larger SD card. Before you do the following, if you know how to use Win32DiskImager to read an SD card, backup your SD Card to a file first.
    ________________________________________________________________________


    First note that Flash card partitions, partition sizing, reallocating, partition moving, etc., works just like it does with spinning hard drives


    On your PI SD card (assuming your using OMV 2.0 or 3.0)
    - There are 3 partitions.
    - The first and smallest is labeled "boot" and is formatted fat16.
    - The second is labeled "omv" and is formatted ext4. (This is the one you're most concerned with.)
    - The third doesn't have a label and is formatted ext4.


    The following are names you're likely to see in Gparted.


    (As my card was displayed as);
    /dev/sdd


    The partitions on /dev/sdd were as follows:
    /dev/sdd1 - boot - fat16
    /dev/sdd2 - omv - ext4
    /dev/sdd3 - - ext4
    **Note your SD card device name may be different. You'll be looking for the device that is roughly 8GB to 16GB, depending on the size of your card.**
    ____________________________________________


    - I used a bootable Gparted CD, with a standard PC. Whether your PC is Intel or AMD based, get the version you need here. Gparted ISO


    - Put your SD card in your PC's media slot before booting up on the Gparted CD, so it will be recognized.


    - When the Gparted cd boots up, the partition editor will load automatically.
    - In the upper right hand corner of the Gparted window is a device drop down box. By default, the entry in the box is usually /dev/sda. This is your primary hard drive on your PC. You definitely want to leave this alone.
    - Hit the drop down arrow next to this box and select your SD card. Again, it might be /dev/sdd. Remember to select the device that is roughly 8 to 16 GB in size or larger depending on the size card you used.


    After selecting the SD card, 3 partitions will be displayed, shown, left to right.
    - /dev/ssd1 labeled "boot" will be the first. Leave it alone. (It's about 56meg in size, with about 1/2 of that used.)
    - The partition you're particularly interested in enlarging is the second one, /dev/sdd2 labeled "omv". But you won't be able to do that until you do the following.
    - I had to "move" one partition, the unlabeled one, /dev/sdd3 all the way to the right and to the end. In the process, I allocated about 5GB to this partition. Moving the data in /dev/sdd3 will take a few minutes. Be patient.
    - Then I resized dev/ssd2, labeled omv, to use all of the unallocated space to the right. (Just pull the right arrow all the way right.) If you're using a 16GB card this partition will be 8GB or more. (For this purpose, that's plenty.)
    ______________________________________________


    I'll be out of town for a few days. If you're unsure of the above, if I missed something, or if something doesn't look right in Gparted, I'll try to help when I get back.


    If you resize the partitions, the above should get you back into your PI and give you some time to figure out what's going on. If it's the plex plugin, maybe you should visit the Plex site, look at PLEX admin doc's, find out where PLEX stores things by default, and figure how to change them. (Things like LOG files, database entry's etc.)


    Saying that Plex needs just a bit more room for it's DB (or something similar), with a bit of luck, maybe expanding the "omv" partition may take care of the problem permanently.


    Let me know how it went.

  • Sorry, I didn't give enough details.


    Basically, each time it locked up I just started from scratch. Formatted the SD card and started fresh. Working with the RPi, I've often found that when I've borked stuff I might as well just start over.


    I am aware of GParted, but I was hoping there was an easier way. Just going to have to bite the bullet and set that up.


    I'm just wondering what is going on with the Plex plugin, because it didn't do this a couple months back. I've seen other reports of this happening, but no real solutions.


    I'll keep playing and let you know what I find. Thanks!

  • If you have a huge folder named /var/lib/plexmediaserver on the rootfs that would explain your problem.


    I run my OMV on a tiny 16GB SSD. My Plex database is over 200GB and growing. Obviously that won't fit on the rootfs. It's stored under /media on one of the 3TB hard drives.


    The plugin allows you to set which drive to use for this. Have you done this yet?


    Where is your Plex Media Server database stored?

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

    • Offizieller Beitrag


    Basically, each time it locked up I just started from scratch. Formatted the SD card and started fresh. Working with the RPi, I've often found that when I've borked stuff I might as well just start over.

    You really need to check out Win32DiskImager, f/u/w Windows based PC's. (There are similar app's for Linux.) It's easy to use. Run it, find the OMV configured SD Card (whatever drive letter your PC assigns it), type in a file name and "read" the card to an image file. The image file is now a backup. You can "write" this image file to the same sized SD card (or larger) as many times as you like. So, you can have pre-configured backup (or a punt position) for the next time you "bork up" your install, or for when an SD card fails. Time wise, this beats rebuilding from scratch.



    I am aware of GParted, but I was hoping there was an easier way. Just going to have to bite the bullet and set that up.

    Once you enlarge the OMV SD card partitions for 16GB (noted previously), you can "read" the card into an image file with Win32DiskImager and write 16GB cards with expanded partition thereafter. So, you'll only have to do it once.
    Sorry, thou. One of the easiest way to resize partitions is Gparted. You don't want to try it something like that from the CLI. (That's ugly and hazardous.)


    I'm just wondering what is going on with the Plex plugin, because it didn't do this a couple months back. I've seen other reports of this happening, but no real solutions

    If you ran a standard update of OMV, you might have inadvertently updated the PLEX plugin to a later version. The update may have changed the default paths where it writes it's files. (That's speculation but it would explain why "suddenly" the Plex plugin became a problem) I don't know because I don't use that plugin.


    However, I had similar problems with Urbackup. First Urbackup tried to write data files to my SD card. (Obviously, that couldn't be allowed.) I redirected client backup files to the 4TB drive. All was fine for awhile, then it was having trouble backing up a particular client. While completed data files where going to the right place, Urbackup must have been writing temp files to the SD card during failed backup attempts. After several backup failures, my SD card (the omv partition) was full. OMV, originally, was on an 8GB card. I wrote it to a 16GB card and expanded the partitions with Gpartd. After the first backup success of the troubled client, the extra files purged. (There was a large drop.) Still, for insurance against a similar event, I keep the larger partitions.

    gderf is right. It's important run down where your version of plex is storing things, data, log's, it's DB, update files, etc.


    Good Luck

  • If you have a huge folder named /var/lib/plexmediaserver on the rootfs that would explain your problem.

    The plugin allows you to set which drive to use for this. Have you done this yet?


    Where is your Plex Media Server database stored?


    PLEX plugin seems not to honor my volume request. It did create /srv/dc866/plexmediaserver/ yet still uses /var/lib/plexmediaserver. What could I be doing wrong?




    Version7.0-32 (Sandworm)
    ProcessorAMD EPYC 7302P 16-Core Processor
    KernelLinux 6.1.15-1-pve
    HardwareDell R7515
  • When you change the location using the plugin, you have to be patient and depending on how large your database is it can take quite a while for the change to complete.


    When you make this change several things happen. The database is moved to the new location. Then every file and folder within the database is chowned to plex:nogroup. This can take a long time for a large database.


    Is the change operation within the plugin completing?

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

  • When you change the location using the plugin, you have to be patient and depending on how large your database is it can take quite a while for the change to complete.

    Is the change operation within the plugin completing?


    Thanks for your reply.
    Because I set the location during the first running of the PLEX server; I assume that at that point there should be no data to move.


    I am curious if it may be a permissions issue. So I set Plex as owner and group of the directories I wast it to manage
    root@OMVi3:~# chown -R plex: plex*
    I hope that this will make a difference.


    Version7.0-32 (Sandworm)
    ProcessorAMD EPYC 7302P 16-Core Processor
    KernelLinux 6.1.15-1-pve
    HardwareDell R7515
  • On my OMV 2.x and 3.x installs, the plugin sets the ownership of all database folders and files to plex:nogroup regardless of how they were set prior to enabling the plugin and saving and applying the settings. Even if the ownerships are already set to plex:nogroup, the plugin will still reset them even though this would have been unnecessary, probably because it is faster to change the ownerships when compared to checking to see if the change is required and then changed if needed. Every time a setting within the plugin is changed, saved, and applied, chown is run against the database, and as your media collection grows, this will take longer and longer to complete.


    You may be confusing ownership requirements of the database with those of the media files. The latter are typically set to plex:plex, but depending on the user membership list within the plex group and the permissions, you might not be able to access the files and folders as an arbitrary user.

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

    Einmal editiert, zuletzt von gderf ()

    • Offizieller Beitrag

    On my OMV 2.x and 3.x installs, the plugin sets the ownership of all database folders and files to plex:nogroup regardless of how they were set prior to enabling the plugin and saving and applying the settings. Even if the ownerships are already set to plex:nogroup, the plugin will still reset them even though this would have been unnecessary, probably because it is faster to change the ownerships when compared to checking to see if the change is required and then changed if needed. Every time a setting within the plugin is changed, saved, and applied, chown is run against the database, and as your media collection grows, this will take longer and longer to complete.

    I would love to see a better option but I don't think there is one without running plex as root.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • I don't have a problem with the way the plugin behaves. For me it was a one time set it and forget it thing and I haven't touched it since. I do feel that it's worth mentioning that running chown on a 220GB+ database is not going to complete quickly. This may be mistaken as a hang, but IIRC even if you kill the browser session while the plugin is waiting to finish it won't do any harm and chown will continue to run to completion.


    Would it be possible to execute the chown as a detached operation that completes in the background and frees up the browser once the changes are applied and saved?

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!