From fe263fb9c5beef8a30c13fdec5b7016476b2e609 Mon Sep 17 00:00:00 2001 From: KaHooli Date: Sun, 3 Mar 2024 12:20:41 +1000 Subject: [PATCH 1/4] sync_read: deprecated As per https://github.com/trapexit/mergerfs sync_read: deprecated - Perform reads synchronously. Use async_read=false instead. --- Unraid_Scripts/rclone_mount.sh | 2 +- Unraid_Scripts/rclone_multimount.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Unraid_Scripts/rclone_mount.sh b/Unraid_Scripts/rclone_mount.sh index a2ed6aa..9af5b0a 100644 --- a/Unraid_Scripts/rclone_mount.sh +++ b/Unraid_Scripts/rclone_mount.sh @@ -114,7 +114,7 @@ start() { if ! is_mounted $MOUNT_POINT_MERGERFS; then echo -e "\033[32mRunning mergerfs...\033[0m" - $MERGERFS_BIN $MOUNT_POINT:$MOUNT_POINT_LOCAL $MOUNT_POINT_MERGERFS -o defaults,sync_read,allow_other,category.action=all,category.create=ff + $MERGERFS_BIN $MOUNT_POINT:$MOUNT_POINT_LOCAL $MOUNT_POINT_MERGERFS -o defaults,async_read=false,category.action=all,category.create=ff fi start_docker_containers diff --git a/Unraid_Scripts/rclone_multimount.sh b/Unraid_Scripts/rclone_multimount.sh index c7d882a..e1fec2d 100644 --- a/Unraid_Scripts/rclone_multimount.sh +++ b/Unraid_Scripts/rclone_multimount.sh @@ -151,7 +151,7 @@ start() { # Start mergerfs if ! is_mounted $MOUNT_POINT_MERGERFS; then echo -e "\033[32mRunning mergerfs...\033[0m" - $MERGERFS_BIN $MOUNT_POINT_REMOTE1:$MOUNT_POINT_REMOTE2:$MOUNT_POINT_LOCAL $MOUNT_POINT_MERGERFS -o defaults,sync_read,allow_other,category.action=all,category.create=ff + $MERGERFS_BIN $MOUNT_POINT_REMOTE1:$MOUNT_POINT_REMOTE2:$MOUNT_POINT_LOCAL $MOUNT_POINT_MERGERFS -o defaults,sync_read=false,allow_other,category.action=all,category.create=ff fi # Start Docker containers From 1793faeba628479741584a5595f09c5bd49d01c3 Mon Sep 17 00:00:00 2001 From: KaHooli Date: Sun, 3 Mar 2024 12:22:55 +1000 Subject: [PATCH 2/4] Revert "sync_read: deprecated" This reverts commit fe263fb9c5beef8a30c13fdec5b7016476b2e609. --- Unraid_Scripts/rclone_mount.sh | 2 +- Unraid_Scripts/rclone_multimount.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Unraid_Scripts/rclone_mount.sh b/Unraid_Scripts/rclone_mount.sh index 9af5b0a..a2ed6aa 100644 --- a/Unraid_Scripts/rclone_mount.sh +++ b/Unraid_Scripts/rclone_mount.sh @@ -114,7 +114,7 @@ start() { if ! is_mounted $MOUNT_POINT_MERGERFS; then echo -e "\033[32mRunning mergerfs...\033[0m" - $MERGERFS_BIN $MOUNT_POINT:$MOUNT_POINT_LOCAL $MOUNT_POINT_MERGERFS -o defaults,async_read=false,category.action=all,category.create=ff + $MERGERFS_BIN $MOUNT_POINT:$MOUNT_POINT_LOCAL $MOUNT_POINT_MERGERFS -o defaults,sync_read,allow_other,category.action=all,category.create=ff fi start_docker_containers diff --git a/Unraid_Scripts/rclone_multimount.sh b/Unraid_Scripts/rclone_multimount.sh index e1fec2d..c7d882a 100644 --- a/Unraid_Scripts/rclone_multimount.sh +++ b/Unraid_Scripts/rclone_multimount.sh @@ -151,7 +151,7 @@ start() { # Start mergerfs if ! is_mounted $MOUNT_POINT_MERGERFS; then echo -e "\033[32mRunning mergerfs...\033[0m" - $MERGERFS_BIN $MOUNT_POINT_REMOTE1:$MOUNT_POINT_REMOTE2:$MOUNT_POINT_LOCAL $MOUNT_POINT_MERGERFS -o defaults,sync_read=false,allow_other,category.action=all,category.create=ff + $MERGERFS_BIN $MOUNT_POINT_REMOTE1:$MOUNT_POINT_REMOTE2:$MOUNT_POINT_LOCAL $MOUNT_POINT_MERGERFS -o defaults,sync_read,allow_other,category.action=all,category.create=ff fi # Start Docker containers From 4b621ee8854263204cdee808e06c37c622e2c9f2 Mon Sep 17 00:00:00 2001 From: KaHooli Date: Sun, 3 Mar 2024 12:24:03 +1000 Subject: [PATCH 3/4] sync_read: deprecated As per https://github.com/trapexit/mergerfs sync_read: deprecated - Perform reads synchronously. Use async_read=false instead. --- Unraid_Scripts/rclone_mount.sh | 2 +- Unraid_Scripts/rclone_multimount.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Unraid_Scripts/rclone_mount.sh b/Unraid_Scripts/rclone_mount.sh index a2ed6aa..ec81d69 100644 --- a/Unraid_Scripts/rclone_mount.sh +++ b/Unraid_Scripts/rclone_mount.sh @@ -114,7 +114,7 @@ start() { if ! is_mounted $MOUNT_POINT_MERGERFS; then echo -e "\033[32mRunning mergerfs...\033[0m" - $MERGERFS_BIN $MOUNT_POINT:$MOUNT_POINT_LOCAL $MOUNT_POINT_MERGERFS -o defaults,sync_read,allow_other,category.action=all,category.create=ff + $MERGERFS_BIN $MOUNT_POINT:$MOUNT_POINT_LOCAL $MOUNT_POINT_MERGERFS -o defaults,async_read=false,allow_other,category.action=all,category.create=ff fi start_docker_containers diff --git a/Unraid_Scripts/rclone_multimount.sh b/Unraid_Scripts/rclone_multimount.sh index c7d882a..652daf2 100644 --- a/Unraid_Scripts/rclone_multimount.sh +++ b/Unraid_Scripts/rclone_multimount.sh @@ -151,7 +151,7 @@ start() { # Start mergerfs if ! is_mounted $MOUNT_POINT_MERGERFS; then echo -e "\033[32mRunning mergerfs...\033[0m" - $MERGERFS_BIN $MOUNT_POINT_REMOTE1:$MOUNT_POINT_REMOTE2:$MOUNT_POINT_LOCAL $MOUNT_POINT_MERGERFS -o defaults,sync_read,allow_other,category.action=all,category.create=ff + $MERGERFS_BIN $MOUNT_POINT_REMOTE1:$MOUNT_POINT_REMOTE2:$MOUNT_POINT_LOCAL $MOUNT_POINT_MERGERFS -o defaults,async_read=false,allow_other,category.action=all,category.create=ff fi # Start Docker containers From e91a7af463d125f8cb8c6bd7179902c8744ee98c Mon Sep 17 00:00:00 2001 From: KaHooli Date: Sun, 3 Mar 2024 12:40:55 +1000 Subject: [PATCH 4/4] Updated key MOUNT_POINT_REMOTE Renamed key MOUNT_POINT to MOUNT_POINT_REMOTE --- Unraid_Scripts/rclone_mount.sh | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/Unraid_Scripts/rclone_mount.sh b/Unraid_Scripts/rclone_mount.sh index ec81d69..2a8c4c3 100644 --- a/Unraid_Scripts/rclone_mount.sh +++ b/Unraid_Scripts/rclone_mount.sh @@ -13,7 +13,7 @@ DOCKER_BIN="/usr/bin/docker" RCLONE_REMOTE="remote:/subfolder/" # Rclone & mergerfs mount points -MOUNT_POINT="/mnt/user/cloud/rclonevfs" +MOUNT_POINT_REMOTE="/mnt/user/cloud/rclonevfs" MOUNT_POINT_LOCAL="/mnt/user/cloud/local" MOUNT_POINT_MERGERFS="/mnt/user/cloud/merged" @@ -58,7 +58,7 @@ live_status_check() { } create_required_dirs_and_files() { - for dir in $MOUNT_POINT $MOUNT_POINT_LOCAL $MOUNT_POINT_MERGERFS; do + for dir in $MOUNT_POINT_REMOTE $MOUNT_POINT_LOCAL $MOUNT_POINT_MERGERFS; do if [ ! -d "$dir" ]; then echo -e "\033[33mDirectory $dir does not exist. Creating...\033[0m" mkdir -p "$dir" @@ -107,14 +107,14 @@ start() { exit 1 fi - if ! is_mounted $MOUNT_POINT; then + if ! is_mounted $MOUNT_POINT_REMOTE; then echo -e "\033[32mRunning rclone VFS mount...\033[0m" - $RCLONE_BIN mount $RCLONE_REMOTE $MOUNT_POINT --config $RCLONE_CONFIG --user-agent='Mozilla/5.0' $COMMON_RCLONE_OPTIONS --log-file $LOG_FILE --cache-dir $CACHE_DIR --daemon + $RCLONE_BIN mount $RCLONE_REMOTE $MOUNT_POINT_REMOTE --config $RCLONE_CONFIG --user-agent='Mozilla/5.0' $COMMON_RCLONE_OPTIONS --log-file $LOG_FILE --cache-dir $CACHE_DIR --daemon fi if ! is_mounted $MOUNT_POINT_MERGERFS; then echo -e "\033[32mRunning mergerfs...\033[0m" - $MERGERFS_BIN $MOUNT_POINT:$MOUNT_POINT_LOCAL $MOUNT_POINT_MERGERFS -o defaults,async_read=false,allow_other,category.action=all,category.create=ff + $MERGERFS_BIN $MOUNT_POINT_REMOTE:$MOUNT_POINT_LOCAL $MOUNT_POINT_MERGERFS -o defaults,async_read=false,allow_other,category.action=all,category.create=ff fi start_docker_containers @@ -127,13 +127,13 @@ stop() { $MERGERFS_FUSERMOUNT_BIN -uz $MOUNT_POINT_MERGERFS fi - if is_mounted $MOUNT_POINT; then - $MERGERFS_FUSERMOUNT_BIN -uz $MOUNT_POINT + if is_mounted $MOUNT_POINT_REMOTE; then + $MERGERFS_FUSERMOUNT_BIN -uz $MOUNT_POINT_REMOTE fi } status() { - if is_mounted $MOUNT_POINT; then + if is_mounted $MOUNT_POINT_REMOTE; then echo -e "\033[32mrclone VFS mount is running.\033[0m" else echo -e "\033[31mrclone VFS mount is not running.\033[0m" @@ -155,7 +155,7 @@ status() { } ensure() { - if ! is_mounted $MOUNT_POINT; then + if ! is_mounted $MOUNT_POINT_REMOTE; then echo -e "\033[31mrclone VFS mount is not mounted or not functioning correctly. Remounting...\033[0m" stop start @@ -170,8 +170,8 @@ ensure() { exit_test_mode() { echo -e "\033[31mExiting test mode...\033[0m" - if is_mounted $MOUNT_POINT; then - $MERGERFS_FUSERMOUNT_BIN -uz $MOUNT_POINT + if is_mounted $MOUNT_POINT_REMOTE; then + $MERGERFS_FUSERMOUNT_BIN -uz $MOUNT_POINT_REMOTE fi stop exit 0