Last active
November 20, 2017 15:47
-
-
Save N-Coder/d5ec5356a12d8ee7a9069188e15f75ce to your computer and use it in GitHub Desktop.
Overlay writable overlayFS on top of read-only Stud.IP FUSE
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Allow root access to FUSE devices mounted with -o allow_root option | |
# see https://blog.oxplot.com/allow-root-access-fuse-mount/ | |
echo "user_allow_other" >> /etc/fuse.conf | |
cd ~user/studip | |
# Start studip-fuse in background and mount at ~user/studip/lower | |
studip-fuse --user user12 --format "{semester-lexical}/{course}/{type}/{short-path}/{name}" --mount ./lower --allowroot & | |
# Create sibling directories for overlayFS | |
mkdir upper work merged | |
# Mount overlayFS kernel driver, | |
# - using "lower" directory from studip-fuse as read-only lower layer, | |
# - writing changes to regular "upper" directory, | |
# - storing config in regular "work" directory, | |
# - and providing access to the merged directory tree (i.e. mounted) under "merged". | |
# see https://wiki.archlinux.org/index.php/Overlay_filesystem | |
mount -vt overlay overlay -o lowerdir=lower,upperdir=upper,workdir=work,redirect_dir=on merged |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To unmount: