ironicbadger / pms-wiki

The aim is to share knowledge and information about building an open-source media server.
https://perfectmediaserver.com
Other
405 stars 55 forks source link

Very nice guide! Suggest you update the mergerfs mount command to include 'category.create=mfs' #41

Closed jeff47 closed 2 years ago

jeff47 commented 2 years ago

Just a suggestion to add 'category.create=mfs' to the mergerfs mount command in /etc/fstab. Otherwise it defaults to epmfs, which is not optimal if you are starting from empty drives - which this tutorial assumes.

https://github.com/trapexit/mergerfs#what-policies-should-i-use:

Why are all my files ending up on 1 drive?! Did you start with empty drives? Did you explicitly configure a category.create policy? Are you using an existing path / path preserving policy?

The default create policy is epmfs. That is a path preserving algorithm. With such a policy for mkdir and create with a set of empty drives it will select only 1 drive when the first directory is created. Anything, files or directories, created in that first directory will be placed on the same branch because it is preserving paths.

This catches a lot of new users off guard but changing the default would break the setup for many existing users. If you do not care about path preservation and wish your files to be spread across all your drives change to mfs or similar policy as described above. If you do want path preservation you'll need to perform the manual act of creating paths on the drives you want the data to land on before transferring your data. Setting func.mkdir=epall can simplify managing path preservation for create. Or use func.mkdir=rand if you're interested in just grouping together directory content by drive.

ironicbadger commented 2 years ago

@trapexit do you have any suggestions on the above?

trapexit commented 2 years ago

As with all policy the choice one may want depends on their usecase as I go into detail in the docs. Many people who have empty drives likely would prefer a non-path preserving policy. But not all. So :man_shrugging:.

ironicbadger commented 2 years ago

Closing as I think this is answered now.