How to install mergerfs in kde linux?

Hello,

In testing kde linux, how would one install mergerfs ?

Thank you.

Presumably with one of the options specified at Install Software Not Available in Discover - KDE Linux.

What’s your use case?

Basically, like the description says, “makes multiple filesystems and/or directories appear as a single unified directory”.
Here’s a general view.

A         +      B        =       C
/disk1           /disk2           /merged
|                |                |
+-- /dir1        +-- /dir1        +-- /dir1
|   |            |   |            |   |
|   +-- file1    |   |            |   +-- file1
|                |   +-- file2    |   +-- file2
|                |   +-- file3    |   +-- file3
|                |                |
+-- /dir2        |                +-- /dir2
|   |            |                |   |
|   +-- file4    |                |   +-- file4
|                |                |
|                +-- /dir3        +-- /dir3
|                |   |            |   |
|                |   +-- file5    |   +-- file5
|                |                |
+-- file6        |                +-- file6
+-- file7        +-- file7        +-- file7

I currently use it in kde neon. mergerfs needs to be present at boot time 'cause an entry must exist in /etc/fstab.
For example “/home/user:/media/user/drive1:/media/user/drive2 /media/user/all fuse.mergerfs …”
It mounts a mergerfs into /media/user/all made out of /home/user and /media/user/drive1 and /media/user/drive2

I have a link named “videos” in ~ . It points to /media/user/all/video.
“video” folder will be created, if needed, in all underlying real drives/folder by mergerfs.

That way i just use that single link (~/videos) and mergerfs manages the rest. Don’t care anymore about space constrains/partitions/drives/etc.

The alternative offered by btrfs span volumes, if i loose single drive, all is lost. In mergerfs if i loose a single drive, only the files on that drive are lost.

Very interesting.

Personally I’d use RAID 5 if I had three disks I wanted to merge into a single bucket. But to each their own!

In KDE Linux, you’d have to get this tool using Nix, or compile it from source code and overlay it on top of /usr with a systemd extension. Both options are explained in the link I provided.

Unfortunately I don’t think either of these would make the tool available when /etc/fstab is processed at boot time, like OP wants.

Sysexts aren’t mounted until after /etc/fstab mounts have been done (systemd-sysext.service has After=local-fs.target).

One approach might be to exclude these mergerfs mounts from /etc/fstab, create separate mount units for them, and have those units run only after the sysexts are mounted.

fstab has an option for not mounting on boot. You can keep the mount command lines there and mount later.