Coder Social home page Coder Social logo

pantastisch / fritz_nas_auto_mount Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 23 KB

Functions and usage to auto-mount your FRITZ!NAS to your Linux or Docker Device

License: GNU General Public License v3.0

fritzbox fritznas fritz avm nas mount fritz-box samba smb cifs

fritz_nas_auto_mount's Introduction

General

Credentials

You get your credentials by adding a new user with FRITZ!NAS access on your router. Fill your credentials based on the table below:

Substitution Description
<ROUTER_IP> Your FRITZ!Box IP (Most times 192.168.178.1)
<NAS_PATH> Path on your NAS device, which you are allowed to access (With your user).
<USERNAME> Your FRITZ!NAS user which will have access to your <NAS_PATH>.
<PASSWORD> Your FRITZ!NAS user password which will have access to your <NAS_PATH>.

fstab Method

Configuration

Just modify /etc/fstab.example with your credentials and merge the content to your own fstab file, located in /etc/fstab on your Linux device.

Usage

  1. Make the NAS path by doing: mkdir /mnt/fritz_nas/<NAS_PATH>

  2. Enable rpcbind by following command: sudo update-rc.d rpcbind enable

  3. Test if your device appears: sudo mount -a

  4. Your NAS will be available on your Linux device on: cd /mnt/fritz_nas/<NAS_PATH>

Docker Method

This method is used in my case, for shared data between multiple docker nodes.

Usage

Create a volume in your docker environement

docker volume create \
    --driver local \
    --opt type=cifs \
    --opt device=//<ROUTER_IP>/fritz.nas/<NAS_PATH> \
    --opt o=uid=0,username=<USERNAME>,password=<PASSWORD>,vers=1.0,file_mode=0770,dir_mode=0770,addr=<ROUTER_IP>,rw \
    FRITZ_NAS_DOCKER

Test your created volume by executing following comands:

docker run -v FRITZ_NAS_DOCKER:/world busybox touch /world/FRITZ_NAS_DOCKER_TEST_FILE
docker run -v FRITZ_NAS_DOCKER:/world busybox ls /world

Your command window shall now show you the folder structure including the new generated file "FRITZ_NAS_DOCKER_TEST_FILE".

Tested FRITZ!Boxes

FRITZ!Box FRITZ!OS Tested Working
FRITZ!Box 6490 Cable < 07.02 ✔️ ✔️

Feel free to test your own FRITZ!Box and add it to this table or create an issue for that.

fritz_nas_auto_mount's People

Contributors

pantastisch avatar

Stargazers

 avatar  avatar

Watchers

 avatar

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.