amd/arm mergerfs docker container. For use-cases check the description.
10K+
All credit goes to trapexit/mergerfs.
If you are here, then you are most likely looking for a simple solution to fuse multiple hard drives' contents to a single mountpoint using mergerfs and docker. There are multiple containers which dockerize mergerfs, however none are regularly updated, with open-sourced dockerfiles (no crypto-miners) and simple to use. This repository attempts to do just that. Simply mount your hard drives as volumes to /disks and mergerfs will make them available under /merged. Exposing the /merged volume to host, you need to use :shared bind to share it between the container and host. Change the volume path on the host to your prefered location and that's it!
Docker run:
docker run -v /mnt/nd1:/disks/nd1 -v /mnt/nd2:/disks/nd2 -v /mnt/nd3:/disks/nd3 -v /mnt/merged:/merged:shared --device /dev/fuse --cap-add SYS_ADMIN -d hvalev/mergerfs
docker-compose:
services:
mergerfs:
image: hvalev/mergerfs:latest
container_name: mergerfs
cap_add:
- SYS_ADMIN
devices:
- /dev/fuse:/dev/fuse
volumes:
- /mnt/nd1:/disks/nd1
- /mnt/nd2:/disks/nd2
- /mnt/nd3:/disks/nd3
- /mnt/merged:/merged:shared
restart: always
parameters.conf with your own using an additional volume mount that maps onto /config inside the docker. You can use the one in the repo as a template.mergerfs parameters by using the MERGERFS_PARAMS environment variable as follows:services:
mergerfs:
image: hvalev/mergerfs:latest
container_name: mergerfs
environment:
MERGERFS_PARAMS: 'moveonenospc=true,dropcacheonclose=true,category.create=mfs,cache.files=partial'
cap_add:
- SYS_ADMIN
devices:
- /dev/fuse:/dev/fuse
volumes:
- /mnt/nd1:/disks/nd1
- /mnt/nd2:/disks/nd2
- /mnt/nd3:/disks/nd3
- /mnt/merged:/merged:shared
restart: always
services:
mergerfs:
image: hvalev/mergerfs:latest
container_name: mergerfs
environment:
MERGERFS_PARAMS: 'moveonenospc=true,dropcacheonclose=true,category.create=mfs,cache.files=partial'
cap_add:
- SYS_ADMIN
devices:
- /dev/fuse:/dev/fuse
volumes:
- /mnt/hd1:/disks/hd1
- /mnt/hd2:/disks/hd2
- /mnt/hd3:/disks/hd3
- /mnt/hd:/merged:shared
restart: always
samba:
image: elswork/samba:3.2.8
container_name: samba
environment:
TZ: 'Europe/Amsterdam'
ports:
- 139:139
- 445:445
volumes:
- /mnt/hd:/mnt/hd
command: '-u "1000:1000:user:user:user_password"
-u "1000:1000:guest:guest:guest_password"
-s "hd:/mnt/hd:rw:user"
-s "media:/mnt/hd:ro:guest"'
restart: unless-stopped
depends_on:
- mergerfs
The following resources have been extremely helpful:
mergerfs itself has the following licence:
/*
ISC License
Copyright (c) 2016, Antonio SJ Musumeci <[email protected]>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
Content type
Image
Digest
sha256:4135862dc…
Size
13.8 MB
Last updated
4 months ago
docker pull hvalev/mergerfs