Giter Site home page Giter Site logo

unraid_rclone_mount's Introduction

Rclone Mount & Upload Scripts for Plex Users

Collection of scripts to create rclone google mounts to allow fast launch times with Plex (or Emby).

The main thread for more support: https://forums.unraid.net/topic/75436-guide-how-to-use-rclone-to-mount-cloud-drives-and-play-files/.

Credits:

Thanks to SenPaiBox and the Unraid community for help in refining the scripts.

Unraid Users Requirements:

  • Unraid Rclone Plugin
    • 1.5.1 or higher needed Details
    • Installs rclone and allows the creation of remotes and mounts
  • Optional: Unraid CA User Scripts Plugin
  • Optional: Create Service Accounts (follow steps 1-4).
    • To mass rename the service accounts use the following steps:
      • Place Auto-Generated Service Accounts into /mnt/user/appdata/other/rclone/service_accounts/
      • Run the following in terminal/ssh
        • Move to directory: cd /mnt/user/appdata/other/rclone/service_accounts/
        • Dry Run:
          • n=1; for f in *.json; do echo mv "$f" "sa_gdrive_upload$((n++)).json"; done
        • Mass Rename:
          • n=1; for f in *.json; do mv "$f" "sa_gdrive_upload$((n++)).json"; done
Non-unRaid Users

Other users need to install rclone and use their preferred way to schedule cron jobs. The scripts install mergerfs, which I think should work for other systems.

  • Optional: Create Service Accounts (follow steps 1-4).
    • For mass renaming: See steps in Unraid Requirements above

    How It Works

    1. Rclone is used to access files on your google drive and to mount them in a folder on your server e.g. mount a gdrive remote called gdrive_vfs: at /mnt/user/mount_rclone/gdrive_vfs
    2. Mergerfs is used to merge files from your rclone mount (/mnt/user/mount_rclone/gdrive_vfs) with local files that exist on your server and haven't been uploaded yet (e.g. /mnt/user/local/gdrive_vfs) in a new mount /mnt/user/mount_unionfs/gdrive_vfs
      • This mergerfs mount allows files to be played by dockers such as Plex, or added to by dockers like radarr etc without the dockers even being aware that some files are local and some are remote. It just doesn't matter
      • The use of a rclone vfs remote allows fast playback, with files streaming within seconds
      • New files added to the mergerfs share are actually written to the local share, where they will stay until the upload script processes them
    3. An upload script is used to upload files in the background from the local folder to the remote. This activity is masked by mergerfs i.e. to plex, radarr etc files haven't 'moved'
    Getting Started
    1. Rclone remote setup
      • Install the rclone plugin and via command line run rclone config and create 1-2 remotes:
        1. Required: gdrive: - a drive remote that connects to your gdrive account. Recommend creating your own client_id
        2. Recommended: gdrive_media_vfs: - a crypt remote that is mounted locally and decrypts the encrypted files uploaded to gdrive:

    2. Once complete your rclone_config file should look something like this:
    3. [gdrive]
      type = drive
      client_id = UNIQUE CLIENT_ID
      client_secret = MATCHING_UNIQUE_SECRET
      scope = drive
      root_folder_id = xxxx
      token = {"xxxxx"}
      server_side_across_configs = true

      [gdrive_media_vfs]
      type = crypt
      remote = gdrive:crypt
      filename_encryption = standard
      directory_name_encryption = true
      password = PASSWORD1
      password2 = PASSWORD2

    4. Or, like this if using service accounts:
    5. [gdrive]
      type = drive
      scope = drive
      service_account_file = /mnt/user/appdata/other/rclone/service_accounts/sa_gdrive.json
      team_drive = TEAM DRIVE ID
      server_side_across_configs = true

      [gdrive_media_vfs]
      type = crypt
      remote = gdrive:crypt
      filename_encryption = standard
      directory_name_encryption = true
      password = PASSWORD1
      password2 = PASSWORD2

      If you need help doing this, please consult the forum thread above.

      It is advisable to create your own client_id to avoid API bans. More Details

    6. Mount script
      • Create a new script using the the user scripts plugin and paste in the rclone_mount script
      • Edit the config lines at the start of the script to choose your remote name, paths etc
      • Choose a suitable cron job. I run this script on a 10 min */10 * * * * schedule so that it automatically remounts if there’s a problem.
      • The script:
        • Checks if an instance is already running, remounts (if cron job set) automatically if mount drops
        • Mounts your rclone gdrive remote
        • Installs mergerfs and creates a mergerfs mount
        • Starts dockers that need the mergerfs mount e.g. plex, radarr

    7. Upload script
      • Create a new script using the the user scripts plugin and paste in the rclone_mount script
      • Edit the config lines at the start of the script to choose your remote name, paths etc - USE THE SAME PATHS
      • Choose a suitable cron job e.g hourly
      • Features:
        • Checks if rclone is installed correctly
        • sets bwlimits
        • There is a cap on uploads by google of 750GB/day. I have added bandwidth scheduling to the script so you can e.g. set an overnight job to upload the daily quota at 30MB/s, have it trickle up over the day at a constant 10MB/s, or set variable speeds over the day
        • The script now stops once the 750GB/day limit is hit (rclone 1.5.1+ required) so there is more flexibility over upload strategies
        • I've also added --min age 10mins to stop any premature uploads and exclusions to stop partial files etc getting uploaded.

    8. Cleanup script
      • Create a new script using the the user scripts plugin and set to run at array start (recommended) or array stop

    Using Mergerfs

    Once the scripts are added you should have a new folder created at /mnt/user/mount_mergerfs/name_of_remote. 

    • Inside this folder, add files that you want uploading to google i.e. create your media folders here
    • This includes any files downloaded by e.g. nzbget (i.e use /mnt/user/mount_unionfs/downloads) that you want radarr etc to move e.g. /mnt/user/mount_mergerfs/google_vfs/movies/Star Wars and /mnt/user/mount_mergerfs/google_vfs/Peppa Pig.
    • To get the best performance out of mergerfs, map dockers to /user --> /mnt/user
      • Then within the docker webui navigate to the relevant folder within the mergerfs share e.g. /user/mount_unionfs/downloads or /user/mount_unionfs/movies. These are the folders to map to plex, radarr, sonarr,nzbget etc
      • DO NOT MAP any folders from local or the rclone mount
      • DO NOT create mappings like /downloads or /media for your dockers. Only use /user --> /mnt/user if you want to ensure the best performance from mergerfs when moving and editing files within the mount
    Troubleshooting

    If you need to unmount manually the command to use is:

    fusermount -uz /path/to/remote

    unraid_rclone_mount's People

    Contributors

    binsonbuzz avatar jesseywhite avatar kajeagentspi avatar kroudy avatar nathanator avatar nixta1 avatar watchmeexplode5 avatar

    Stargazers

     avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

    Watchers

     avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

    unraid_rclone_mount's Issues

    Unraid 6.8.3 CA Script not running on Array start?

    Am i missing something?

    none of the scripts seem to run when i reboot my server, i have my array set to start automatically, and i have the script set to "At startup of array" but it never starts unless i start it manually.

    I'm new to unraid so maybe i'm missing something simple?

    Thanks!

    Error installing mergerfs

    I'm not sure if this issue is just cdn related, when trying to run the mount script I get the following error:

    Mergerfs not installed - installing now.
    fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/main/x86_64/APKINDEX.tar.gz
    2022/02/14 20:50:04 INFO : vfs cache: cleaned: objects 3 (was 3) in use 0, to upload 0, uploading 0, total size 14.004Ki (was 14.004Ki)
    fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/community/x86_64/APKINDEX.tar.gz
    ERROR: http://dl-cdn.alpinelinux.org/alpine/v3.10/main: temporary error (try again later)
    WARNING: Ignoring APKINDEX.00740ba1.tar.gz: No such file or directory
    ERROR: http://dl-cdn.alpinelinux.org/alpine/v3.10/community: temporary error (try again later)
    WARNING: Ignoring APKINDEX.d8b2a6f4.tar.gz: No such file or directory
    2 errors; 14 distinct packages available
    fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/main/x86_64/APKINDEX.tar.gz
    ERROR: http://dl-cdn.alpinelinux.org/alpine/v3.10/main: temporary error (try again later)
    WARNING: Ignoring APKINDEX.00740ba1.tar.gz: No such file or directory
    fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/community/x86_64/APKINDEX.tar.gz
    ERROR: http://dl-cdn.alpinelinux.org/alpine/v3.10/community: temporary error (try again later)
    WARNING: Ignoring APKINDEX.d8b2a6f4.tar.gz: No such file or directory
    ERROR: unsatisfiable constraints:
    

    Would love a workaround :-)

    Uninstall instructions

    Hi,

    If I want to remove this. what steps I need to do ? eg, how to uninstall mergerfs ?

    tahnks

    rclone_upload chunk variables may want adding to the config section

    The following parts of the upload script may warrant being added as variables to the config sections - the choice in chunk size will affect the RAM usage which may be problematic on low RAM machines as rclone will fail due to running out.

    It is probably also worth investigating what changing this setting will do to RAM consumption.

    	--buffer-size 128M \
    	--drive-chunk-size 128M \
    

    Setting LocalFilesShare to ignore causes a move error

    Since LocalFilesShare is not a path the command below generates an invalid path.

    LocalFilesLocation="$LocalFilesShare/$RcloneRemoteName" # Location for local files to be merged with rclone mount

    Therefore, when using the invalid path the command below wont work

    mv $MergerFSMountLocation $LocalFilesLocation

    Logs:

    05.12.2020 02:40:01 INFO: Not creating local folders as requested.
    05.12.2020 02:40:01 INFO: Creating MergerFS folders.
    05.12.2020 02:40:01 INFO: *** Starting mount of remote hai
    05.12.2020 02:40:01 INFO: Checking if this script is already running.
    05.12.2020 02:40:01 INFO: Script not running - proceeding.
    05.12.2020 02:40:01 INFO: *** Checking if online
    05.12.2020 02:40:02 PASSED: *** Internet online
    05.12.2020 02:40:02 INFO: Success hai remote is already mounted.
    05.12.2020 02:40:02 INFO: Mergerfs already installed, proceeding to create mergerfs mount
    05.12.2020 02:40:02 INFO: Creating hai mergerfs mount.
    mv: cannot move '/mnt/user/mount_mergerfs/hai' to 'ignore/hai': No such file or directory
    * ERROR: unable to parse 'branches' - ignore/hai:/mnt/user/mount_rclone/hai
    * ERROR: mountpoint not set
    05.12.2020 02:40:02 INFO: Checking if hai mergerfs mount created.
    05.12.2020 02:40:02 CRITICAL: hai mergerfs mount failed. Stopping dockers.
    binhex-plexpass
    binhex-rtorrentvpn
    Script Finished Dec 05, 2020 02:40.02

    rclone mount script not working

    Hi, I'm trying to move to these scripts from my current RClone config so I can use the Mergerfs but I'm having some issues.

    My rclone config:

    [bestvillamil]
    type = drive
    client_id = XXX
    client_secret = XXX
    scope = drive
    token = XXX
    root_folder_id = XXX

    [bestvillamilsecure]
    type = crypt
    remote = bestvillamil:secure
    filename_encryption = standard
    directory_name_encryption = true
    password = XXX
    password2 = XXX

    [nowjon]
    type = drive
    client_id = XXX
    client_secret = XXX
    scope = drive
    token = XXX
    root_folder_id = XXX

    [nowjonsharedmedia]
    type = crypt
    remote = nowjon:/PDH/
    filename_encryption = standard
    password = XXX
    password2 = XXX

    My current mount script:

    #!/bin/bash
    #----------------------------------------------------------------------------

    mkdir /mnt/disks/bestvillamil
    mkdir /mnt/disks/bestvillamilsecure

    mkdir /mnt/disks/nowjon
    mkdir /mnt/disks/nowjonsharedmedia

    rclone mount --max-read-ahead 1024k --allow-other -vv --drive-impersonate [email protected] bestvillamil: /mnt/disks/bestvillamil &

    rclone mount
    --allow-other
    --cache-chunk-path=/mnt/cache/appdata/rClone/chunks
    --cache-dir=/mnt/cache/appdata/rClone/vfs
    --cache-db-path=/mnt/cache/appdata/rClone/db
    --cache-info-age=60m
    --cache-tmp-upload-path=/mnt/cache/appdata/rClone/upload
    --cache-workers=10
    --cache-writes
    --checkers=10
    --dir-cache-time=60m
    --drive-chunk-size=64M
    --drive-use-trash=false
    --fast-list
    --stats=0
    bestvillamilsecure: /mnt/disks/bestvillamilsecure &

    #Nowjon and Shared Storage
    rclone mount --max-read-ahead 1024k --allow-other -vv nowjon: /mnt/disks/nowjon &
    rclone mount --max-read-ahead 1024k --allow-other -vv nowjonsharedmedia: /mnt/disks/nowjonsharedmedia &

    The script I edited, this doesn't have enough extra LocalFilesShare's, can I just add more?

    #!/bin/bash

    ######################

    Mount Script

    ######################

    Version 0.96.7

    ######################

    ####### EDIT ONLY THESE SETTINGS #######

    INSTRUCTIONS

    1. Change the name of the rclone remote and shares to match your setup

    2. NOTE: enter RcloneRemoteName WITHOUT ':'

    3. Optional: include custom command and bind mount settings

    4. Optional: include extra folders in mergerfs mount

    REQUIRED SETTINGS

    RcloneRemoteName="bestvillamilsecure" # Name of rclone remote mount WITHOUT ':'. NOTE: Choose your encrypted remote for sensitive data
    RcloneMountShare="/mnt/disks/bestvillamilsecure" # where your rclone remote will be located without trailing slash e.g. /mnt/user/mount_rclone
    LocalFilesShare="/mnt/user/Media/Downloads" # location of the local files and MountFolders you want to upload without trailing slash to rclone e.g. /mnt/user/local. Enter 'ignore' to disable
    MergerfsMountShare="/mnt/disks/merge_bestvillamilsecure" # location without trailing slash e.g. /mnt/user/mount_mergerfs. Enter 'ignore' to disable
    DockerStart="binhex-jellyfin binhex-plex binhex-emby binhex-delugevpn binhex-jackett sonarr radarr ombi" # list of dockers, separated by space, to start once mergerfs mount verified. Remember to disable AUTOSTART for dockers added in docker settings page
    MountFolders={"Downloads/Deluge,Downloads/Deluge/Complete,Downloads/Deluge/Incomplete,Movies,TV Shows,Anime"} # comma separated list of folders to create within the mount

    Note: Again - remember to NOT use ':' in your remote name above

    OPTIONAL SETTINGS

    Add extra paths to mergerfs mount in addition to LocalFilesShare

    LocalFilesShare2="/mnt/user/Media/Movies" # without trailing slash e.g. /mnt/user/other__remote_mount/or_other_local_folder. Enter 'ignore' to disable
    LocalFilesShare3="/mnt/user/Media/TV Shows"
    LocalFilesShare4="/mnt/user/Media/Anime"

    Add extra commands or filters

    Command1="--rc"
    Command2=""
    Command3=""
    Command4=""
    Command5=""
    Command6=""
    Command7=""
    Command8=""

    CreateBindMount="N" # Y/N. Choose whether to bind traffic to a particular network adapter
    RCloneMountIP="10.10.10.10" # My unraid IP is 172.30.12.2 so I create another similar IP address
    NetworkAdapter="eth0" # choose your network adapter. eth0 recommended
    VirtualIPNumber="2" # creates eth0:x e.g. eth0:1. I create a unique virtual IP addresses for each mount & upload so I can monitor and traffic shape for each of them

    ####### END SETTINGS #######

    Here's the log from when it ran

    2020/07/26 18:52:34 NOTICE: Encrypted drive 'bestvillamilsecure:': ChangeNotify was unable to decrypt "Scene Naming (Responses)": illegal base32 data at input byte 5
    Script Starting Jul 26, 2020 19:00.01

    Full logs for this script are available at /tmp/user.scripts/tmpScripts/rclone_Mergefs_Mount/log.txt

    26.07.2020 19:00:01 INFO: Creating local folders.
    26.07.2020 19:00:01 INFO: *** Starting mount of remote bestvillamilsecure
    26.07.2020 19:00:01 INFO: Checking if this script is already running.
    26.07.2020 19:00:01 INFO: Script not running - proceeding.
    26.07.2020 19:00:01 INFO: *** Checking if online
    26.07.2020 19:00:07 PASSED: *** Internet online
    26.07.2020 19:00:07 INFO: Success bestvillamilsecure remote is already mounted.
    26.07.2020 19:00:07 INFO: Mergerfs already installed, proceeding to create mergerfs mount
    26.07.2020 19:00:07 INFO: Creating bestvillamilsecure mergerfs mount.
    26.07.2020 19:00:07 INFO: Adding /mnt/user/Media/Movies to bestvillamilsecure mergerfs mount.
    26.07.2020 19:00:07 INFO: Adding /mnt/user/Media/TV Shows to bestvillamilsecure mergerfs mount.
    26.07.2020 19:00:07 INFO: Adding /mnt/user/Media/Anime to bestvillamilsecure mergerfs mount.
    fuse: bad mount point `Shows:/mnt/user/Media/Anime': No such file or directory
    26.07.2020 19:00:07 INFO: Checking if bestvillamilsecure mergerfs mount created.
    26.07.2020 19:00:07 CRITICAL: bestvillamilsecure mergerfs mount failed. Stopping dockers.
    binhex-jellyfin
    binhex-plex
    binhex-emby
    binhex-delugevpn
    binhex-jackett
    sonarr
    radarr
    ombi
    Script Finished Jul 26, 2020 19:00.11

    Full logs for this script are available at /tmp/user.scripts/tmpScripts/rclone_Mergefs_Mount/log.txt

    Please let me know how I can get this working :)

    How would I use this script to mount more than one gdrive (i.e. personal drive and a shared/team drive)

    Hello there,

    This looks really amazing! I am just trying to wrap my head around how all of it would work but from the VERY limited understanding I have about coding it seems that this would really simplify my life to mount the G-drives and get a jellyfin and/or plex server up and running.

    The situation I have is this: I currently have two (maybe more) external hard drives and two separate google drives that I would like to mount together. One of my G drives is my personal drive and one is a shared/team one. I would like my jellyfin/plex docker servers to be able to find the files from both so that I can build a library with them as well as to be able to pull from the local storage I have. I think the end result would be to have a mergerfs mount point with my personal drive, one for my shared drive, and one for all of my local HDDs that jellyfin/plex/etc can read from so that I can access these different containers away from home. Oh and before I forget, I am running all of this off a raspberry pi 4 4gb.

    Based on this scenario, would the scripts that you have come up with help me achieve this goal? And if so, what would be the best way to start? I am about to wipe the current SD card I am using in my RPI4 and likely start again so that I can get Nginx proxy manager working along with the other containers I plan on having. Your scripts seem like it would be the way to go.

    Thank you for all your work and for reading this.

    The mount is making unraid unable to stop array

    I am using unraid 6.8.3

    When clicking stop array, the status is stuck at Array Stopping Retry unmounting user share(s)...

    there are two issues.

    1. /mnt/user cannot be unmounted by the system. I have to manually do fusermount -uz /mnt/user
    2. The script left an empty folder in /mnt/user0/mount_rclone. The system cannot delete it automatically and thus failed to umount /mnt/user0 as it is not empty.

    Please see the log below
    Feb 13 19:50:21 unraidServer emhttpd: shcmd (545): exit status: 32
    Feb 13 19:50:21 unraidServer emhttpd: shcmd (546): rmdir /mnt/user
    Feb 13 19:50:21 unraidServer root: rmdir: failed to remove '/mnt/user': Device or resource busy
    Feb 13 19:50:21 unraidServer emhttpd: shcmd (546): exit status: 1
    Feb 13 19:50:22 unraidServer emhttpd: shcmd (548): /usr/local/sbin/update_cron
    Feb 13 19:50:22 unraidServer emhttpd: Retry unmounting user share(s)...
    Feb 13 19:50:27 unraidServer emhttpd: shcmd (549): umount /mnt/user0
    Feb 13 19:50:27 unraidServer root: umount: /mnt/user0: not mounted.
    Feb 13 19:50:27 unraidServer emhttpd: shcmd (549): exit status: 32
    Feb 13 19:50:27 unraidServer emhttpd: shcmd (550): rmdir /mnt/user0
    Feb 13 19:50:27 unraidServer root: rmdir: failed to remove '/mnt/user0': Directory not empty
    Feb 13 19:50:27 unraidServer emhttpd: shcmd (550): exit status: 1
    Feb 13 19:50:27 unraidServer emhttpd: shcmd (551): umount /mnt/user
    Feb 13 19:50:27 unraidServer root: umount: /mnt/user: target is busy.
    Feb 13 19:50:27 unraidServer emhttpd: shcmd (551): exit status: 32
    Feb 13 19:50:27 unraidServer emhttpd: shcmd (552): rmdir /mnt/user
    Feb 13 19:50:27 unraidServer root: rmdir: failed to remove '/mnt/user': Device or resource busy
    Feb 13 19:50:27 unraidServer emhttpd: shcmd (552): exit status: 1
    Feb 13 19:50:27 unraidServer emhttpd: shcmd (554): /usr/local/sbin/update_cron
    Feb 13 19:50:27 unraidServer emhttpd: Retry unmounting user share(s)...
    Feb 13 19:50:32 unraidServer emhttpd: shcmd (555): umount /mnt/user0
    Feb 13 19:50:32 unraidServer root: umount: /mnt/user0: not mounted.
    Feb 13 19:50:32 unraidServer emhttpd: shcmd (555): exit status: 32
    Feb 13 19:50:32 unraidServer emhttpd: shcmd (556): rmdir /mnt/user0
    Feb 13 19:50:32 unraidServer root: rmdir: failed to remove '/mnt/user0': Directory not empty
    Feb 13 19:50:32 unraidServer emhttpd: shcmd (556): exit status: 1
    Feb 13 19:50:32 unraidServer emhttpd: shcmd (557): umount /mnt/user
    Feb 13 19:50:32 unraidServer root: umount: /mnt/user: target is busy.
    Feb 13 19:50:32 unraidServer emhttpd: shcmd (557): exit status: 32
    Feb 13 19:50:32 unraidServer emhttpd: shcmd (558): rmdir /mnt/user
    Feb 13 19:50:32 unraidServer root: rmdir: failed to remove '/mnt/user': Device or resource busy
    Feb 13 19:50:32 unraidServer emhttpd: shcmd (558): exit status: 1
    Feb 13 19:50:32 unraidServer emhttpd: shcmd (560): /usr/local/sbin/update_cron
    Feb 13 19:50:32 unraidServer emhttpd: Retry unmounting user share(s)...
    Feb 13 19:50:37 unraidServer emhttpd: shcmd (561): umount /mnt/user0
    Feb 13 19:50:37 unraidServer root: umount: /mnt/user0: not mounted.
    Feb 13 19:50:37 unraidServer emhttpd: shcmd (561): exit status: 32
    Feb 13 19:50:37 unraidServer emhttpd: shcmd (562): rmdir /mnt/user0
    Feb 13 19:50:37 unraidServer root: rmdir: failed to remove '/mnt/user0': Directory not empty
    Feb 13 19:50:37 unraidServer emhttpd: shcmd (562): exit status: 1
    Feb 13 19:50:37 unraidServer emhttpd: shcmd (563): umount /mnt/user
    Feb 13 19:50:37 unraidServer root: umount: /mnt/user: target is busy.
    Feb 13 19:50:37 unraidServer emhttpd: shcmd (563): exit status: 32
    Feb 13 19:50:37 unraidServer emhttpd: shcmd (564): rmdir /mnt/user
    Feb 13 19:50:37 unraidServer root: rmdir: failed to remove '/mnt/user': Device or resource busy
    Feb 13 19:50:37 unraidServer emhttpd: shcmd (564): exit status: 1
    Feb 13 19:50:37 unraidServer emhttpd: shcmd (566): /usr/local/sbin/update_cron
    Feb 13 19:50:37 unraidServer emhttpd: Retry unmounting user share(s)...
    Feb 13 19:50:42 unraidServer emhttpd: shcmd (567): umount /mnt/user0
    Feb 13 19:50:42 unraidServer root: umount: /mnt/user0: not mounted.
    Feb 13 19:50:42 unraidServer emhttpd: shcmd (567): exit status: 32
    Feb 13 19:50:42 unraidServer emhttpd: shcmd (568): rmdir /mnt/user0
    Feb 13 19:50:42 unraidServer root: rmdir: failed to remove '/mnt/user0': Directory not empty
    Feb 13 19:50:42 unraidServer emhttpd: shcmd (568): exit status: 1
    Feb 13 19:50:42 unraidServer emhttpd: shcmd (569): umount /mnt/user
    Feb 13 19:50:42 unraidServer root: umount: /mnt/user: target is busy.
    Feb 13 19:50:42 unraidServer emhttpd: shcmd (569): exit status: 32
    Feb 13 19:50:42 unraidServer emhttpd: shcmd (570): rmdir /mnt/user
    Feb 13 19:50:42 unraidServer root: rmdir: failed to remove '/mnt/user': Device or resource busy
    Feb 13 19:50:42 unraidServer emhttpd: shcmd (570): exit status: 1
    Feb 13 19:50:42 unraidServer emhttpd: shcmd (572): /usr/local/sbin/update_cron
    Feb 13 19:50:42 unraidServer emhttpd: Retry unmounting user share(s)...

    New Appdata Backup Plugin

    I'm wondering if any changes will need to be made to account for the new Appdata Backup plugin for Unraid 6.12?

    My unraid log is filling up

    Hello, i have a problem that is filling up my syslog
    its about /mnt/user/mount_rclone
    image

    Can someone help me thanks

    Duplicate Folders

    Hi! I'm running into an issue when I use this script to mount my GDrive inside of Unraid.

    image

    The folders that I'm trying to access in MergerFS seem to be duplicated. So my folder structure used to look like

    /mnt/user/mount_mergerfs/gdrive_vfs/audiobooks
    /mnt/user/mount_mergerfs/gdrive_vfs/tv
    /mnt/user/mount_mergerfs/gdrive_vfs/movies
    etc

    It now appears like
    /mnt/user/mount_mergerfs/gdrive_vfs/audiobooks
    /mnt/user/mount_mergerfs/gdrive_vfs/audiobooks
    /mnt/user/mount_mergerfs/gdrive_vfs/movies
    /mnt/user/mount_mergerfs/gdrive_vfs/movies
    /mnt/user/mount_mergerfs/gdrive_vfs/tv
    /mnt/user/mount_mergerfs/gdrive_vfs/tv

    Whenever I try to ssh into these folders, it will sometimes allow me in (to show me that both folders are identical). Whenever I try deleting or moving the folders, the changes affect my remote storage.

    I've tried renaming my rclone mapping, however the duplication seems to carry over regardless of the name/folder.

    How can I collapse these double folders into a single one? Or just remove one of these mappings so when I try to access /mnt/user/mount_mergerfs/gdrive_vfs/tv it only has 1 option to choose?

    Or is it possible to fully remove any cached data and force rclone to pull down the folder structure from my remote storage? When I run "rclone lsd gdrive_vfs:" it populates a folder structure with single entries.

    My dockers seem to be paralyzed by the choice of accessing 2 identically named folders.

    Getting Error when running mount script Unraid

    Hey everyone has anyone seen this issue before, script has been working perfectly for a couple of years now, recently rebooted server and ran script to mount gdrvie. I am getting error regarding mergerfs not installed successfully -

    pthread_setname_np
    make[2]: *** [Makefile:125: build/fuse_loop.o] Error 1
    make[2]: Leaving directory '/tmp/mergerfs/libfuse'
    make[1]: *** [Makefile:104: objects] Error 2
    make[1]: Leaving directory '/tmp/mergerfs/libfuse'
    make: *** [Makefile:257: libfuse] Error 2
    strip: 'build/mergerfs': No such file
    /tmp/build-mergerfs: line 18: build/mergerfs: not found
    cp: can't stat 'build/mergerfs': No such file or directory
    mv: cannot stat '/mnt/user/appdata/other/rclone/mergerfs/mergerfs': No such file or directory
    15.10.2023 10:53:10 INFO: *sleeping for 5 seconds
    15.10.2023 10:53:15 ERROR: Mergerfs not installed successfully. Please check for errors. Exiting.
    Script Finished Oct 15, 2023 10:53.15

    Works on Synology, with a couple small changes

    I tried your script on my Synology NAS. It gave me a few errors but they were easy to fix. I already had rclone configured with a crypt mount working but I wanted mergerfs and your script has been, by FAR, the easiest way to get that working.

    I had to copy my rclone.conf to /root/.config/rclone/rclone.conf, replace all instances of /mnt/user/ with a home path (just a preference), and I had to run the script with sudo.

    You can see the changes in the attached file. I think if there was a path variable at the top with the others, it would make the script more universal.

    Thanks for developing this, helped me out a lot!

    unraid_rclone_mount.sh.txt

    Recommend Projects

    • React photo React

      A declarative, efficient, and flexible JavaScript library for building user interfaces.

    • Vue.js photo Vue.js

      🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

    • Typescript photo Typescript

      TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

    • TensorFlow photo TensorFlow

      An Open Source Machine Learning Framework for Everyone

    • Django photo Django

      The Web framework for perfectionists with deadlines.

    • D3 photo D3

      Bring data to life with SVG, Canvas and HTML. 📊📈🎉

    Recommend Topics

    • javascript

      JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

    • web

      Some thing interesting about web. New door for the world.

    • server

      A server is a program made to process requests and deliver data to clients.

    • Machine learning

      Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

    • Game

      Some thing interesting about game, make everyone happy.

    Recommend Org

    • Facebook photo Facebook

      We are working to build community through open source technology. NB: members must have two-factor auth.

    • Microsoft photo Microsoft

      Open source projects and samples from Microsoft.

    • Google photo Google

      Google ❤️ Open Source for everyone.

    • D3 photo D3

      Data-Driven Documents codes.