Page 1 of 2

[REQUEST] MergerFS

Posted: Thu Apr 11, 2019 6:03 am
by kitchenerer
@QNAP_Stephane can we have this qpkg with rclone/fuse?

https://github.com/trapexit/mergerfs

DESCRIPTION

mergerfs is a union filesystem geared towards simplifying storage and management of files across numerous commodity storage devices. It is similar to mhddfs, unionfs, and aufs.

FEATURES

Runs in userspace (FUSE)
Configurable behaviors
Support for extended attributes (xattrs)
Support for file attributes (chattr)
Runtime configurable (via xattrs)
Safe to run as root
Opportunistic credential caching
Works with heterogeneous filesystem types
Handling of writes to full drives (transparently move file to drive with capacity)
Handles pool of read-only and read/write drives
Turn read-only files into symlinks to increase read performance


Thank you very much!

Re: [REQUEST] MergerFS

Posted: Wed Jun 26, 2019 10:10 pm
by lasseman
I would also like this qpkg!
or some other pointer of how to install mergerfs on QNAP
Thank you

Re: [REQUEST] MergerFS

Posted: Wed Jun 26, 2019 10:27 pm
by dolbyman

Re: [REQUEST] MergerFS

Posted: Thu Sep 05, 2019 2:37 am
by kitchenerer
I end up use union function from RClone(https://rclone.org/union/ ), which gives similar functionality

Re: [REQUEST] MergerFS

Posted: Thu Sep 12, 2019 7:47 pm
by QNAP_Stephane
compiled and available for modern QTS NAS : https://www.qnapclub.eu/fr/qpkg/798

Re: [REQUEST] MergerFS

Posted: Thu Sep 12, 2019 10:31 pm
by kitchenerer
Thanks QNAP_Stephane!

Looks like the compiled mergerfs binary hardcoded to use /bin/mount in QNAP which doesn't support flag '--no-canonicalize'

Code: Select all

[/share/CACHEDEV1_DATA/my_temp_file/mergerfs] # ls -lsa
total 20
4 drwxr-xr-x 5 admin administrators 4096 2019-09-12 10:10 ./
4 drwxr-xr-x 7 admin administrators 4096 2019-09-12 10:09 ../
4 drwxrwxrwx 2 admin administrators 4096 2019-09-12 10:09 dir1/
4 drwxrwxrwx 2 admin administrators 4096 2019-09-12 10:10 dir2/
4 drwxrwxrwx 2 admin administrators 4096 2019-09-12 10:10 dir3/
[/share/CACHEDEV1_DATA/my_temp_file/mergerfs] # mergerfs ./dir1:./dir2 ./dir3
/bin/mount: unrecognized option '--no-canonicalize'
Usage: mount -V                 : print version
       mount -h                 : print this help
       mount                    : list mounted filesystems
       mount -l                 : idem, including volume labels
So far the informational part. Next the mounting.
The command is `mount [-t fstype] something somewhere'.
Details found in /etc/fstab may be omitted.
       mount -a [-t|-O] ...     : mount all stuff from /etc/fstab
       mount device             : mount device at the known place
       mount directory          : mount known device here
       mount -t type dev dir    : ordinary mount command
Note that one does not really mount a device, one mounts
a filesystem (of the given type) found on the device.
One can also mount an already visible directory tree elsewhere:
       mount --bind olddir newdir
or move a subtree:
       mount --move olddir newdir
A device can be given by name, say /dev/hda1 or /dev/cdrom,
or by label, using  -L label  or by uuid, using  -U uuid .
Other options: [-nfFrsvw] [-o options] [-p passwdfd].
For many more details, say  man 8 mount .
is there a way we can point it to use /opt/bin/mount installed by entware?
or we need to manually link it to /bin/mount ?

Re: [REQUEST] MergerFS

Posted: Thu Sep 12, 2019 10:40 pm
by QNAP_Stephane
oh damned.. forgot this point... busybox way

need replace the mount/umount command by another one... grrrrrrr

Re: [REQUEST] MergerFS

Posted: Sun Feb 07, 2021 7:47 am
by webcast
Hi,

@QNAP_Stephane Appear that mergerfs link is not available anymore https://www.qnapclub.eu/fr/qpkg/798
Can you fix?

Thank You

Re: [REQUEST] MergerFS

Posted: Sun Feb 07, 2021 4:59 pm
by philippe.mande
Hi,

Entware QPKG (+2500 packages) have a version of mergefs ... perhaps to test ...

Code: Select all

# opkg list | grep merge
mergerfs - 2.30.0-1 - mergerfs is a union filesystem geared towards simplifying storage and management of files across numerous commodity storage devices. It is similar to mhddfs, unionfs, and aufs.
Advantage, no adding one more QPKG but use existing one with internal update ...

Philippe.

Re: [REQUEST] MergerFS

Posted: Sun Feb 07, 2021 7:56 pm
by webcast
philippe.mande wrote: Sun Feb 07, 2021 4:59 pm Hi,

Entware QPKG (+2500 packages) have a version of mergefs ... perhaps to test ...

Code: Select all

# opkg list | grep merge
mergerfs - 2.30.0-1 - mergerfs is a union filesystem geared towards simplifying storage and management of files across numerous commodity storage devices. It is similar to mhddfs, unionfs, and aufs.
Advantage, no adding one more QPKG but use existing one with internal update ...

Philippe.
This works,
Thank you

Re: [REQUEST] MergerFS

Posted: Sun Apr 18, 2021 10:36 am
by webcast
Hello again,

How to configure and use mergerfs in QNAP? i could create it correctly in ubuntu following some tutorial in internet but this couldn't be reproduced in QNAP because i can't create a service with systemctl i don't have the /etc/systemd folder. This folder is in other place or i can't get this to work in QNAP the same way in ubuntu? Can i use RunLast with mergerfs? Can someone point me the right way?

Thank you

Re: [REQUEST] MergerFS

Posted: Sun Apr 18, 2021 10:50 am
by OneCD
webcast wrote: Sun Apr 18, 2021 10:36 am How to configure and use mergerfs in QNAP? i could create it correctly in ubuntu following some tutorial in internet but this couldn't be reproduced in QNAP because i can't create a service with systemctl i don't have the /etc/systemd folder. This folder is in other place or i can't get this to work in QNAP the same way in ubuntu?
Correct, QTS doesn't use SystemD (like Ubuntu), it uses the older SystemV-style service scripts.
webcast wrote: Sun Apr 18, 2021 10:36 am Can i use RunLast with mergerfs? Can someone point me the right way?
If you've installed the 'mergerfs' package via 'opkg' (Entware), you can create your own SystemV-style init script containing your mount commands. Then put this script into [/opt/etc/init.d/], ensure the filename starts with an uppercase 'S', mark it as executable, and it will be automatically launched when Entware starts. ;)

Check the 'mergerfs' integrated help for the command syntax:

Code: Select all

mergerfs --help

Re: [REQUEST] MergerFS

Posted: Sun Apr 18, 2021 6:53 pm
by webcast
Oh i see. Yes, i am working with Entware mergerfs package.
The problem is that i am not experienced with init.d, the things i am trying are not working at all.
Without worry about the mergerfs command can you put here the structure and steps to do please?
Also, how can i force this script to start only at the end when QNAP completly start and to be the last thing to init after a restart?

Thank you.

Re: [REQUEST] MergerFS

Posted: Sun Apr 18, 2021 8:42 pm
by philippe.mande
Hi,

An init script ... is just a bash / sh script
... if you start a service (server) ... you must used the function provide (read the rc.func provide)
... if you start a "normal" script ... just put it in init.d folder

if script name start with S or have a suffix .sh ... it is launched in the current shell (so at root/admin when Entware start).
if not ... it is forked.

if name is like Snn ... nn is a number to define the order to start in Entware ...

As I know ... you don't be able to know easily when all QPKG are started ... but for QTS a file name /tmp/.boot_done is created ... if your problem is to be sure that all is mounted ... by default it's O.K. when QPKG start (Entware) ... except if a specific QPKG add and remove something but it's extremely rare.
in all case ... testing that folder in mergefs are on ... is always a good idea ...

LAST ... script is started in init phase of the QTS under root with limited environment ... so USE ONLY FULL PATHNAME for any command to avoid problem with PATH or command not found and SET any variable needed by your script.

Philippe.

Re: [REQUEST] MergerFS

Posted: Fri Mar 03, 2023 9:54 pm
by maxpro91
kitchenerer wrote: Thu Sep 12, 2019 10:31 pm Thanks QNAP_Stephane!

Looks like the compiled mergerfs binary hardcoded to use /bin/mount in QNAP which doesn't support flag '--no-canonicalize'

Code: Select all

[/share/CACHEDEV1_DATA/my_temp_file/mergerfs] # ls -lsa
total 20
4 drwxr-xr-x 5 admin administrators 4096 2019-09-12 10:10 ./
4 drwxr-xr-x 7 admin administrators 4096 2019-09-12 10:09 ../
4 drwxrwxrwx 2 admin administrators 4096 2019-09-12 10:09 dir1/
4 drwxrwxrwx 2 admin administrators 4096 2019-09-12 10:10 dir2/
4 drwxrwxrwx 2 admin administrators 4096 2019-09-12 10:10 dir3/
[/share/CACHEDEV1_DATA/my_temp_file/mergerfs] # mergerfs ./dir1:./dir2 ./dir3
/bin/mount: unrecognized option '--no-canonicalize'
Usage: mount -V                 : print version
       mount -h                 : print this help
       mount                    : list mounted filesystems
       mount -l                 : idem, including volume labels
So far the informational part. Next the mounting.
The command is `mount [-t fstype] something somewhere'.
Details found in /etc/fstab may be omitted.
       mount -a [-t|-O] ...     : mount all stuff from /etc/fstab
       mount device             : mount device at the known place
       mount directory          : mount known device here
       mount -t type dev dir    : ordinary mount command
Note that one does not really mount a device, one mounts
a filesystem (of the given type) found on the device.
One can also mount an already visible directory tree elsewhere:
       mount --bind olddir newdir
or move a subtree:
       mount --move olddir newdir
A device can be given by name, say /dev/hda1 or /dev/cdrom,
or by label, using  -L label  or by uuid, using  -U uuid .
Other options: [-nfFrsvw] [-o options] [-p passwdfd].
For many more details, say  man 8 mount .
is there a way we can point it to use /opt/bin/mount installed by entware?
or we need to manually link it to /bin/mount ?
I met the same problem. Anybody managed to get it works?