Jump to content
DZMM

Help Installing MergerFS

21 posts in this topic Last Reply

Recommended Posts

I'm posting here as I wasn't sure which board this fits in.  I currently use unionfs to combine local files /rclone_upload/google_vfs with gdrive files I mount using rclone /mount_rclone/google_vfs :

unionfs -o cow,allow_other,direct_io,auto_cache,sync_read /mnt/user/rclone_upload/google_vfs=RW:/mnt/user/mount_rclone/google_vfs=RO /mnt/user/mount_unionfs/google_vfs

I'd like to switch to MergerFS as it supports hardlinking, whereas Unionfs doesn't.  I've installed unionfs via Nerd Pack - can someone give me pointers on how to install Mergerfs please? 

Share this post


Link to post

Bump.  This would be major result for me - I just need a bit of help please

Share this post


Link to post

Anyone ever installed mergerfs on unRAID? I need it to merge a local folder with a rclone mount.

Share this post


Link to post
On 10/17/2018 at 3:10 PM, DZMM said:

Anyone ever installed mergerfs on unRAID? I need it to merge a local folder with a rclone mount.

 

I was looking exactly to it and found this thread from last year. 

I assume, based on your guide for rclone is that unionFS is the only option for unraid? 

 

That's a shame. There's really no way to install MergerFS with unraid?

Share this post


Link to post
On 4/24/2019 at 12:41 PM, TheFreemancer said:

 

I was looking exactly to it and found this thread from last year. 

I assume, based on your guide for rclone is that unionFS is the only option for unraid? 

 

That's a shame. There's really no way to install MergerFS with unraid?

Afraid so.   If you're a rclone user it looks rclone union will get beefed up in 1.48 so I'll be able to ditch unionfs

Edited by DZMM

Share this post


Link to post
Posted (edited)

For those looking for mergerfs for Unraid.

I got super lucky on Reddit & the Mergerfs developer saw our plea for Unraid mergerfs.
https://www.reddit.com/r/unRAID/comments/eiaq99/alternative_to_unionfs_to_merge_folders_on_unraid/

 

Result:

 

He made a docker image for us....once you run, it will build a static image of mergerfs for us to use!
https://hub.docker.com/repository/docker/trapexit/mergerfs-static-build

 

docker run -v /mnt/user/some_unraid_share/mergerfs:/build --rm -it trapexit/mergerfs-static-build

change /mnt/user/some_unraid_share/mergerfs_build_folder ----> an actual location on your unraid OS. After docker run completes and mergerfs is built, you would then likely move/copy it to /bin for active use!

 

Edited by Stupifier
  • Like 1
  • Thanks 1

Share this post


Link to post

Thanks for getting this created - you'll make a lot of users happy when they see this.

 

I'm not sure how to use though.  Once I've created the docker, can I create mergerfs mounts/drives?  I don't understand the bit about moving to /bin?

Share this post


Link to post

I think that docker is just setup to be able to compile and build the mergerfs binaries. Once its built, you would bundle the artifacts into a plugin and hosted on line like github and others would use that plugin to install mergerfs for unraid.

Share this post


Link to post
Posted (edited)
12 hours ago, DZMM said:

Thanks for getting this created - you'll make a lot of users happy when they see this.

 

I'm not sure how to use though.  Once I've created the docker, can I create mergerfs mounts/drives?  I don't understand the bit about moving to /bin?

 

5 hours ago, BRiT said:

I think that docker is just setup to be able to compile and build the mergerfs binaries. Once its built, you would bundle the artifacts into a plugin and hosted on line like github and others would use that plugin to install mergerfs for unraid.

 

  1. in unraid terminal, run the command I code-blocked (changing the path like I said)
  2. It will create a static mergerfs binary in the path you told it to. It's done. The container isn't running in background or anything like that.....it's done.
  3. That binary IS mergerfs.....all self-contained in one file. while you are in that directory in terminal....you can even mergerfs --version and it will spit out version and everything. I said to copy/move it to /bin because that is where binary files go which you intend to use. When a binary is in /bin.....you can execute it from anywhere (just like unionfs/rclone/etc).

I have no experience with bundling or creating unraid plugins like BRiT suggests.....but that really isn't necessary to get this working. All you have to do is run that command I codeblocked.....mergerfs created!

 

Make sense @DZMM? I think you were just over-complicating it.

Edited by Stupifier

Share this post


Link to post
4 hours ago, Stupifier said:

 

 

  1. in unraid terminal, run the command I code-blocked (changing the path like I said)
  2. It will create a static mergerfs binary in the path you told it to. It's done. The container isn't running in background or anything like that.....it's done.
  3. That binary IS mergerfs.....all self-contained in one file. while you are in that directory in terminal....you can even mergerfs --version and it will spit out version and everything. I said to copy/move it to /bin because that is where binary files go which you intend to use. When a binary is in /bin.....you can execute it from anywhere (just like unionfs/rclone/etc).

I have no experience with bundling or creating unraid plugins like BRiT suggests.....but that really isn't necessary to get this working. All you have to do is run that command I codeblocked.....mergerfs created!

 

Make sense @DZMM? I think you were just over-complicating it.

not over-complicating, just showing how dumb I can be!  I got it working and playing with now - thanks!

Share this post


Link to post
19 minutes ago, DZMM said:

not over-complicating, just showing how dumb I can be!  I got it working and playing with now - thanks!

Let me know if it does what you want....I figure you could update your rclone thread for all those interested.

I know you love to do the whole mergerfs/unionfs stuff between local and rclone gdrive....and mergerfs is faster, more robust, and handles deletions/renames much better than unionfs.

 

I personally only use mergerfs on my remote server (not Unraid) for local/rclone_gdrive stuff. I'm familiar with it...just don't use it on unraid.

Share this post


Link to post

How do I copy the file from /user/*** to /bin/ 

 

Im not the shapest hammer in the fridge ;-) when it come to terminal commands ;-)

 

 

---- EDIT ----

 

Found the solution ;-)

 

cp ../mergerfs* /bin

 

 

 

Edited by Virtual

Share this post


Link to post

Any idea how to make the mergerFS file to stay persistently in /bin/ after a reboot? I make the file in /mnt/user/share/name and copy it to /bin, but after a reboot, it's gone from /bin, but survived inside /mnt/user/share/name...

Also, anyone have any idea on how to make it readable from an NFS Client (Proxmox)? noforget and use_ino doesn't allow it..

Edited by joshbgosh10592
Type in mergerFS file

Share this post


Link to post
On 1/17/2020 at 7:32 PM, joshbgosh10592 said:

Any idea how to make the mergerFS file to stay persistently in /bin/ after a reboot? I make the file in /mnt/user/share/name and copy it to /bin, but after a reboot, it's gone from /bin, but survived inside /mnt/user/share/name...

You cannot. The unRAID OS is unpacked fresh into RAM from the flash drive on each boot. Any modifications made to the OS (read files added or changes that are not on the array) are lost on reboot. The correct way of getting something "persistent" is to either package it as an unRAID plugin or to create a script (with the user.scripts plugin) that runs at bootup and re-applies your changes to the OS.

Share this post


Link to post
Posted (edited)

Sorry to necro a slightly outdated thread, but wanted to add that you can also use the unRAID Go file in the config to achieve this and would likely be the best option. You could (depending on the size) simply store this somewhere on the UR USB boot drive, and set the go file to copy this into the bin folder. I’ll be checking this out as well since I’d like to also use mergerfs along with some rclone magic. Thanks for the help guys!

Edited by 1activegeek

Share this post


Link to post
3 hours ago, 1activegeek said:

Sorry to necro a slightly outdated thread, but wanted to add that you can also use the unRAID Go file in the config to achieve this and would likely be the best option. You could (depending on the size) simply store this somewhere on the UR USB boot drive, and set the go file to copy this into the bin folder. I’ll be checking this out as well since I’d like to also use mergerfs along with some rclone magic. Thanks for the help guys!

The OP already wrote an excellent set of script to integrate rclone + mergerfs to Unraid. Have a look so you won't waste time.

 

Share this post


Link to post
Posted (edited)

I think I was thrown off by his post though, as under the changelog it says:

 

3/1/20 - switched from mergerfs to unionfs

 

Though it looks like in the script and GitHub page he mentions MergerFS, so I'm not sure. Perhaps I'll DM him. 

Edited by 1activegeek

Share this post


Link to post
22 minutes ago, 1activegeek said:

I think I was thrown off by his post though, as under the changelog it says:

 


3/1/20 - switched from mergerfs to unionfs

 

Though it looks like in the script and GitHub page he mentions MergerFS, so I'm not sure. Perhaps I'll DM him. 

That was a typo. It's using mergerfs now. First line of the post.

Share this post


Link to post
11 minutes ago, testdasi said:

That was a typo. It's using mergerfs now. First line of the post.

Fixed!

Share this post


Link to post
Posted (edited)

Hey, thanks so much for this script DZMM.

Just a few things: I'm an idiot and it took me forever to get hardlinks working but for anyone else who makes the same error, you need to:

download to /mnt/user/downloads/mount_mergerfs/gcrypt/radarr in order to hardlink to /mnt/user/downloads/mount_mergerfs/gcrypt/hardlink

 

i was doing the following (WRONG😞

download to /mnt/user/downloads/mount_mergerfs/temp in order to hardlink to /mnt/user/downloads/mount_mergerfs/gcrypt/hardlink

it is the gcrypt (or whatever you named it in ur config, default gdrive_vfs) folder that is linked.

 

anyway,

I'm having a bit of an issue with the docker start portion of the script. When I run it, despite all containers having autostart off, I still get:

INFO: dockers already started.

any ideas?

edit: just want to clarify that i meant this occurs at the start of the array, which is when i have the script set to run.

Edited by oldsweatyman

Share this post


Link to post
30 minutes ago, oldsweatyman said:

INFO: dockers already started.

look in the /mnt/user/appdata/other/rclone/remote/your_remote_name folder and delete the dockers_started file.  or, run the unmount script.

 

If you need more help use the main thread.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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.