-
-
Notifications
You must be signed in to change notification settings - Fork 193
Installing MergerFS on a Synology NAS
Marco edited this page Jan 1, 2022
·
4 revisions
Originally from Reddit. Copied and edited with permission.
A different version to overcome some problems with the method below, can her found here
Install Entware
- Create a folder on your hdd (outside rootfs) SSH into your nas and enter "sudo su" , enter in your password. Then run the following command:
mkdir -p /volume1/@Entware/opt
- Remove /opt and mount optware folder. Make sure that /opt folder is empty (Optware is not installed), command will remove /opt folder with its contents at this step. Run each command.
rm -rf /opt
mkdir /opt
mount -o bind "/volume1/@Entware/opt" /opt
- Run install script depending on the processor. Use command 'uname -m' to find out. Then run the corresponding command.
wget -O - http://bin.entware.net/aarch64-k3.10/installer/generic.sh | /bin/sh
wget -O - http://bin.entware.net/armv5sf-k3.2/installer/generic.sh | /bin/sh
wget -O - http://bin.entware.net/armv7sf-k3.2/installer/generic.sh | /bin/sh
wget -O - http://bin.entware.net/x64-k3.2/installer/generic.sh | /bin/sh
- Create an Autostart Task On Synology
Create a triggered user-defined task in Task Scheduler.
- Go to: DSM > Control Panel > Task Scheduler
- Create > Triggered Task > User Defined Script
- General
- Task: Entware
- User: root
- Event: Boot-up
- Pretask: none
- Task Settings
- Run Command: Paste the below script in.
#!/bin/sh
# Mount/Start Entware
mkdir -p /opt
mount -o bind "/volume1/@Entware/opt" /opt
/opt/etc/init.d/rc.unslung start
# Add Entware Profile in Global Profile
if grep -qF '/opt/etc/profile' /etc/profile; then
echo "Confirmed: Entware Profile in Global Profile"
else
echo "Adding: Entware Profile in Global Profile"
cat >> /etc/profile <<"EOF"
# Load Entware Profile
. /opt/etc/profile
EOF
fi
# Update Entware List
/opt/bin/opkg update
-
Reboot your NAS.
-
SSH back into your nas and "sudo su", enter in your password. Then run the following command.
opkg update
- Install mergerfs by the following command.
opkg install mergerfs
- Make sure it's installed by running the following command. Should list mergerfs somewhere in the list.
ls /volume1/@Entware/opt/sbin
This will list the version number.
mergerfs --version
- Configure mergerfs. Note: Change the file paths to your setup.
*MY CONFIG IS (Don't know if it is the perfect setting, but works in my testing) *
mergerfs -o rw,use_ino,allow_other,func.getattr=newest,category.action=all,category.create=ff,dropcacheonclose=true /volume1/Media/TempMedia:/volume1/Media/GMedia /volume1/Media/FinalMedia
- Profit
If you want more info check out animosity22 github: https://github.com/animosity22/homescripts