kmxz / overlayfs-tools Goto Github PK
View Code? Open in Web Editor NEWMaintenance tools for overlay-filesystem
License: Do What The F*ck You Want To Public License
Maintenance tools for overlay-filesystem
License: Do What The F*ck You Want To Public License
When run command: overlay -v -l /media/root-ro -u /media/root-rw/overlay -f diff
I have got an error: "Action aborted due to fatal error." that points "File %s can not be read for content." (for example /etc/ssh/sshd_config file)
System Description:
debian buster
selinux enabled & permissive mode
relabelling service active
Hi @kmxz. Would it be possible to add a license file into this repo? I plan to create an APK package for your software. Thanks.
[22:24:56] root@devpi:/tmp/zr/overlayfs-tools# make
gcc -Wall -std=c99 -c main.c
In file included from main.c:16:
/usr/include/linux/stat.h:56:8: error: redefinition of ‘struct statx_timestamp’
struct statx_timestamp {
^~~~~~~~~~~~~~~
In file included from /usr/include/arm-linux-gnueabihf/sys/stat.h:446,
from main.c:14:
/usr/include/arm-linux-gnueabihf/bits/statx.h:25:8: note: originally defined here
struct statx_timestamp
^~~~~~~~~~~~~~~
In file included from main.c:16:
/usr/include/linux/stat.h:99:8: error: redefinition of ‘struct statx’
struct statx {
^~~~~
In file included from /usr/include/arm-linux-gnueabihf/sys/stat.h:446,
from main.c:14:
/usr/include/arm-linux-gnueabihf/bits/statx.h:36:8: note: originally defined here
struct statx
^~~~~
make: *** [makefile:11: main.o] Fehler 1
According to the standard,
The nftw() function need not be reentrant.
Also, using nftw, too many global variables need to be maintained.
Moreover, it seemed not efficient enough for the use here, as links are never followed.
When a given directory does not exist, the tool currently says it was not specified
strace overlay diff --lowerdir=/sysroot
...
readlink("/sysroot", 0x7ffdfc3f36c0, 1023) = -1 ENOENT (No such file or directory)
write(2, "Lower directory not specified.\n", 31Lower directory not specified.
) = 31
Would be nice to print that the directory does not exist instead.
Also, adding a --version
flag and tagging releases would be a good idea. This tool is packaged for fedora, but it is impossible to say at what code state.
Maybe this is by design...
Say you have a lower filesystem, "/lower" containing a directory "/lower/d" and a file "lower/f".
Then you mount an overlay, "/overlay" using an empty upper filesystem, "/upper".
Then rm -rf /overlay/d /overlay/f
.
Using overlay merge -l /lower -u /upper
command, in the generated shell script you get
rm -rf '/lower/d'
mv -T '/upper/d' '/lower/d'
rm -rf '/lower/f'
mv -T '/upper/f' '/lower/f'
The whiteout file and opaque directory from /upper are moved in after deleting the existing file.
I guess its a simple find
1-liner to find these files and delete them from "/lower" if you don't want them but I wonder if overlayfs-tools should either not copy these files in the first place or provide an option not to copy them.
Hi,
I'm looking for a rebuild function that rebuild a combined dir ready to use with a high dir (with updated files and dirs) with low dir and a script.
typically i want to backup a low and high dir and i want to restore a ready to use combined dir with special char device file regenerated.
kmxz using your merge tool with a single lower in https://github.com/StuartIanNaylor/zram-config.
Firstly many thanks as even though OverlayFS is now a mainline module there seems to be a total lack of any tools apart from yours.
I am terribly new to OverlayFS but when it comes to renaming folders and redirect_dir do you plan to add support?
Hi,
So, the script generated on a "merge" command ... basically performs a delete of "upperdir" which does not match what the behaviour stated in help file should be. There it states that the "upperdir" is left empty. When experimenting with merge when mounted ... this is problematic since the "upperdir" mountpoint goes missing and overlayfs looses track of everything at that point. Was wondering if this can be fixed to perform the behaviour indicated that it should be doing.
Heres a snippet from script generated:
rm -rf '/opt/zram/log.bind/daemon.log'
mv -T '/opt/zram/zram2/upper/daemon.log' '/opt/zram/log.bind/daemon.log'
rm -rf '/opt/zram/log.bind/messages'
mv -T '/opt/zram/zram2/upper/messages' '/opt/zram/log.bind/messages'
rm -rf '/opt/zram/log.bind/auth.log'
mv -T '/opt/zram/zram2/upper/auth.log' '/opt/zram/log.bind/auth.log'
rm -rf '/opt/zram/log.bind/syslog'
mv -T '/opt/zram/zram2/upper/syslog' '/opt/zram/log.bind/syslog'
rmdir '/opt/zram/zram2/upper'
gcc -Wall -std=c99 -c main.c
main.c: In function ‘directory_create’:
main.c:99:35: error: ‘errno’ undeclared (first use in this function)
99 | if (mkdir(path, 0755) == 0 || errno == EEXIST) { return true; }
| ^~~~~
main.c:21:1: note: ‘errno’ is defined in header ‘<errno.h>’; did you forget to ‘#include <errno.h>’?
20 | #include "sh.h"
+++ |+#include <errno.h>
21 |
main.c:99:35: note: each undeclared identifier is reported only once for each function it appears in
99 | if (mkdir(path, 0755) == 0 || errno == EEXIST) { return true; }
| ^~~~~
main.c:99:44: error: ‘EEXIST’ undeclared (first use in this function)
99 | if (mkdir(path, 0755) == 0 || errno == EEXIST) { return true; }
| ^~~~~~
make: *** [makefile:11: main.o] Error 1
Trivial PR to follow.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.