Jump to content
  • 0

Plex DB on DrivePool


LindsayCole

Question

Hey All,

 

 I'm using my server for Plex. I recently moved my PLex appdata to the pool drive.

 

Since then, I am unable to populate metadata inside Plex.

 

From what I understand, apparently the problem is with hard linking.

 

Does Stablebit not support hard linking? Is there a plan in place to support it?

 

 

Link to comment
Share on other sites

17 answers to this question

Recommended Posts

  • 0

Unfortunately, we do not support hard links on the Pool. 

 

This is important because instead of using a database and storing each file that is needed once.... Plex creates the files in a folder structure for each item in the database, and then hard links the files together.

 

So, no, we do not support the plex database on the pool.



As for WHY we don't support it, let me quote Alex (the developer): 

 

  • File hard link - Yet another way to make a file point to another file. However, this method can only be used to point a file to some other file on the same volume.
     
  • File hard link - This is purely a file system construct. Because of the way directory indexes work in NTFS, it is possible to add a file entry to a directory index of a file that already exists under some other directory. Essentially, you can think of the file as being in 2 (or more) places at once. While this is not quantum physics, it is NTFS. Each file has a "reference count" and that count is incremented whenever a hard link is created to it. When the count reaches 0, the file is deleted.

    No other kernel subsystem is involved and no "reparse points" exists. This is the cleanest and purest way of making a file appear in 2 places at once (IMO).

 

 

Specifically, because we are a virtual file system, implementing hard links would be incredibly complex (much more so than reparse points, symbolic links and the like). 

 

For a detailed dive into reparse points and how the various types work, there is an arrow in the top, right corner of the quoted text area.

Link to comment
Share on other sites

  • 0

Wish I'd read this first before spending the two days trying to copy all 1.2 million files/folders to the pool!   I eventually just installed a small SSD just for this, so that any future OS installations won't require a complete database rebuild.   

Well, I hope it's a larger SSD....

I have ~16TBs of various media... and my plex database is ~100GBs. (though I have it configured to download all the metadata it can). So just a warning.

 

And I completely understand the time copying the files.... I just did this a linux VM for Plex... that I may end up removing because it's not working well.

Link to comment
Share on other sites

  • 0

I'm glad that I finally know why it keeps becoming corrupted.  I was starting to worry.  For the most part this drive will only be data and archive files for CrashPlan and WHS backups, but this database is one thing I do want to have duplicates of so I don't have to rebuild again.  Are there plans to add hardlinking support so that this can be hosted on the pool?

Link to comment
Share on other sites

  • 0

Are there plans to add hardlinking support so that this can be hosted on the pool?

Unfortunately, properly not. :(

 

The reason for that is that hard links only link files in between locations/files on the same "physical" disk. Because DrivePool is using a bunch of disks, it makes implementing this ... well, a nightmare.

 

However, we have a workaround to this problem in the works, actually.

Link to comment
Share on other sites

  • 0

Yep, I bought a 180GB SSD just for this (and also, susequently, for my OneDrive folder, as DP doesn't like that in its current implementation either!).   Works like a champ!

A dedicated SSD for the metadata folder is actually a very good idea!

Considering that Plex can be a bit slow about loading this data.... well, "brilliant" is fitting here. :)

 

Though, OneDrive isn't as big of a deal, it is still a good idea. :)

Link to comment
Share on other sites

  • 0

Going to necro this thread with a question for Christopher:

 

Is creating a Cloud drive on top of a drive pool supported? Would this then support the plex database and files (hardlinks)?

 

 

Yes.  Use the "local disk" provider, and you should be able to select the Pool drive.  

 

You can then create drives on the pool.  Just remember that they won't be balanced around while the drive is mounted. 

 

However, hardlinks will then work on the CloudDrive disk. 

Link to comment
Share on other sites

  • 0

Christopher,

 

It won't balance while the cloud drive is mounted or while it is writing to the chunks? Sorry, I was under the assumption that once the chunk had been written to the write lock was released, is that not so?

 

Thank you,

Clay

Link to comment
Share on other sites

  • 0

While it's accessing the chunks. That means reading or writing. 

 

And generally, yes, the write lock is released when it's done writing to. But the file is opened when it's read from, as well.  

 

So this depends on your usage, this may not be an issue at all. But I wanted to make sure it was mentioned, anyways. 

And again, it will only really be an issue if the pool is migrating data around a lot. 

Link to comment
Share on other sites

  • 0

Unfortunately, properly not. :(

 

The reason for that is that hard links only link files in between locations/files on the same "physical" disk. Because DrivePool is using a bunch of disks, it makes implementing this ... well, a nightmare.

 

However, we have a workaround to this problem in the works, actually.

 

Did anything come of the mentioned workaround?

Link to comment
Share on other sites

  • 0
On 10/26/2017 at 2:08 PM, Christopher (Drashna) said:

Nope, unfortunately.  Hard links are crazy complex.  And a nightmare to even consider implementing a work around. 

Another year, another necro.  Any plans for a DrivePool-specific alternative, if something like that would even be possible?

I've got a bunch of 'Linux ISOs' that I'm seeding torrents of, so they need to remain untouched, but I'd like to have them all accessible to Plex in one directory with the ability to delete from one side without affecting the other (just like NTFS hardlinks behave) if I so choose.  If I could just tell DP to "tell Windows this file also exists in this directory, and keep it in whichever directory I don't delete it from", it would save me many TBs of pool space haha.

Link to comment
Share on other sites

  • 0

What I did on mine to work around this issue:  Most of my drives in my pool, I don't assign drive letters as I don't want a million drives showing up in windows. However, on one of the drives, I created a drive letter.  I added it to the pool etc.  After everything was added, measured, balanced etc....I went into the "root" of the drive and created the database folder that Plex looks to.  This is "outside" of the pool; therefore it isn't affected.  Of course this data can't be duplicated via drivepool, but I'm not really worried about the metadata etc for plex.  I've had it setup this way for a couple years now and it works great after having the same issues detailed above.  Hope this helps someone else.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...