OMV6 MergeFS?

  • Wait for the OS and its plugins to mature or just configure it by hand in fstab which is what I do.

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


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

  • ... configure it by hand in fstab ....

    how do? :huh:

    i cant code, but i know my way around 'nix if that's of any consolation..

    I just wasn't sure if there was an "easy" way i was over looking

  • I am working on porting mergerfs but I want to change it a lot for OMV 6.x. I want to combine the two plugins (mergerfsfolders and unionfilesystems) and use systemd mount files instead of fstab. Progress is slow though.

    omv 6.0.5-2 Shaitan | 64 bit | 5.13 proxmox kernel | omvextrasorg 6.0.4 | kvm plugin 6.0
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • how do? :huh:

    i cant code, but i know my way around 'nix if that's of any consolation..

    I just wasn't sure if there was an "easy" way i was over looking


    The mergerfs documentation is excellent and will tell you what you need to know.


    https://github.com/trapexit/mergerfs


    Here is the one liner in my /etc/fstab as an example. I haven't made any changes to it in several years. And when I add a disk I want to be in this pool all I have to do is put the correct directory structure on the disk, no need to edit the fstab entry. The use of wildcard globbing makes it easy.


    Code
    # >>> [sftp-mergerfs]
    /srv/dev-disk-by-*/multimedia-content-d* /srv/dev-disk-by-label-d1/sftp/outgoing fuse.mergerfs defaults,nofail,fsname=mergerfs-sftp-outgoing,nonempty,allow_other,category.create=lfs,moveonenospc=true,minfreespace=110G,noforget,use_ino,inodecalc=path-hash 0 0
    # <<< [sftp-mergerfs]

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


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

  • This is awesome thank you for posting. I had mine manually keyed in with UUIDs which was a pain.


    How do you get a manually added mergerfs share to show up in the OMV 6 UI? Or do you handle that manually as well? I have a merged folder in /srv but I can't see it to create a shared folder on it within the UI.

  • I don't use OMV 6 yet. I didn't have any problem creating a shared folder from the mergerfs mount directory in the OMV 5 UI.

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


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

  • Thanks gderf. Maybe I shouldn't have upgraded to OMV 6, it requires a drive (like /dev/sdc) to create shared folders from.


    Your /etc/fstab globbing solution doesn't work for me, either. Not sure what I've done wrong, but if I boot with this enabled my entire filesystem gets mounted as read-only.


    Code
    /srv/dev-disk-by-*/media* /srv/mergedfs fuse.mergerfs defaults,allow_other,direct_io,use_ino,category.create=mfs,minfreespace=10G 0 0


    I have the same problem even if I explicitly call out the drives. Explicitly calling the drives works if I use the mergerfs command, but putting anything from mergerfs in my fstab appears to cause problems.

  • t requires a drive (like /dev/sdc) to create shared folders from.

    Not if you install the sharerootfs plugin.

    omv 6.0.5-2 Shaitan | 64 bit | 5.13 proxmox kernel | omvextrasorg 6.0.4 | kvm plugin 6.0
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • Code
    /srv/dev-disk-by-*/media* /srv/mergedfs fuse.mergerfs defaults,allow_other,direct_io,use_ino,category.create=mfs,minfreespace=10G 0 0

    In your fstab statement you have several places where you have two or three blank spaces instead of one. I suggest fixing that and trying again.

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


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

  • In your fstab statement you have several places where you have two or three blank spaces instead of one. I suggest fixing that and trying again.

    That shouldn't cause any problems with fstab but I think two wildcards might. I will test the double wildcard.

    omv 6.0.5-2 Shaitan | 64 bit | 5.13 proxmox kernel | omvextrasorg 6.0.4 | kvm plugin 6.0
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • In your fstab statement you have several places where you have two or three blank spaces instead of one. I suggest fixing that and trying again.

    Thanks for the suggestion. Unfortunately, no dice.


    Code
    sudo mergerfs -o allow_other,use_ino,direct_io,category.create=mfs,minfreespace=10G,nonempty /srv/dev-disk-by-\*/media\* /srv/mergerfs1

    This works, I just need to run it every time the machine boots which is less than optimal. I can probably get it into a systemd service, I've just had bad luck trying to do that in the past. When it comes to these sorts of things, I only really know enough to be dangerous.


    The same thing in fstab gives me a folder that lists as "no such file or directory" with ???? for permissions, owner, and group when I ls /srv [using /srv/mergedfs instead of /srv/mergerfs1 intentionally so I can see the difference between the two methods]


    Code
    /srv/dev-disk-by-*/media* /srv/mergedfs fuse.mergerfs defaults,allow_other,direct_io,use_ino,category.create=mfs,minfreespace=10G,nonempty 0 0
  • I just tested and the double wildcard works. Here is my line:


    /srv/dev-disk-by-*-d* /srv/8d0d73a5-246e-4cf9-91d0-d4808eeeda41 fuse.mergerfs category.create=epmfs,minfreespace=4G,fsname=p1:8d0d73a5-246e-4cf9-91d0-d4808eeeda41,defaults,allow_other,cache.files=off,use_ino 0 0


    Are you disks USB?

    omv 6.0.5-2 Shaitan | 64 bit | 5.13 proxmox kernel | omvextrasorg 6.0.4 | kvm plugin 6.0
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • move category and minfreespace to beginning on the options. I am pretty sure they have to be before "defaults". Otherwise, they are ignored. Or just remove default all together.

    omv 6.0.5-2 Shaitan | 64 bit | 5.13 proxmox kernel | omvextrasorg 6.0.4 | kvm plugin 6.0
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • I think I figured out the problem. mount.fuse is not installed (which mount.fuse returns not found) and is a requirement for mounting from fstab. I'm running on the latest OMV ISO.


    Unfortunately, from what I read for Debian this is supposed to be included in the fuse package. The fuse package is definitely installed, and I've force reinstalled it as well but no dice.


    I was wrong, I do have mount.fuse, it's just in /sbin which isn't included in my user $PATH. Running sudo which mount.fuse returns /sbin/mount.fuse which should work, right?

  • move category and minfreespace to beginning on the options. I am pretty sure they have to be before "defaults". Otherwise, they are ignored. Or just remove default all together.

    I solved it! Thank you and gderf for all your help.


    I noticed that if I ran mount -a after booting that the mount would work, so the problem wasn't the entry in /etc/fstab as I had believed.


    The problem was the order of operations in systemd. By adding x-systemd.requires-mounts-for= for each of the drives to be merged together, the mount finally works! My working fstab entry is below


    Code
    /srv/dev-disk-by-*/media* /srv/mergedfs fuse.mergerfs category.create=mfs,minfreespace=10G,defaults,nonempty,allow_other,direct_io,use_ino,x-systemd.requires-mounts-for=/srv/dev-disk-by-uuid-7e3d4e5e-228e-47cd-ac2c-77e7f9c1f64e,x-systemd.requires-mounts-for=/srv/dev-disk-by-uuid-2d0face8-47a8-492a-a2fb-f50bcd2826c5,x-systemd.requires-mounts-for=/srv/dev-disk-by-uuid-02c39460-394e-4bec-aecd-33fade3843cf,x-systemd.requires-mounts-for=/srv/dev-disk-by-uuid-dc17cfe1-1df5-4a88-941a-7f90bfd1b071 0 0
  • The plugin does have that option but I am hoping to move to systemd mount files for the OMV 6 version of the plugin to solve issues like this.

    omv 6.0.5-2 Shaitan | 64 bit | 5.13 proxmox kernel | omvextrasorg 6.0.4 | kvm plugin 6.0
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • I would try one more time without the x-systemd.requires-mounts-for= options. That is so ugly and renders the wildcard globbing pointless.

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


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

  • votdev

    Added the Label OMV 6.x (alpha)

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!