Skip to content

Downloading into the unionfs mount

Chaz Larson edited this page Oct 24, 2021 · 9 revisions

This page will show you how to setup Cloudbox so that it downloads into /mnt/unionfs/ and allows for instant moves from downloads to media folder.

Details:

When something downloads to a /downloads mount point, Docker sees this as a different file system from /tv, /movies, and /mnt/unionfs mounts, and as such, it does a “copy then delete” move between them. This is just a default behavior of Linux itself.

By downloading directly to a /mnt/unionfs path (e.g. /mnt/unionfs/downloads/nzbs/nzbget/...) and then having the destination as /mnt/unionfs/ as well (e.g. /mnt/unionfs/Media/TV/...), Docker will do a direct/instant move between them.

The reason this is not setup by CB wiki by default is due to instability issues with using UnionFS (the software) with i/o intensive tasks (see warnings on this page). This is out of date at this point and future versions of Cloudbox may be setting this up directly.

Don't be confused between the use of the path /mnt/unionfs for the merged file system and the software which creates it [unionfs or mergerfs]. The warnings on this page apply to the use of the unionfs software; Cloudbox has not used that as the default since at least early 2020, so it unlikely that these warnings apply unless your install is very old or you have taken the positive action to adjust the settings to use unionfs instead of mergerfs.

Warning: Downloading within /mnt/unionfs/, and the subsequent high disk IO, may cause stability issues with UnionFS (the software), and may lead to slow down of any program that accesses it ("gray dots" in Sonarr/Radarr, failed imports, etc) or even a complete dismounting of the /mnt/unionfs path.

Note: MergerFS (the software) handles this better than UnionFS (the software).

Cloudbox has used mergerfs as the default for quite some time now.

NZBGet

  1. Go to "Settings" -> "Paths".

  2. Change paths to:

    Setting Path
    Maindir /mnt/unionfs/downloads/nzbs/nzbget
    Destdir ${MainDir}/completed
    Interdir ${MainDir}/intermediate

    Note: This assumes your NZB downloads folder was set to /mnt/local/downloads/nzbs during the initial setup.

ruTorrent

Warning: Even though this section covers ruTorrent, it is advised that you don't do this if you are using unionfs to create the merged filesystem at /mnt/unionfs, as the heavy load of torrents reading/writing to UnionFS could crash the mount point and cause downloading/seeding failures.

  1. Open /opt/rutorrent/rtorrent/rtorrent.rc.

  2. Change directory to one of the following:

    if your ruTorrent is setup with the old download paths:

    directory.default.set = /mnt/unionfs/downloads/rutorrent
    

    or, if your Torrent downloads folder was set to /mnt/local/downloads/torrents during the initial setup:

    directory.default.set = /mnt/unionfs/downloads/torrents/rutorrent
    

    or, if your ruTorrent has subdirs setup AND your Torrent downloads folder was set to /mnt/local/downloads/torrents during the initial setup:

    directory.default.set = /mnt/unionfs/downloads/torrents/rutorrent/incoming
    method.insert = d.get_finished_dir, simple, "cat=/mnt/unionfs/downloads/torrents/rutorrent/completed/,$d.custom1="
    

Sonarr

Settings

  1. Go to "Settings" -> "Media Management".

  2. Set "Advanced Settings" to Shown.

  3. Scroll down to "Importing".

  4. Set "Use Hardlinks instead of Copy" to No.

    • Note: Having this option enabled will prevent actively seeded/open files from being uploaded during Cloudplow upload tasks.

Root Paths

  1. Go to "Series" -> "Series Editor" -> Select your TV Shows -> "Root Folder" -> "Add a different path".

  2. On the popup window:

    1. Enter in:

      /mnt/unionfs/Media/TV/
      

      Note: If you are using customized paths, then select the proper TV shows path within /mnt/unionfs/Media/.

    2. Press the green check mark to close the window.

  3. Click the blue "Save" button to change the root paths.

Radarr

Settings

  1. Go to "Settings" -> "Media Management".

  2. Set "Advanced Settings" to Shown.

  3. Scroll down to "Importing".

  4. Set "Use Hardlinks instead of Copy" to No.

    • Note: Having this option enabled will prevent actively seeded/open files from being uploaded during Cloudplow upload tasks.

Root Paths

  1. Go to "Movies" -> "Movies Editor" -> Select your movies -> "Root Folder" -> "Add a different path".

  2. On the popup window:

    1. Enter in:

      /mnt/unionfs/Media/Movies/
      

      Note: If you are using customized paths, then select the proper movies path within /mnt/unionfs/Media/.

    2. Press the green check mark to close the window.

  3. Click the blue "Save" button to change the root paths.

Plex Autoscan

No changes required.

Plex

No changes required.

Basics

  1. Introduction
  2. Cloudbox Install Types
  3. Cloudbox Paths
  4. Accessing Cloudbox Apps

Prerequisites

  1. Overview
  2. Presumptions
  3. Server
  4. Domain Name
  5. Cloudflare
  6. Cloud Storage
  7. Plex / Emby - Account
  8. Usenet vs. BitTorrent

Install Cloudbox

Cloudbox
  1. Overview
  2. Dependencies (Choose only one of these)
  3. Settings
  4. Preinstall (Choose only one of these)
  5. SSH
  6. Ansible Vault
  7. Rclone
  8. Cloudbox (Choose only one of these)
  9. Application Setup
    1. NZBGet
    2. ruTorrent
    3. NZBHydra2
    4. Jackett
    5. Plex Media Server
    6. Plex Autoscan
    7. Sonarr
    8. Radarr
    9. Lidarr
    10. PlexPy (Tautulli)
    11. Ombi
    12. Portainer
    13. Organizr
  10. Next Steps

Install Feederbox / Mediabox

Feederbox (do this first)
  1. Overview
  2. Dependencies
  3. Settings
  4. Preinstall
  5. SSH
  6. Ansible Vault
  7. Rclone
  8. Feederbox (Choose only one of these)
  9. Application Setup
    1. NZBGet
    2. ruTorrent
    3. NZBHydra2
    4. Jackett
    5. Sonarr
    6. Radarr
    7. Lidarr
    8. Portainer
    9. Organizr
  10. Next Steps

Mediabox
  1. Overview
  2. Dependencies
  3. Settings
  4. Preinstall
  5. SSH
  6. Ansible Vault
  7. Rclone
  8. Mediabox (Choose only one of these)
  9. Application Setup
    1. Feeder Mount
    2. Plex Media Server
    3. Plex Autoscan
    4. PlexPy (Tautulli)
    5. Ombi
  10. Next Steps

Recommended Reading

Backup and Restore

More Information

Advanced Configuration

Experimental

Extras

Misc

Community-Submitted

See Community Wiki.

Reference

Troubleshooting

Links

Clone this wiki locally