I'm just tinkering.. How would i go about getting mergefs integrated to OMV6?
OMV6 MergeFS?
-
- OMV 6.x
- josyd
-
-
Wait for the OS and its plugins to mature or just configure it by hand in fstab which is what I do.
-
... configure it by hand in fstab ....
how do?
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.
-
how do?
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]
-
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]
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.
-
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.
-
Not if you install the sharerootfs plugin.
Oh, Awesome!! Thank you!
-
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.
-
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.
-
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.
Codesudo 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]
-
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?
-
Nope, standard HDDs. I'm running in a Hyper-V VM with the disks passed directly in
-
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 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.
-
I would try one more time without the x-systemd.requires-mounts-for= options. That is so ugly and renders the wildcard globbing pointless.
-
votdev
Hat das Label OMV 6.x (alpha) hinzugefügt.
Jetzt mitmachen!
Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!