Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with docker(?) and a mergerfs disk #463

Closed
6 tasks
p3lim opened this issue Jan 20, 2018 · 11 comments
Closed
6 tasks

Issue with docker(?) and a mergerfs disk #463

p3lim opened this issue Jan 20, 2018 · 11 comments

Comments

@p3lim
Copy link

p3lim commented Jan 20, 2018

General description

I noticed while installing ruTorrent through Docker that I any torrent I added was not processing (downloading). After a while I found out (with the assistance of the linuxserver.io community on discord) that it seemed to be mergerfs' fault.
While I have mapped the docker volume to /mnt/storage (a mergerfs disk), the download didn't process, but mapping it directly to a disk (e.g. /mnt/disk2/downloads) it worked flawlessly.

Expected behavior

Just work™ (it should download without any issue)

Actual behavior

Download doesn't work, had to map it directly to a disk.

Precise steps to reproduce the behavior

  1. Install Debian, mergerfs, docker
  2. Set up disks as per config below
  3. Install ruTorrent through docker
  • docker run -v /mnt/storage/downloads:/downloads -e PGID=1001 -e PUID=1001 -p 8080:80 linuxserver/rutorrent
  • PGID and PUID is a dedicated user, which is the owner of the mounts + mergerfs volume (chown <user> /mnt/storage)
  1. Visit rutorrent (<your-ip>:8080)
  2. Add a torrent

At this point, the torrent won't process while the docker volume is mapped to a mergerfs disk, while directly to a disk works fine.

System information

Please provide as much of the following information as possible:

  • mergerfs version: mergerfs -V
mergerfs version: 2.18.0
FUSE library version: 2.9.7
fusermount version: 2.9.7
using FUSE kernel interface version 7.19
  • mergerfs settings: cat /etc/fstab or the command line arguments
/dev/disk/by-id/ata-WDC_WD40EFRX-...-part1  /mnt/disk1      xfs     defaults        0 0
/dev/disk/by-id/ata-WDC_WD40EFRX-...-part1  /mnt/disk2      xfs     defaults        0 0
/dev/disk/by-id/ata-WDC_WD40EFRX-...-part1  /mnt/disk3      xfs     defaults        0 0
/mnt/disk*      /mnt/storage    fuse.mergerfs   direct_io,defaults,allow_other,minfreespace=50G,fsname=mergerfs 0 0
  • Linux version: uname -a
Distributor ID: Debian
Description:    Debian GNU/Linux 9.3 (stretch)
Release:        9.3
Codename:       stretch
Linux debian 4.9.0-4-amd64 #1 SMP Debian 4.9.65-3+deb9u1 (2017-12-23) x86_64 GNU/Linux
  • Versions of any additional software being used
- rtorrent client version 0.9.6.
- ruTorrent 3.8
- Docker version 18.01.0-ce, build 03596f5
  • List of drives, filesystems, & sizes: df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            7.9G     0  7.9G   0% /dev
tmpfs           1.6G  9.7M  1.6G   1% /run
/dev/sda2       148G  2.9G  138G   3% /
tmpfs           7.9G     0  7.9G   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           7.9G     0  7.9G   0% /sys/fs/cgroup
mergerfs         12T  3.1T  8.1T  28% /mnt/storage
/dev/sda1       511M   27M  485M   6% /boot/efi
/dev/sde1       3.7T  2.4T  1.3T  66% /mnt/disk3
/dev/sdb1       3.7T  571G  3.1T  16% /mnt/disk2
/dev/sdd1       3.7T   89G  3.6T   3% /mnt/disk1
tmpfs           1.6G     0  1.6G   0% /run/user/1000
@p3lim
Copy link
Author

p3lim commented Jan 20, 2018

I could probably help nail it down even further if the logs don't stand out.

@trapexit
Copy link
Owner

rtorrent doesn't work with the direct_io flag. It's documented in the tips / notes section https://github.com/trapexit/mergerfs#tips--notes

@p3lim
Copy link
Author

p3lim commented Jan 21, 2018

Thanks for the quick reply, after reading the tips I've decided to mount mergerfs twice (one with direct_io and one with dropcacheonclose=true).
Has there been any benchmarking to see the difference between those two options? Would love to see.

Edit: Getting fuse: unknown option 'dropcacheonclose=true' when mounting.

# mergerfs
/mnt/disk*      /mnt/storage    fuse.mergerfs   direct_io,defaults,allow_other,minfreespace=50G,fsname=mergerfs 0 0
# another one for special cases where mmap is used (rtorrent)
/mnt/disk*      /mnt/storage_cached     fuse.mergerfs   dropcacheonclose=true,defaults,allow_other,minfreespace=50G,fsname=mergerfs     0 0

@trapexit
Copy link
Owner

Benchmarks in my experience are somewhat useless given the number of permutations of hardware and software. Always best to run tests yourself and there are some simple examples to do so in the docs.

As for the unknown option... you're using an old version. Install the latest from the releases github page.

@p3lim
Copy link
Author

p3lim commented Jan 21, 2018

That solved it, thank you so much for the assistance, and for making this tool in the first place.

@p3lim p3lim closed this as completed Jan 21, 2018
@trapexit
Copy link
Owner

No problem.

@nullredvector
Copy link

thank you for this thread! had the same problem!

@trapexit
Copy link
Owner

It's mentioned twice in the docs. Just search rtorrent.

https://github.com/trapexit/mergerfs#tips--notes

@nullredvector
Copy link

ahh google landed me here way before i thought to check the docs :D

@nation-wide
Copy link

Holy **** I almost lost my mind with this issue. Should've looked at mergerfs doc earlier. Thanks for the awesome software.

@DebtFromAbove
Copy link

DebtFromAbove commented Feb 21, 2021

Same problem with influxdb. Glad I came across this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants